On August 7th, we had our second Thursday night minihackathon. The goal for this minihackathon was to use D3.js and data from Data.gov to create a data visualization.

Here’s the demo for a data visualization for the 1,800+ known exoplanets.


    Challenges/Things I’ve learned

  • Data.gov is not the best source of data to use for a two hour hackathon. Data.gov has so many datasets in so many formats and in so many sizes that it was difficult to find a suitably small dataset for the hackathon. In the end, I decided to ditch Data.gov and use the list of exoplanets from Exoplanets.eu.
  • Sometimes, Chrome does not like loading local files. When I tried loading a csv that was on my computer into D3.js, Chrome showed a cross origin request error.

    XMLHttpRequest cannot load file://User/xxx/exoplanet.eu_catalog.csv. Cross origin requests are only supported for HTTP.

    This was a very weird error since I wasn’t connected to the network. The index.html, csv, and javascript files were all in the same directory. I tested the index.html file in Safari. Safari could load the csv, but Chrome could not. I was all kinds of confused.

  • By the end of the 2 hour hackathon, I did not have a finished product to show. Looking for a dataset, reading about how to use a csv file with D3.js, and Chrome not loading the file took up the entire two hours. Getting ready to create a simple data visualization was a lot more challenging that I expected.
  • After the hackathon, I found out that Chrome not loading local files is a thing that Chrome does. You either have to start a server and use the server to load the index.html file or use terminal to start Chrome.
  • Due to other Hackreactor projects, it took like a week for me to find the time to return to this project. Once I got everything set up correctly, I could actually start coding using D3. After the two hours of things not working, things not working, things not working, it was so cool the first time I saw circles appear on the page. Yay!
  • Astronomy is awesome. That is all.