Skip to content

Interface

Constantine Sergeev edited this page Oct 17, 2018 · 53 revisions

Endpoints

/races

Summarizes donations based on either race or election information. User may provide the following in a request:

  • race_id
  • race_slug
  • election_type
  • election_year

Information is summarized in the following way:

  • race_district
  • in_pa_donations_by_year (2017, 2018 and total)
  • seat_status
  • election_year
  • parties_short_text
  • area
  • race_order
  • election_type
  • race_name
  • out_of_pa_donations_by_year (2017, 2018 and total)
  • donations_by_year (2017, 2018 and total)
  • race_description
  • top_donors
  • election_date
  • is_statewide
  • id
  • slug
  • num_candidates

This information is sent back in a json format

/candidates

Summarizes donations to candidates based on either race or candidate information. User may provide the following in a request:

  • race_id
  • race_slug
  • candidate_id
  • candidate_slug

Donations are summarized in the following way:

  • id
  • social_blob
  • slug
  • name_suffix
  • name_last
  • is_active
  • fec_id
  • name_first
  • committees:
    • committee_description
    • committee_slug
    • id
    • committee_name
  • candidacies:
    • id
    • outcome
    • candidacy_order
    • candidacy_type
    • race_id
    • slug
    • party_id
    • candidate_id
    • party:
      • party_order
      • party_name
      • id
      • slug
  • in_pa_donations_by_year (2017, 2018 and total)
  • out_of_pa_donations_by_year (2017, 2018 and total)
  • donations_by_year (2017, 2018 and total)
  • name_middle
  • website
  • candidate_order
  • district

This information is sent back in a json format

/contributions

Summarizes donations based on either race or candidate information. User may provide the following in a request:

  • race_id
  • race_slug
  • candidate_id
  • candidate_slug

Donations are summarized in the following way:

  • total_money_donated
  • total_money_donated_by_year
  • total_money_in_philly
  • total_money_out_philly
  • total_money_in_pa
  • total_money_out_pa
  • total_money_spent
  • top_donors
  • donations_by_zipcode
  • donations_by_ward

This information is sent back in a json format

/advanced-search/

/top-money/

/committees/

/receipts/

/expenditures/

/elections/

Objects

Race

  • id: Primary key, unique identifier for each record in the table
  • election_type: Primary or general elections
  • election_year: Year election took place
  • election_date: Date of election
  • seat_status: Filled or open
  • race_order: Custom order field related to current race popularity would be used for ordering races on the website
  • race_name: Name of a position or political office that candidates are running for in this particular elections
  • race_district: District name where the elections take place
  • race_description: Description of a position or political office that candidates are running for in this particular elections
  • num_candidates: Number of candidates who participate in this particular elections
  • parties_short_text: Political party name
  • slug: Id string which uniquely identifies the race, a part of a URL that identifies a page in human-readable keywords, it
  • is_statewide: Statewide or not
  • area: Currently unused

Candidate

Information about political candidate who campaigned for local or state office in a general, primary or special election

  • id: Primary key, unique identifier for each record in the table
  • fec_id: Currently unused, placeholder for national candidates (US House, Senate and President)
  • district: A territorial subdivision for electing members to a legislative body
  • name_first: First name of the candidate
  • name_middle: Middle name of the candidate
  • name_last: Last name of the candidate
  • name_suffix: name suffix
  • slug: Id string which uniquely identifies the candidate, a part of a URL that identifies a page in human-readable keywords, it is usually the end part of the URL
  • website: Candidate's website if any
  • social_blob: Candidate's social blog if any
  • is_active: Currently unused
  • candidate_order: Custom order field related to current candidate popularity would be used for ordering candidates on the website

Committee

Summarizes information about a specific political campaign committee. Political campaign committee is the entity through which as candidate legally accepts donations for or spends money on his/her campaign

  • id: Primary key, unique identifier for each record in the table
  • committee_name: Name under which committee is registered
  • committee_slug: Id string which uniquely identifies the committee, a part of a URL that identifies a page in human-readable keywords, it is usually the end part of the URL
  • committee_description: Describes the purpose of the committee
  • donations_2015: Donations usually come from individuals, other committees or PAC. Funds received by the committee in 2015
  • donations_2016: Donations usually come from individuals, other committees or PAC. Funds received by the committee in 2016
  • donations_2017: Donations usually come from individuals, other committees or PAC. Funds received by the committee in 2017
  • donations_in_philly: Donations usually come from individuals, other committees or PAC. Funds received from donors in Philadelphia
  • donations_in_pa: Donations usually come from individuals, other committees or PAC. Funds received from donors in Pennsylvania
  • donations_out_pa: Donations usually come from individuals, other committees or PAC. Funds received from donors outside of Pennsylvania

Receipt

Expenditure

Clone this wiki locally