All examples By author By category About

Lecy277

HW 4 Line chart

Built with blockbuilder.org

Jamie Gibbs

HW-4 Line Chart

Line Chart to Show United States Foreign Aid Spending Per Year

This line chart was designed to show the amount of money donated in foreign aid by the United States between the years 2002 through 2010. I used OpenRefine to edit an excel spread sheet that contained the aid data. I then filtered out all countries except for the United states and deleted all other columns such as reasons for donation, aid ID, and the recipient of the aid until I had just the United states and the dollars per year they spent. I then used a formula to combine all donations from a given year into a total for each year. I then converted it to a data.tsv file which is listed below.

Marks, Channels, Data Attributes and explanation of Line Chart

The mark in this chart is a point. The chart has two channels which are mapped to two attributes. The vertical spatial channel is mapped to the Money in ($) attribute and the horizontal spatial channel is mapped to the Year Spent attribute. The Y-Axis or Money in ($) attibute has tics running from a range of $0 to $120,000,000. The X-Axis displays the Year Spent attribute and has years ranging from 2002 through 2010. The points of each year are joined together to form a teal line that runs across the chart.

Insights

The chart displays a real spike in the amount of foreign aid from 2007 through 2010 especially in 2009 through 2010. This seems rather odd given the fact 2008 through 2010 was during the the housing crisis and you would think the government would reduce foreign aid during this time in order to help domestically. Also it shows the difference of foreign spending from one president to another.

Links that helped in the making of this LIne Chart

https://github.com/d3/d3-scale-chromatic/blob/master/README.md#interpolateCool http://d3indepth.com/scales/ https://bl.ocks.org/mbostock/3883245

No lines were hurt in the making of this chart