This is day 3 of my countdown to Open Data Day. That sneaky Open Data Day is slithering and sneaking up on us like a greased snake on an ice rink. So far weâ€™ve looked at data from the provincial government and the city. That leaves us just one level of government: the federal government. I actually found that the feds had the best collection of data. Their site data.gc.caÂ has a huge number of data sets. Whatâ€™s more is that the government has announced that it will be adopting the same open government system which has been developed jointly by India and the US: http://www.opengovtplatform.org/.
One of the really interesting things you can do with open data is to merge multiple data sets from different sources and pull out conclusions nobody has ever looked at before. Thatâ€™s what Iâ€™ll attempt to do here.
Data.gc.ca has an amazing number of data sets available so if youâ€™re like me and youâ€™re just browsing for something fun to play with then youâ€™re in for a bit of a challenge. I eventually found a couple of data sets related to farming in Canada which looked like they could be fun. The first was a set of data about farm incomes and net worths between 2001 and 2010. The second was as collection of data about yields of various crops in the same time frame.
I started off in excel summarizing and linking these data sets. I was interested to see if there was aÂ correlationÂ between high grain yields per hector and an increase in farm revenue. This would be a reasonable assumption as getting more grain per hector should allow you to sell more and earn more money. Â Using the power of Excel I merged and cut up data sets to get this table:
|Farm Revenue||Yield Per Hector||Production in tonnes|
I threw it up against d3.js and produced some code which was very similar to my previous bar chart example in HTML 5 Data Visualizations â€“ Part 5 â€“ D3.jsI didnâ€™t bother with any scales because it isÂ immediatelyÂ apparent that there does not seem to be any Â correlation. Huh. I would have thought the opposite.
You can see a live demo and the code over atÂ http://bl.ocks.org/stimms/5008627