project-seldon / intake

Ideas, bug reports, questions and any other type of feedback.
https://projectseldon.org
1 stars 0 forks source link

Search / Add parties to detail timelines #24

Open skipjack opened 2 years ago

skipjack commented 2 years ago

@ashkenas suggested we display the party with each role in the detail page "Timeline"s given the representative could change parties from role to role (or even within a single role?). This seems pretty high value and low lift plus we could pretty easily color code the corresponding dot on each timeline entry based on the party color (similar to what we already do for the "Politics" section in each country's "Explore" page).

ashkenas commented 2 years ago

Yep, I'm not sure if it has data for mid-role party changes but each term object in the congress-legislators repo has a party attribute that should be easy enough to pull since the neighboring attributes are already being used to build the timeline. The field may need some cleaning for the 1700's and 1800's terms though as the party names were a bit less standard then and also there were more of them. These are all the values of party that are in there presently along with how many times they appear:

{
    "Anti-Administration": 16,
    "Pro-Administration": 21,
    "Republican": 17977,
    "Federalist": 821,
    "Democratic Republican": 45,
    "Pro-administration": 1,
    "Anti-administration": 2,
    "Unknown": 2,
    "Adams": 260,
    "Jackson": 878,
    "Jackson Republican": 5,
    "Crawford Republican": 5,
    "Whig": 1208,
    "Jacksonian Republican": 1,
    "Jacksonian": 40,
    "Anti-Jacksonian": 22,
    "Adams Democrat": 1,
    "Nullifier": 34,
    "Anti Mason": 6,
    "Anti Masonic": 76,
    "Anti Jacksonian": 56,
    "Democrat": 19042,
    "Anti Jackson": 1,
    "Union Democrat": 1,
    "Conservative": 11,
    "Ind. Democrat": 39,
    "Independent": 32,
    "Law and Order": 3,
    "American": 84,
    "Liberty": 1,
    "Free Soil": 21,
    "Ind. Republican-Democrat": 129,
    "Ind. Whig": 2,
    "Unionist": 77,
    "States Rights": 3,
    "Anti-Lecompton Democrat": 8,
    "Constitutional Unionist": 2,
    "Independent Democrat": 1,
    "Unconditional Unionist": 35,
    "Conservative Republican": 3,
    "Ind. Republican": 22,
    "Liberal Republican": 13,
    "National Greenbacker": 28,
    "Readjuster Democrat": 2,
    "Readjuster": 6,
    "Union": 3,
    "Union Labor": 2,
    "Populist": 68,
    "Silver Republican": 9,
    "Free Silver": 1,
    "Silver": 1,
    "Democratic and Union Labor": 1,
    "Progressive Republican": 1,
    "Progressive": 43,
    "Prohibitionist": 3,
    "Socialist": 8,
    "Farmer-Labor": 31,
    "American Labor": 8,
    "Nonpartisan": 1,
    "Coalitionist": 7,
    "Popular Democrat": 16,
    "Liberal": 1,
    "New Progressive": 6,
    "Republican-Conservative": 1,
    "Democrat-Liberal": 1,
    "AL": 1,
    "Libertarian": 1
}