Models

Representatives

The representatives model covers the individual members of the House of Representatives. Each representative belongs to a political party and represents a legislative district.

Each representative is associated with a unique Bioguide ID from Congress’s Biographical Directory. For example, R000570 will only ever refer to Representative Paul Ryan of Wisconsin's 1st Congressional district. The Bioguide ID is used by our data sources to identify each Representative. This ID links a Representative to everything from his or her office location to bills he or she sponsored. Our site utilizes this pre-existing form of identification internally for the representatives model to find individual representatives. In addition, because this system is widely used by other political resources, such as ProPublica and GovTrack, we too use it to provide data through our public-facing API.

Attributes

Our representative model includes the following attributes: name, political party, district, website, party loyalty percentage, bills sponsored, social media links (Twitter, YouTube, and Facebook), recent news articles, and office location.

Rendering

The grid index of all representatives is rendered by Representatives.js and RepresentativeInstance.js. The detailed page of an individual representative is handled by RepresentativeDetails.js.

Data sources

Individual representative data is pulled from the representative API endpoint using the representative's unique bioguide ID. (ex. GET http://api.swethepeople.me/representative/A000055)

Grid data is pulled from the representative API endpoint with no parameters. (ex. GET http://api.swethepeople.me/representative)

Images of the representatives are pulled from https://theunitedstates.io/images/congress.

Political Parties

The political parties model covers the political parties of the United States that earned more than three percent of the vote during the 2016 presidential election. Each political party instance provides basic information on the party, such as chair and formation date, and links to that party’s social media presence. Each political party has many representatives that belong to it as well as many legislative districts that are controlled by the party.

Political parties are identified by their name. Some examples are Republican Party, Democratic Party, and Libertarian Party.

Attributes

Party attributes include party chair, formation date, party color, website, and the ratio of House control.

Rendering

The grid index of all political parties is rendered by PoliticalParties.js and PoliticalPartyInstance.js. The detailed page on an individual party is handled by PoliticalPartyDetails.js.

Data sources

Individual party data is pulled from the party API endpoint using the party's name as its parameter. (ex. GET http://api.swethepeople.me/party/democratic_party)

Grid data is pulled from the party API endpoint with no parameters. (GET http://api.swethepeople.me/party)

Legislative Districts

The legislative district model covers the various congressional districts in each state. Though states are not their own model, the districts are organized by the state they are in. Each state has between one congressional district (if a state has only one, the district is referred to as an At-Large District) and fifty-three legislative districts (California). Each legislative district has one representative and is thus represented by a single political party.

Legislative districts are identified by the postal abbreviation of their state their number. For example "WI-1" is the first district in Wisconsin. For states with only one district, the district "number" is instead "At-Large." The name for these districts is "At-Large District" instead of "District #".

Attributes

Legislative district attributes include total population, median age (male, female, and total), Census data related to gender, racial, and ethnic demographics, internet and computer access and usage, and the income and educational distribution of the district.

Rendering

The grid index of all legislative districts is rendered in Districts.js and the page with individual district information is handled by DistrictDetails.js.

Data sources

Individual district data is pulled from the district API endpoint using the district's identifier as its parameter. (ex. GET http://api.swethepeople.me/district/AR/2)

Grid data is pulled from the state API endpoint with no parameters. (GET http://api.swethepeople.me/state) and state district information is pulled from the district API endpoint with state as the parameter (GET http://api.swethepeople.me/district/AR)

results matching ""

    No results matching ""