Publications by Jason Timm

twitter for historic memory

19.01.2021

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 bot – one tha...

4387 sym R (3754 sym/14 pcs) 2 tbl

media bias & shared news on Twitter

28.01.2021

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 methods in a previo...

4003 sym R (4328 sym/13 pcs) 4 img 2 tbl

Cracking and packing: a simple gerrymander simulation

03.02.2021

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 e...

3344 sym R (2459 sym/6 pcs) 6 img 2 tbl

Partisan metrics: some notes

04.02.2021

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 appro...

4481 sym R (3942 sym/11 pcs) 8 img 3 tbl

Some computational redistricting methods: or, how to sniff out a gerrymander in a pinch

14.02.2021

Statewide historical election data New Mexico State Senate Building an ensemble Partition ensemble & historical votes Results Summary References The last in a series of notes on gerrymandering & R. Here, an R-based appendix – of sorts – for a collection of computational redistricting methods (Ben Fifield et al. 2020; Benjamin Fifield, Higgin...

10366 sym R (9404 sym/26 pcs) 16 img 3 tbl

BERT, reticulate & lexical semantics

08.07.2021

Intro This post provides some quick details on using reticulate to interface Python from RStudio; and, more specifically, using the spacy library and BERT for fine-grained lexical semantic investigation. Here we present a (very cursory) usage-based/BERT-based perspective on the semantic distinction between further and farther, using example conte...

3155 sym R (2885 sym/11 pcs)

visualizing topic models with crosstalk

12.07.2021

Introduction A simple post detailing the use of the crosstalk package to visualize and investigate topic model results interactively. As an example, we investigate the topic structure of correspondences from the Founders Online corpus – focusing on letters generated during the Washington Presidency, ca. 1789-1787. Founders Online corpus librar...

2413 sym R (2908 sym/9 pcs)

census 2020: some quick visuals of demographic change

12.08.2021

Intro A quick/simple post: using the PL94171 package to access Census 2020 counts. Census data won’t be API-accessible until ~late September; these data are available, however, for redistricting purposes – albeit in a funky format. The PL94171 package can be used to download and re-structure these files for super convenient use. (!) Some qui...

1468 sym R (2246 sym/8 pcs) 4 img 2 tbl

article extraction, doc2vec & health news coverage in online media

25.08.2021

Introduction This post demonstrates a simple procedure for extracting articles from online news sources using the quicknews package. We also demonstrate methods for entity extraction based on a controlled vocabulary (here, the MeSH thesaurus & hierarchically-organized vocabulary), as well as a quick implementation of a doc2vec model. Gather art...

3776 sym R (5843 sym/16 pcs)

Referring to American Presidents

07.12.2021

Introduction In a previous post, I looked at how House Representatives referred to the 45th US President on Twitter during the 116th Congress. Variation was super interesting, and demonstrated (in part) that party affiliation influenced how House members referred to 45. Namely, Republicans more frequently used referring expressions that highlight...

7013 sym R (4761 sym/12 pcs) 6 img 3 tbl