3 ms·
USDA Food Nutrient Database: clutter-free JSON edition
- Udo 15y agoPoking around in those datasets is fun. That reminds me of a similar thing I did a few months ago with the same database (http://calori.org http://calori.org) as part of a tech demo/test. There's a lot of data included which, quite frankly, doesn't seem very useful (e.g. nutrient "22:1 undifferentiated", whatever that is.) One thing that struck me as well was the amount of cleanup necessary to bring this data into a somewhat presentable shape. I guess is that at some point they just dumped their messy Access DB into CSV and called it a day. But it's still great that they did decide to make this public domain.
- ashleyw 15y agoCool site…did you have a source for the nutrient categories (e.g. Elements, Vitamins, etc.), or did you do that manually? Google Refine made the process of cleaning the data considerably easier, though it still took a few hours.
- Udo 15y agoThanks! No, I arranged the categories myself after coming to the conclusion that they could be grouped in a (semi-)reasonable way. The display code is actually a bit buggy but the main reason I chose to have those categories was to demonstrate to a client how irregular blocks of content could be arranged with JavaScript ;-) I never heard of Google Refine before, that looks like a very handy tool indeed. When I made this, I basically just poked around in the DB with big "DELETE FROM" statements until things looked reasonable again...
- ashleyw 15y agoI've nicked (most of) your categories, hope you don't mind! Oh, you used jQuery Masonry? That's very cool, I hadn't noticed before!
- Udo 15y ago> I've nicked (most of) your categories, hope you don't mind! No, sure, go ahead! > Oh, you used jQuery Masonry? I absolutely love this plugin. I'm using it in a larger project right now. It's amazing how flexible a site can become with respect to different screen sizes!