Browse files

added javadoc comments to data records

  • Loading branch information...
1 parent 105b0a8 commit e9d71bd4d59ea6f9932b54fd072fb1ea99d38789 @akollegger committed Oct 5, 2012
View
62 CODE/fecGraph/src/importer/fec/FecCandidateRecord.java
@@ -71,20 +71,82 @@ private FecCandidateRecord() {
return fieldSpecs;
}
+ /** A 9-character alpha-numeric code assigned to a candidate by the Federal Election Commission. The candidate ID for a specific candidate remains the same across election cycles as long as the candidate is running for the same office. */
public String candidateID() { return String.valueOf(getField(Fields.CAND_ID.name())); }
+
+ /** Candidate's name. */
public String candidateName() { return String.valueOf(getField(Fields.CAND_NAME.name())); }
+
+ /** The political party affiliation reported by the candidate. */
public String canddateParty() { return String.valueOf(getField(Fields.CAND_PTY_AFFILIATION.name())); }
+
+ /** Candidate's election year from a Statement of Candidacy or state ballot list. */
public String candidateElectionYear() { return String.valueOf(getField(Fields.CAND_ELECTION_YR.name())); }
+
+ /**
+ * The state of the office for which the candidate is running. Interpret according to the office:
+ * <ul>
+ * <li>House = state of race (CT, NM, PA, etc)</li>
+ * <li>President = US</li>
+ * <li>Senate = state of race</li>
+ * </ul>
+ */
public String candidateOfficeState() { return String.valueOf(getField(Fields.CAND_OFFICE_ST.name())); }
+
+ /**
+ * The office for which the candidatite is running:
+ * <ul>
+ * <li>H = House</li>
+ * <li>P = President</li>
+ * <li>S = Senate</li>
+ * </ul>
+ */
public String candidateOffice() { return String.valueOf(getField(Fields.CAND_OFFICE.name())); }
+
+ /**
+ * The district of the office for which a house candidate is running:
+ * <ul>
+ * <li>Congressional district number.</li>
+ * <li>Congressional At Large 00</li>
+ * <li>Senate 00</li>
+ * <li>Presidential 00</li>
+ * </ul>
+ */
public String candidateDistrict() { return String.valueOf(getField(Fields.CAND_OFFICE_DISTRICT.name())); }
+
+ /**
+ * Whether the candidate is a challenger, incumbent or running for an open seat. One of:
+ * <ul>
+ * <li>C = Challenger</li>
+ * <li>I = Incumbent</li>
+ * <li> O = Open Seat is used to indicate an open seat. Open seats are defined as seats where the incumbent never sought re-election.</li>
+ * </ul>
+ */
public String candidateIncumbentChallengerStatus() { return String.valueOf(getField(Fields.CAND_ICI.name())); }
+
+ /**
+ * The "status" of a candidate. One of:
+ * <ul>
+ * <li>C = Statutory candidate</li>
+ * <li>F = Statutory candidate for future election</li>
+ * <li>N = Not yet a statutory candidate</li>
+ * <li>P = Statutory candidate in prior cycle</li>
+ * </ul>
+ */
public String candidateStatus() { return String.valueOf(getField(Fields.CAND_STATUS.name())); }
+
+ /** The ID assigned by the Federal Election Commission to the candidate's principal campaign committee for a given election cycle. */
public String candidatePrincipalCommittee() { return String.valueOf(getField(Fields.CAND_PCC.name())); }
+
+ /** Postal address, street line 1 */
public String candidateStreet1() { return String.valueOf(getField(Fields.CAND_ST1.name())); }
+ /** Postal address, street line 2 */
public String candidateStreet2() { return String.valueOf(getField(Fields.CAND_ST2.name())); }
+ /** Postal address, city */
public String candidateCity() { return String.valueOf(getField(Fields.CAND_CITY.name())); }
+ /** Postal address, state */
public String candidateState() { return String.valueOf(getField(Fields.CAND_ST.name())); }
+ /** Postal address, zip code */
public String candidateZip() { return String.valueOf(getField(Fields.CAND_ZIP.name())); }
}
View
42 CODE/fecGraph/src/importer/fec/FecCandidateToCommitteeRecord.java
@@ -55,12 +55,54 @@ private FecCandidateToCommitteeRecord() {
return fieldSpecs;
}
+ /** A 9-character alpha-numeric code assigned to a candidate by the Federal Election Commission. The candidate ID for a specific candidate remains the same across election cycles as long as the candidate is running for the same office. */
public String candidateID() { return String.valueOf(getField(Fields.CAND_ID.name())); }
+ /** Candidate's election year */
public Integer candidateElectionYear() { return (Integer)getField(Fields.CAND_ELECTION_YR.name()); }
+ /** Active 2-year period */
public Integer fecElectionYear() { return (Integer)getField(Fields.FEC_ELECTION_YR.name()); }
+
+ /** * A 9-character alpha-numeric code assigned to a committee by the Federal Election Commission. */
public String committeeID() { return String.valueOf(getField(Fields.CMTE_ID.name())); }
+
+ /**
+ * The "type" of committee. One of:
+ * <table>
+ * <tr><th>Code</th><th>Type</th><th>Explanation</th></tr>
+ * <tr><td>C</td><td>Communication</td><td>Cost Organizations like corporations or unions may prepare communications for their employees or members that advocate the election of specific candidates and they must disclose them under certain circumstances. These are usually paid with direct corporate or union funds rather than from PACs.</td></tr>
+ * <tr><td>D</td><td>Delegate Committee</td><td>Delegate committees are organized for the purpose of influencing the selection of delegates to Presidential nominating conventions. The term includes a group of delegates, a group of individuals seeking to become delegates, and a group of individuals supporting delegates.</td></tr>
+ * <tr><td>E</td><td>Electioneering Communication</td><td>Groups (other than PACs) making Electioneering Communications</td></tr>
+ * <tr><td>H</td><td>House</td><td>Campaign committees for candidates for the House of Representatives</td></tr>
+ * <tr><td>I</td><td>Independent Expenditor (Person or Group)</td><td>Individuals or groups (other than PACs) making independent expenditures over $250 in a year must disclose those expenditures</td></tr>
+ * <tr><td>N</td><td>PAC - Nonqualified</td><td>PACs that have not yet been in existence for six months and received contributions from 50 people and made contributions to five federal candidates. These committees have lower limits for their contributions to candidates.</td></tr>
+ * <tr><td>O</td><td>Independent Expenditure-Only (Super PACs)</td><td>Political Committee that has filed a statement consistent with AO 2010-09 or AO 2010-11. For more information about independent expenditures</td></tr>
+ * <tr><td>P</td><td>Presidential</td><td>Campaign committee for candidate for President</td></tr>
+ * <tr><td>Q</td><td>PAC - Qualified</td><td>PACs that have been in existence for six months and received contributions from 50 people and made contributions to five federal candidates</td></tr>
+ * <tr><td>S</td><td>Senate</td><td>Campaign committee for candidate for Senate</td></tr>
+ * <tr><td>U</td><td>Single Candidate Independent Expenditure</td><td>Political Committee For more information about independent expenditures</td></tr>
+ * <tr><td>V</td><td>PAC with Non-Contribution Account - Nonqualified</td><td>Political committees with non-contribution accounts</td></tr>
+ * <tr><td>W</td><td>PAC with Non-Contribution Account - Qualified</td><td>Political committees with non-contribution accounts</td></tr>
+ * <tr><td>X</td><td>Party - Nonqualified</td><td>Party committees that have not yet been in existence for six months and received contributions from 50 people, unless they are affiliated with another party committee that has met these requirements.</td></tr>
+ * <tr><td>Y</td><td>Party - Qualified</td><td>Party committees that have existed for at least six months and received contributions from 50 people or are affiliated with another party committee that meets these requirements.</td></tr>
+ * <tr><td>Z</td><td>National Party Nonfederal Account</td><td>National party nonfederal accounts. Not permitted after enactment of Bipartisan Campaign Reform Act of 2002.</td></tr>
+ */
public String committeeType() { return String.valueOf(getField(Fields.CMTE_TP.name())); }
+
+ /**
+ * Designation of committee. One of:
+ *
+ * <ul>
+ * <li>A = Authorized by a candidate</li>
+ * <li>B = Lobbyist/Registrant PAC</li>
+ * <li>D = Leadership PAC</li>
+ * <li>J = Joint fundraiser</li>
+ * <li>P = Principal campaign committee of a candidate</li>
+ * <li>U = Unauthorized</li>
+ * </ul>
+ */
public String committeeDesgination() { return String.valueOf(getField(Fields.CMTE_DSGN.name())); }
+
+ /** Unique link ID */
public String linkageID() { return String.valueOf(getField(Fields.LINKAGE_ID.name())); }
}
View
56 CODE/fecGraph/src/importer/fec/FecInterCommitteeContribRecord.java
@@ -83,14 +83,68 @@ private FecInterCommitteeContribRecord() {
public FieldSpec[] getFieldSpecs() {
return fieldSpecs;
}
-
+ /**
+ * A 9-character alpha-numeric code assigned to a committee by the Federal Election Commission.
+ */
public String committeeID() { return String.valueOf(getField(Fields.CMTE_ID.name())); }
+
+ /** Indicates if the report being filed is new (N), an amendment (A) to a previous report, or a termination (T) report. */
public Integer amendmentIndicator() { return (Integer)getField(Fields.AMNDT_IND.name()); }
+
+ /**
+ * Indicates the type of report filed. One of:
+ * <table>
+ * <tr><th>Code</th><th>Type</th><th>Explanation</th></tr>
+ * <tr><td>C</td><td>Communication</td><td>Cost Organizations like corporations or unions may prepare communications for their employees or members that advocate the election of specific candidates and they must disclose them under certain circumstances. These are usually paid with direct corporate or union funds rather than from PACs.</td></tr>
+ * <tr><td>D</td><td>Delegate Committee</td><td>Delegate committees are organized for the purpose of influencing the selection of delegates to Presidential nominating conventions. The term includes a group of delegates, a group of individuals seeking to become delegates, and a group of individuals supporting delegates.</td></tr>
+ * <tr><td>E</td><td>Electioneering Communication</td><td>Groups (other than PACs) making Electioneering Communications</td></tr>
+ * <tr><td>H</td><td>House</td><td>Campaign committees for candidates for the House of Representatives</td></tr>
+ * <tr><td>I</td><td>Independent Expenditor (Person or Group)</td><td>Individuals or groups (other than PACs) making independent expenditures over $250 in a year must disclose those expenditures</td></tr>
+ * <tr><td>N</td><td>PAC - Nonqualified</td><td>PACs that have not yet been in existence for six months and received contributions from 50 people and made contributions to five federal candidates. These committees have lower limits for their contributions to candidates.</td></tr>
+ * <tr><td>O</td><td>Independent Expenditure-Only (Super PACs)</td><td>Political Committee that has filed a statement consistent with AO 2010-09 or AO 2010-11. For more information about independent expenditures</td></tr>
+ * <tr><td>P</td><td>Presidential</td><td>Campaign committee for candidate for President</td></tr>
+ * <tr><td>Q</td><td>PAC - Qualified</td><td>PACs that have been in existence for six months and received contributions from 50 people and made contributions to five federal candidates</td></tr>
+ * <tr><td>S</td><td>Senate</td><td>Campaign committee for candidate for Senate</td></tr>
+ * <tr><td>U</td><td>Single Candidate Independent Expenditure</td><td>Political Committee For more information about independent expenditures</td></tr>
+ * <tr><td>V</td><td>PAC with Non-Contribution Account - Nonqualified</td><td>Political committees with non-contribution accounts</td></tr>
+ * <tr><td>W</td><td>PAC with Non-Contribution Account - Qualified</td><td>Political committees with non-contribution accounts</td></tr>
+ * <tr><td>X</td><td>Party - Nonqualified</td><td>Party committees that have not yet been in existence for six months and received contributions from 50 people, unless they are affiliated with another party committee that has met these requirements.</td></tr>
+ * <tr><td>Y</td><td>Party - Qualified</td><td>Party committees that have existed for at least six months and received contributions from 50 people or are affiliated with another party committee that meets these requirements.</td></tr>
+ * <tr><td>Z</td><td>National Party Nonfederal Account</td><td>National party nonfederal accounts. Not permitted after enactment of Bipartisan Campaign Reform Act of 2002.</td></tr>
+ */
public Integer reportType() { return (Integer)getField(Fields.RPT_TP.name()); }
+
+ /**
+ * This code indicates the election for which the contribution was made. EYYYY (election Primary, General, Other plus election year).
+ * In practice, seems to not include election year, ust 'P', 'G', or 'O' (or null).
+ */
public String primaryGeneralIndicator() { return String.valueOf(getField(Fields.TRANSACTION_PGI.name())); }
+
+ /** Indicates the physical location of the filing. */
public String imageNum() { return String.valueOf(getField(Fields.IMAGE_NUM.name())); }
+
+ /**
+ * Transaction types 10J, 11J, 13, 15J, 15Z, 16C, 16F, 16G, 16R, 17R, 17Z, 18G, 18J, 18K, 18U, 19J, 20, 20C, 20F, 20G, 20R, 22H, 22Z, 23Y, 24A, 24C, 24E, 24F, 24G, 24H, 24K, 24N, 24P, 24R, 24U, 24Z and 29 are included in the OTH file.
+ * @see http://www.fec.gov/finance/disclosure/metadata/DataDictionaryTransactionTypeCodes.shtml
+ */
public String transactionType() { return String.valueOf(getField(Fields.TRANSACTION_TP.name())); }
+
+ /**
+ * One of:
+ * <ul>
+ * <li>CAN = Candidate</li>
+ * <li>CCM = Candidate Committee</li>
+ * <li>COM = Committee</li>
+ * <li>IND = Individual (a person)</li>
+ * <li>ORG = Organization (not a committee and not a person)</li>
+ * <li>PAC = Political Action Committee</li>
+ * <li>PTY = Party Organizationv
+ * </ul>
+ */
public String entityType() { return String.valueOf(getField(Fields.ENTITY_TP.name())); }
+
+ /**
+ */
public String name() { return String.valueOf(getField(Fields.NAME.name())); }
public String city() { return String.valueOf(getField(Fields.CITY.name())); }
public String state() { return String.valueOf(getField(Fields.STATE.name())); }
View
17 README.md
@@ -66,6 +66,20 @@ Query for this...
// 10 top individual contributions to Romney
+*Hint*: New to all this? Here's how to identifiy one of the many fake candidates registered with the FEC.
+
+After successfully listing all candidates for the first query, you could page through the listing to look for names that seem.. just off. Use limit and skip in the return clause to page through the long listing:
+
+ start candidate=node:candidates('CAND_ID:*')
+ where candidate.CAND_OFFICE='{fill this in}' AND candidate.CAND_ELECTION_YR='{this too}'
+ return candidate.CAND_NAME skip 100 limit 100;
+
+Once you spot one of the many candidate names that isn't real, you can query for it directly:
+
+ start candidate=node:candidates(CAND_NAME:'CLAUS, SANTA')
+ return candidate;
+
+To learn more about querying with Cypher, look to the excellent [Neo4j Manual](http://docs.neo4j.org).
Wanna code? Get a Neo4j Driver
------------------------------
@@ -79,6 +93,7 @@ Wanna code? Get a Neo4j Driver
- [Neo4jClient - .net](http://nuget.org/packages/Neo4jClient/)
- [Neo4j-GO - Google Go](https://github.com/davemeehan/Neo4j-GO)
- [Neocons - Clojure](http://clojureneo4j.info/)
+
References
----------
@@ -102,4 +117,4 @@ References
- [Committee to Committee Contributions](http://www.fec.gov/finance/disclosure/metadata/DataDictionaryCommitteetoCommittee.shtml)
- [Committee to Candidates Contributions](http://www.fec.gov/finance/disclosure/metadata/DataDictionaryContributionstoCandidates.shtml)
-!["RELATED" model](https://raw.github.com/akollegger/FEC_GRAPH/master/FEC-model.gif)
+!["RELATED" model](https://raw.github.com/akollegger/FEC_GRAPH/master/FEC-model.gif)

0 comments on commit e9d71bd

Please sign in to comment.