Skip to content

Instantly share code, notes, and snippets.

Jay Ulfelder ulfelder

Block or report user

Report or block ulfelder

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View womens_march_attendance_2017.R
# metadata
data_source <- ""
data_collectors <- "Jeremy Pressman (@djpressman, U of Connecticut) and\nErica Chenoweth (@EricaChenoweth, U of Denver)"
code_gist <- ""
# ------------------------------------------------------------------------
# read in data from google sheets to get a data frame
ulfelder / freedomintheworld.converter
Last active Apr 20, 2016
Converts Freedom House's Freedom in the World data into standard country-year structure for time-series cross-sectional analysis.
View freedomintheworld.converter
# This script converts Freedom House's annual Freedom in the World data from
# the ugly, table-like Excel format in which it's posted into a data frame in R.
# It is set up to work on future updates, too, and should automatically adjust
# as years or countries are added.
# Before running this script:
# 1. Open a browser & go to
# 2. Download the file "Country ratings and status, FIW 1973-2013(EXCEL)"
ulfelder / gdelt.atrocities.daily.screen
Created May 30, 2013
R script for a human-assisted process to screen GDELT for atrocities
View gdelt.atrocities.daily.screen
# Clear the workspace
# Set working directory to location of extracted daily update and .txt file with column headers
# Load function to return subset involving violence against civilians
extractor <- function(date) {
filename <- paste(date,"export.csv", sep=".")
dailies <- read.delim(filename, header=FALSE)
ulfelder / gdelt.atrocities.explore
Last active May 31, 2016
R code for selecting events from GDELT files that look like they might be atrocities (i.e., lethal violence against civilians), summing them by location, and mapping them.
View gdelt.atrocities.explore
# Housekeeping: clear workspace and load packages
# Load 2011 GDELT data from
You can’t perform that action at this time.