Demo: US Agency Budget Browser

From Data-gov Wiki

Jump to: navigation, search

Infobox (stable demo) edit with form
  • name: Demo: US Agency Budget Browser

  • description: browse an agency's budget data (summary and account details) using three Public Budget datasets.
  • creator(s): Li Ding
  • created: May 17,2010
  • modified: 2010-5-18

The prior versions of this demo are

live demo here

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

This demo uses SPARQL to combine data from dataset 401 budget authority (money allocated by Congress), dataset 402 budget outlays (actual expenses) and dataset 403 recipient by various government accounts from 1976 to 2014 (values from the present to 2014 are projected).

  • not all agencies show up in all datasets, and a lot of them are not mentioned in Dataset 403.
  • there are both positive and negative figures in the budget, further investigations are needed


Example 1
Reforms and Recoveries for Elementary and Secondary Education

Technology highlights

SPARQL queries were used to aggregate data from three datasets

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?p  sum(xsd:integer (?o)) ?g 
WHERE 
{GRAPH ?g
{
 # match the specific BGP first, then filter based on account_name. 
 # only join with the completely unbound triple pattern after the filter so that the intermediate result size isn't large.
 {
  ?s <http://data-gov.tw.rpi.edu/vocab/p/401/agency_name> "Department of the Interior" . 
  ?s <http://data-gov.tw.rpi.edu/vocab/p/401/bureau_name> "Departmental Offices" . 
  ?s 	<http://data-gov.tw.rpi.edu/vocab/p/401/account_name> ?account_name.
  filter (regex(?p,"num"))
 }
 ?s ?p ?o.
}
}
group by ?g ?p 
Personal tools
internal pages