Mapping FY’ 2008 Earmarks for the United States with PowerShell and NetMap

September 27, 2008

in NetMap,PowerShell

I read Senate sends big spending bill to Bush to sign. At the end it said

Taxpayers for Common Sense, a watchdog group, discovered 2,322 pet projects totaling $6.6 billion. That included 2,025 in the defense portion alone that cost a total of $4.9 billion.

On http://www.taxpayer.net there is TCS Database of FY’ 08 Earmarks that can be downloaded. I did and proceeded to do some data mining. 

States Receiving Defense Earmarks

This is a network graph from data in the TCS Earmarks Excel document. Each line representing a state receiving an earmark from a bill.

  • Ag-Rural Development-FDA
  • Commerce, Justice & Science
  • Defense
  • Energy & Water
  • Financial Services
  • Homeland Security
  • Interior
  • Labor-HHS-Education
  • Legislative Branch
  • Military Construction
  • State-Foreign Ops
  • Transportation and Housing & Urban Development

The red lines are states receiving money from the Defense bill.

image

Approach

I edited the spreadsheet, removing the Title, summary information and modified some headings to remove spaces. Then I exported the spreadsheet to a csv format. Using PowerShell, I imported the data and filtered out data records where state and bill were empty. Earmarks allocated to more than one state in a single record were also filtered out. The data was transformed into records of the form Source and Target and then mapped as a directed graph with NetMap. I used the PowerShell script I posted about in Using PowerShell and World Bank Data  with Microsoft’s NetMap graphing libraries.

Note

It took longer to write this post than to mine and graph the data. There are other interesting columns in the spreadsheet like the House and Senate requestors and party. This data may need some work but I’ll graph it and look for patterns.

{ 1 trackback }

Tweets that mention Mapping FY’ 2008 Earmarks for the United States with PowerShell and NetMap -- Topsy.com
12.17.10 at 1:19 am

{ 3 comments… read them below or add one }

Hal Rottenberg 09.28.08 at 2:52 pm

What an interesting confluence of politics and tech. Pork barrel spending is one of my pet peeves. :(

kov 09.29.08 at 8:13 am

Doug, you have the coolest blog in all of Lab49 (I’ll respond to your salt-visualization next, as I happen to know more about that topic than I have any business knowing).

> “It took longer to write this post than to mine and graph the data”

LOL — ain’t that the way it always is in our profession? Anyway, this is a really great visualization, and *of course*, I want more:

Can you scale the boxes according to the amount of pork they represent? That would work great on both sides of the equation. It’ll show us just how fat and bloated DoD is, and which states are clogging their arteries the most on it.

Cheers!

Doug Finke 09.29.08 at 9:02 am

Thanks Ken. I appreciate the comment.

I want more too.

I am looking into a few options to do a Tufte-esk spin on the informatio in the direction you describe.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Contrat Creative Commons

© 2007-2013, Doug Finke