forked from davidfauth/FEC_GRAPH
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated batch properties; elaborated readms
- Loading branch information
1 parent
ba3963f
commit 7e9e8d8
Showing
4 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,4 @@ | |
*.graphdb | ||
ivy/ | ||
bin/ | ||
batch.properties | ||
neo4j-community* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use_memory_mapped_buffers=true | ||
neostore.nodestore.db.mapped_memory=50M | ||
neostore.relationshipstore.db.mapped_memory=250M | ||
neostore.propertystore.db.mapped_memory=512M | ||
neostore.propertystore.db.strings.mapped_memory=100M | ||
neostore.propertystore.db.arrays.mapped_memory=0M | ||
neostore.propertystore.db.index.keys.mapped_memory=7M | ||
neostore.propertystore.db.index.mapped_memory=7M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
// other committees supporting presidential candidates in 2012 | ||
start candidate=node:candidates('CAND_ID:*') match (candidate)-[r:SUPPORTS]-(campaign) where candidate.CAND_OFFICE='P' AND candidate.CAND_ELECTION_YR='2012' return campaign.CMTE_NM, TYPE(r), candidate.CAND_NAME; | ||
// All presidential candidates for 2012 | ||
start candidate=node:candidates('CAND_ID:*') where candidate.CAND_OFFICE='P' AND candidate.CAND_ELECTION_YR='2012' return candidate.CAND_NAME; | ||
|
||
start committee=node:committees('CMTE_ID:*') match p=(committee)<-[:CONTRIBUTION_FROM]-(recipient) return p limit 10; | ||
// Top 10 Presidential candidates according to number of campaign committees | ||
start candidate=node:candidates('CAND_ID:*') match candidate<-[r:SUPPORTS]-(campaign) | ||
where candidate.CAND_OFFICE='P' AND candidate.CAND_ELECTION_YR='2012' | ||
return candidate.CAND_NAME, COUNT(campaign) as count | ||
ORDER BY count desc LIMIT 10; | ||
|
||
// find President Barack Obama | ||
start obama=node:candidates('CAND_ID:*') WHERE obama.CAND_NAME =~ '.*OBAMA.*' return obama.CAND_NAME, obama.CAND_ID; | ||
|
||
// lookup Obama by his candidate ID | ||
start obama=node:candidates(CAND_ID='P80003338') return obama; | ||
|
||
// find Presidential Candidate Mitt Romney | ||
start romney=node:candidates('CAND_ID:*') WHERE romney.CAND_NAME =~ '.*ROMNEY.*' return romney.CAND_NAME, romney.CAND_ID; | ||
|
||
// lookup Romney by his candidate ID | ||
start romney=node:candidates(CAND_ID='P80003353') return romney; | ||
|
||
// find the shortest path of funding between Obama and Romney | ||
start romney=node:candidates(CAND_ID='P80003353'), obama=node:candidates(CAND_ID='P80003338') MATCH p=shortestPath(romney-[*..10]-obama) return p; | ||
|
||
// 10 top individual contributions to Obama | ||
start obama=node:candidates(CAND_ID='P80003338') match obama<-[:SUPPORTS]-(campaign)<-[:INDIVIDUAL_CONTRIBUTION]-(contribution) return contribution.NAME, contribution.TRANSACTION_AMT order by contribution.TRANSACTION_AMT desc limit 10; | ||
|
||
// 10 top individual contributions to Romney | ||
start romney=node:candidates(CAND_ID='P80003353') match romney<-[:SUPPORTS]-(campaign)<-[:INDIVIDUAL_CONTRIBUTION]-(contribution) return contribution.NAME, contribution.TRANSACTION_AMT order by contribution.TRANSACTION_AMT desc limit 10; | ||
|
||
// first 10 contributions made from committees to some recipient | ||
start committee=node:committees('CMTE_ID:*') | ||
match (committee)<-[:CONTRIBUTION_FROM]-(contrib)-[:CONTRIBUTION_TO]->(recipient) | ||
return contrib.TRANSACTION_AMT, recipient.CMTE_NM limit 10; |