Basic importers for importing FEC Campaign Finance data into the Neo4j Graph Database.
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.
git clone https://github.com/akollegger/FEC_GRAPH.git
cd FEC_GRAPH
ant initialize
ant
./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
ant neo4j-start
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')
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
- Ruby - Neograph
- Java - Spring Data Neo4j
- Javascript - Node Neo4js
- Neo4jPHP - PHP
- Bulbflow - Python
- Neo4Django - Django
- Neo4jClient - .net
- Neo4j-GO - Google Go
- Neocons - Clojure References
- Neo4j - the graph database
- Neo4j Cypher Reference
- FEC Campaign Finance Data