Demo: Annual Outlays by Agency

From Data-gov Wiki

Jump to: navigation, search

NOTE: This demo is replaced by Demo: US Agency Budget Browser.

Infobox (legacy demo) edit with form
  • name: Demo: Annual Outlays by Agency

  • description: Bar graph of agency outlays (expenditures) over time, divided into agency accounts
  • creator(s): Sarah Magidson
  • created: July 31,2009
  • modified: 2010-5-18

live demo here

Contents

Facts about this Demonstration

Live Demo(s)
Video Demo(s)
Data.gov Data source(s)
Other Data source(s)
Technology Used
Related SPARQL
Related Demo(s)


Interesting observations

The user chooses a government agency from a list (though eventually we hope to put in auto-complete searching). The application finds all accounts belonging to the chosen agency, along with their outlays (expenditures) for each year from 1962 to 2014 (2009-2014 are projected values). The result is a bar graph having one bar per year, and each bar consists of the accounts' amounts for that year stacked on one another.

Figure 2. The list of agencies, the first thing that appears in this demo.

The visualization easily enables people to monitor the overall sum of money that a agency has spent over time, but it also shows how the money within that agency has been allocated over the years. For example, we can see that the National Science Foundation has seen increased funding over time (though less so between 2004 and 2008), but also that, while their main focus is research, since the 90's they have also increased spending on education and human resources.

Figure 3. NSF's Outlay

Technology Highlights

  • The list is created through a combination of HTML forms and PHP.
  • When the form is submitted, a SPARQL query is generated using PHP (the outline of the query can be seen here).
  • The data is run through the RDF to Google visualization conversion process of using a SPARQL service and XSLT to put the data in JSON format.
  • Some PHP is also used to create the title of the visualization.


Known Bugs

  • Graphs will not load for every agency.
  • Account names that are too long will get cut off.
  • Agency with enough accounts will have have account names going off the top or bottom of the screen.
  • The same account name frequently appears more than once, in multiple colors, making the graph harder to interpret easily. This is likely due to multiple entries in the CSV file, not an actual mistake on our part.
Personal tools
internal pages