Hosting datasets
On my previous post we’ve successfuly added d3 layout in a post. But the dataset was hard-coded in the html file. And it looks kind of bad.
Dataset are provided normally via api or a different link than the web app use to visualize. Why is that?
- Because of the MVC framework? models are needs to be separated from the view.
- Needs to be lightweight to save bandwidth
- For faster / more responsive web application
These are just my opinion but in any case all of these looks logical. You may want to remove the hard-coded data in the html file and move it somewhere else. Here are my suggestions:
- Github
- Dropbox
- Heroku
- Amazon
While browsing google here is what I found, Google Fusion Tables and Google Public Data. But the site looks too public. You may want to host your dataset somewhere personal.
Ok so lets go back. It seems we can use github to host our dataset. We will follow the steps in this site.
Steps to create a data repository in github:
- Create a repo with data
- Create a cover site
- Click
admin
button next to repository’s name - Click
Automatic Page Generator
- Choose layout
- Add tracking id
- Publish page
- Click
The only take away here is that you wiill be creating one repository for every dataset, which can make your repository cluttered.
Next option is dropbox, hosting in dropbox is very easy.
- Create an account
- Upload dataset to public folder
- Copy Link
Update: dropbox doesn’t allow this anymore
Thats it for now. I don’t see any reason yet not to use dropbox.
Site Update!
I discovered jekyll allows you to host static files via assets
folder, which is very nice.