October 31, 2011

Happy Samhain

As I checked twitter today I saw a greeting, "Happy Samhain". I never heard of Samhain before, but it sounded so familiar. A quick look at wikipedia and i found out that Samhain is a Gaelic harvest festival held on October 31. The Modern Irish word Samhain is derived from the Old Irish samain, samuin. And hstorically, Samain or Samuin was the name of the feis or festival at the beginning of winter observed in medieval Ireland.

It only took a minute and suddenly I remembered a planet called Samhuinn in Exodyssey--an awesome book I had for several years now. I quickly grabbed the big hardbound book and opened to the last chapter. And sure enough, the local creatures on the planet, called Samhuinians, had some inspiration from halloween. As a matter of fact, several pages were devoted to what the artists called "Halloweenian Creatures". I feasted my eyes on the biological artworks and wondered about the diversity of alien lifeforms on other planets.

October 19, 2011

The Total Known Exoplanets Google Chrome Browser Extension

Just a quick note to tell you something about the first ever Google Chrome Browser Extension I ever made which is a very simple counter for the total known exoplanets. With a click of a button, you'll see how many known exoplanets humanity has discovered so far.

So if you use the Google Chrome browser a lot, and if you’re obsessed about exoplanets, why don’t you install this handy extension so you can feed your exoplanet fix? You can install it from the official extension page from Google: Total Known Exoplanets Chrome Extension.

So how does it work? Well, everytime you click on the icon, it sends me an alert, and I type the number of the latest count of known exoplanets on that tiny bubble. Simple enough, right?

You’d think i’m crazy to do that. And you’re right. That’s why I automated the process. So here’s what happens behind the scenes after your click. (Warning: technical stuff ahead.)

IMPORTANT UPDATE (July 18, 2012) !!!

After you click on the icon, the extension requests data from a pipe i made on Yahoo Pipes, called "Exoplanet Count Spy" which spews out data in JSON format (which contains the updated number of known exoplanets).

Yahoo Pipes allows you to get hold of data in convenient JSON format from an external RSS feed source. Its JSONP capability is a very useful feature, which subverts the cross-domain barrier and allows you get data from external sites and use them.

So where does my “Exoplanet Count Spy” pipe get its data from? It grabs it from a news feed from Feed43, another great third-party service on the web that generates RSS feeds from an HTML page. Now comes the real source of data where i get the number from.

It's been a long chain of events so far only to find out that the ultimate source of data is the Exoplanet Catalog from the venerable Extrasolar Planets Encyclopaedia (exoplanet.eu) maintained by Jean Schneider. Many thanks to him for faithfully updating the tally of exoplanets. Without him doing it, this extension will lose it's functionality.

All those things described happen behind the scenes of the extension. But on the surface, the Total Known Exoplanets counter simply consults the exoplanet tally page from the Exoplanet Encyclopedia and shows you the result on your browser. That’s all.

I hope you find the Total Known Exoplanets extension useful!

October 7, 2011

Open Tasking: Exoplanet Data in JSON Format NEEDED

I love programming. And i'm thankful when i heard that today is Ada Lovelace Day. Ada Lovelace is known to be the World’s First Computer Programmer. I was going to do something else today but Lovelace reminded me to code instead. And so I did.

I worked on some exoplanet data today, and have a goal of creating a code-accessible database of exoplanets. But then time flies so fast. I can't do it alone, but I know I belong to a hive of coders and i'm just one node among many of the programming collective. So i'd like to tap the collective and start "Open Tasking". It's like this: i'll tell you where i'm at with this self-inflicted project, and then i'll let you know what kind of help that i need on a particular task. In return, I will share what I learned in the hopes that it will benefit others.

Basically, I am setting up a CouchDB database for Exoplanets. It will be something anyone can use and replicate for any purpose. There's a ton of sub-tasks that need to be done before it becomes a reality so i am posting this as i go along. At the moment, I need help to write a script to convert the XML format of exoplanet data into JSON format so i can import them into CouchDB.
The source data can be found here: Open Exoplanet Catalogue [ https://github.com/hannorein/open_exoplanet_catalogue/tree/master/data ] and the intended destination where the exoplanet JSON will be stored will be in here Exoplanets at Cloudant [ https://cloudant.com/futon/database.html?metapsyche%2Fexoplanets/_all_docs ].
[ If you really want to take a peek at where i'm at right now feel free to check The Exoplanet Viewer. It's really nothing at this point actually, just some preliminary code ]

I've already contacted HannoRein of the Open Exoplanet Catalogue and he said he has no plans to provide the data in JSON format. Bummer. So, right now, I am trying to write javascript code to convert XML to JSON so I can automate a batch conversion of the XML exoplanet data into JSON and then load them into my CouchDB database at cloudant. Why Javascript? So i can use it with node.JS and make streamlined process to keep up with the fast-paced exoplanet updates. So if you already had experience with the task described, and you already have a working set of code, please help me.

I've done quite some research on this and i can't find any usable code at this point. The JSON output should validate at JSONLint [ http://jsonlint.com ]. At the moment, I am using this http://extjs.org.cn/xml2json/xml2json_online.php to convert XML manually. But as I said, I need a streamlined process to keep up with the rapid pace of exoplanet data growth and updates.

Exoplanets and Open Data
Open Exoplanet Data on CouchDB