Articles by Jason Timm

Partisan metrics: some notes

February 4, 2021 | Jason Timm

State legislative election results Summarizing election results Historical vote distributions Seats-votes curves Resources Some notes on mean-median & partisan bias scores, and building seats-votes curves using lower house state legislative election results in the USA from 1971-2018. Also a place to organize some different non-geographical approaches to identifying partisan gerrymandering – eg – ...
[Read more...]

Cracking and packing: a simple gerrymander simulation

February 3, 2021 | Jason Timm

A brief note on gerrymandering, and cracking and packing (see Warrington 2018 for a proper discussion). Specifically, a simple simulation demonstrating how gross partisan asymmetries in state legislatures can be crafted from perfectly symmetrical statewide populations. Per function below, we designate individuals in a population of N voters as either Republican ...
[Read more...]

media bias & shared news on Twitter

January 28, 2021 | Jason Timm

Introduction Tweet-set Media bias data set Resolving shortened URLs Shared news media sources Media bias & tSNE Resources Introduction This post provides a brief description of methods for quantifying political bias of online news media based on the media-sharing habits of US lawmakers on Twitter. I have discussed this set of ...
[Read more...]

twitter for historic memory

January 19, 2021 | Jason Timm

Thoughts Timeline content Automated tweet-sizing of a thought Hashtags sans supervision Posting thread using rtweet Summary Thoughts A previous post here detailed a simple function (from the uspols package) for extracting the timeline of the Trump presidency from Wikipedia. In this post, then, we turn this timeline into a Twitter ... [Read more...]

time-lining the Trump presidency

November 5, 2020 | Jason Timm

Introduction A simple function from the uspols package – dubbed uspols_wiki_timeline() – that scrapes Wikipedia’s Timeline of the Donald Trump presidency. Facilitating, among other things, the ability to hover over data points in a time series to see what the President was up to on any given day over ... [Read more...]

Open States data & the New Mexico State Senate

October 6, 2020 | Jason Timm

Intro NM State Senate Democrats Open-States Data DW-NOMINATE procedure Loss of the center Summary Intro So, a bit of a dust-up in the State Senate primaries in New Mexico over the summer. Progressives took aim at five Democratic members of a conservative coalition that has controlled the chamber since 2009. This ...
[Read more...]

mapping congressional roll calls

September 27, 2020 | Jason Timm

Introduction A bit of a depot for things-/methods- mapping with R & ggplot, in the context of visualizing historical roll calls from the US House of Representatives. Roll call data accessed via VoteView and the RVoteview package; shapefiles for historical US Congressional Districts downloaded from the Political Science Dept @ UCLA. ...
[Read more...]

margins-of-victory, voting behavior & re-election

August 9, 2020 | Jason Timm

Breifly VoteView & DW-NOMINATE Longest-serving members of the US House Longest-serving members & political ideology Longest-serving members & election margins Margins & ideology: the example of Frank Pallone, Jr. (NJ-06) A re-election model – logistic regression Thoughts Breifly In this post, we take a couple of different historical perspectives on the US House of Representatives, ...
[Read more...]

margins-of-victory, voting behavior & re-election

July 26, 2020 | Jason Timm

Breifly VoteView & DW-NOMINATE Longest-serving members of the US House Longest-serving members & political ideology Longest-serving members & election margins Margins & ideology: the example of Frank Pallone, Jr. (NJ-06) A re-election model – logistic regression Thoughts Breifly In this post, we take a couple of different historical perspectives on the US House of Representatives, ...
[Read more...]

evaluating vector space models with word analogies

July 25, 2020 | Jason Timm

Introduction Corpus & model Evaluation & analogy Experimental set-up Results: model parameters Results: analogy categories Visualizing vector offsets Summary & caveats References Introduction This post walks through corpus-based methods for evaluating the efficacy of vector space models in capturing semantic relations. Here we consider the standard evaluation tool for VSMs: the offset method ...
[Read more...]

the seven living generations in america

June 9, 2020 | Jason Timm

American generations Monthly US population estimates American population by generation American generations by age & race White America on the wane American generations in (apparent) time & space Summary American generations A quick look at the composition of American generations. Per Pew Research definitions & US Census data. In the process, a static ...
[Read more...]

covid19 & some computational-corpus linguistics

May 25, 2020 | Jason Timm

A COVID19 lexicon Congressional Twitter Corpus (2020) text2vec framework for NLP :: Tokens & tokenizers Multi-word expressions & controlled vocabularies DTMs & prevalence of COVID19-related concepts GloVe model & COVID19 semantic space Networks & lexical co-occurrence Summary A SHORT COURSE IN COMPUTATIONAL-CORPUS LINGUISTICS – using the R library text2vec – with a focus on working with (...
[Read more...]

a global pandemic on Twitter

March 27, 2020 | Jason Timm

Brief introduction Twitter details 2019 NOVEL CORONAVIRUS & lexical variation Patterns of variation over time Summary Brief introduction So, lots of linguistic variation happening in real time. coronavirus, covid19, pandemic, and more recently (the?) coronavirus pandemic. For sure, these expressions are not proper synonyms – each refer to different “aspects” of the virus. ...
[Read more...]

Political Ideology & Front-line House Democrats

March 15, 2020 | Jason Timm

Briefly Front-line House Democrats Ideologies in the 116th Focusing on Democrats Summary Briefly A quick look at the voting behavior of the 30 House Democrats that represent congressional districts carried by Trump in 2016 – relative to other House members. Using Rvoteview. For a more in-depth account of the characteristics of front-line House ...
[Read more...]

Modeling roll call voting behavior in the House of Representatives

February 10, 2020 | Jason Timm

Thoughts initial Data sets Modeling political ideology in the 116th House A final thought References Thoughts initial A brief (and copycat) go at modeling roll call voting behavior in the US House of Representatives using (1) constituency demographics, (2) house member party affiliation, and (3) house member characteristics. This post is based directly ...
[Read more...]

Twitter in collage: a year in the life of a freshman Congresswoman

January 4, 2020 | Jason Timm

Introduction A super simple post that summarizes R-based methods for visual summary & collage-building using image attachments on Twitter. In the process, a bit of a photo homage to Congresswoman Xochitl Torres Small in her first year representing New Mexico’s 2nd district.
if (!require("pacman")) install.packages("pacman")
pacman::p_load(tidyverse, rtweet, tigris) 
options(tigris_use_cache = TRUE, tigris_class = "sf")
New Mexico’s 2nd District The 2nd ...
[Read more...]

front-line house democrats: a quick guide

December 12, 2019 | Jason Timm

House & presidential election returns Trump margins in 2016 Flipped House Districts from 2016 to 2018 The 31 House Democrats in Trump-supportive districts A quick geographical perspective The 13 House Democrats in solid Trump districts Voting patterns in presidential elections Voting patterns for the 31 Trump-House Dem districts The 5 House Democrats that should probably vote against impeachment ...
[Read more...]

The politics of New Mexico: a brief historical-visual account

October 23, 2019 | Jason Timm

New Mexico demographics via tidycensus 2016 Presidential Election Presidential elections in New Mexico historically New Mexico as bellwether? Congressional delegation historically New Mexico State Government Summary In this post, we piece together a brief political history of New Mexico using a host of data sources, including Wikipedia, the US Census, the ...
[Read more...]
1 2

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)