Skip to content

milliff/text-as-data

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Introduction to Text Analysis

MIT PML Workshops Spring 2021

Materials for the Spring 2021 MIT Political Methodology Lab "Introduction to Text Analysis" Workshop, taught by Andy Halterman and Aidan Milliff.

Contents

  • text_analysis.Rmd: Code (and explanation) for the text analysis demos. We cover 1) sentiment analysis using sentiment dictionaries and tidytext, 2) topic modeling with stm, and 3) regularized logit classification with glmnet.
  • stm.RData: Loads a fitted STM model to save us time (and keep results consistent) during the workshop.
  • text_analysis_slides.pdf: The slides!

Notably missing: train.csv, the data we use in the demos. Register here to get that file via email.

About

Materials for the Spring 2021 MIT Political Methodology Lab "Introduction to Text Analysis" Workshop

Topics

Resources

License

Stars

Watchers

Forks