Skip to content

zrecore/FEC_GRAPH

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Follow the Data

Basic importers for importing FEC Campaign Finance data into the Neo4j Graph Database.

Requires

Note: that Java is just required for the initial batch import of data. The dataset can then be explored with Neo4j's own Cypher query language, or using one of the language drivers listed below.

Follow these Steps

  1. git clone https://github.com/akollegger/FEC_GRAPH.git
  2. cd FEC_GRAPH
  3. ant initialize
  4. ant
  5. ./bin/fec2graph --force --importer=[RAW|CONNECTED|RELATED]
  • choose one of the importers, like ./bin/fec2graph --force --impoerter=RAW
  • RAW: imports records with no modifications
  • CONNECTED: connects imported records based on cross-referenced IDs
  • RELATED: replaces "join table" records with graph relationships
  1. ant neo4j-start

Indexed Nodes

  • candidates.CAND_ID
  • candidates.CAND_NAME
  • committees.CMTE_ID
  • committees.CMTE_NM

Sample queries using indexes:

start cand=node:candidates(CAND_ID='P80003627') start comm=node:candidates(CMTE_ID='C90012980')

Cypher Challenge

Query for this...

// All presidential candidates for 2012

// Most mythical presidential candidate

// Top 10 Presidential candidates according to number of campaign committees

// find President Barack Obama

// lookup Obama by his candidate ID

// find Presidential Candidate Mitt Romney

// lookup Romney by his candidate ID

// find the shortest path of funding between Obama and Romney

// 10 top individual contributions to Obama

// 10 top individual contributions to Romney

Wanna code? Get a Neo4j Driver


Releases

No releases published

Packages

No packages published