Articles by Jason Timm

article extraction, doc2vec & health news coverage in online media

August 25, 2021 | Jason Timm

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 article metadata ... [Read more...]

census 2020: some quick visuals of demographic change

August 12, 2021 | Jason Timm

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 ...
[Read more...]

visualizing topic models with crosstalk

July 12, 2021 | Jason Timm

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 cor... [Read more...]

BERT, reticulate & lexical semantics

July 8, 2021 | Jason Timm

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 contexts extracted ... [Read more...]

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...]
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)