Built with blockbuilder.org
Jamie Gibbs
HW-4 Barchart
Bar Chart to Track Frequency of Foreign Aid Donations per Country
This bar chart was designed to show the number of times each country donated foreign aid between the years 2000 to 2010. I used OpenRefine to edit an excel spread sheet that contained the aid data. I then filtered out any countries that had less then 10 total donations and deleted all other information including dollar amounts, reasons for donation, aid ID, and the recipient of the aid until I had just the country names that donated and the total number of donations per country. I then converted it to a data.tsv file which is listed below.
Marks, Channels, Data Attributes and explanation of Bar Chart
The mark in this chart is a line. The chart has two channels which are mapped to two attributes. The vertical spatial channel is mapped to the Frequency of Donations attribute and the horizontal spatial channel is mapped to the Countries that Donated attribute. The Y-Axis or Frequncy of Donations attibute has 15 tics running from a range of 0 to 60. The X-Axis displays the Countries that Donated attribute and has 18 different countries labeled each with donations, from 10 for Australia, up to 58 for the United States. Each country's bar represents a different color of the rainbow.
Insights
Some of the countries with frequent donations really surprised me like Spain for example They have a lot of issues with their economy and high unemployment so I was surprised by the amount and frequency of their donations to other countries. I was further surprised by how infrequently the United Kingdom donated. I really thought they were more generous.
Links that helped in the making of this bar chart
https://github.com/d3/d3-scale-chromatic/blob/master/README.md#interpolateCool http://d3indepth.com/scales/ https://bost.ocks.org/mike/bar/
https://d3js.org/d3.v4.min.js
https://d3js.org/d3-interpolate.v1.min.js