resources

Make interactive graphs of financial time-series in five minutes with R (Bitcoin example)

We’ll use two packages: The package Quandl for programmatically accessing a variety of financial time-series, and the package dygraphs for lovely interactive graphs based on the eponymous Javascript library. If you don’t already have them, install them. Below, we load the packages and run a search through the Quandl database to see what kind of variables we have to choose from. Feel free to explore your own interests and run the following example on a different variable.

How to make beautiful county maps of the US

First, you need to obtain an API key — it’s quick and easy. Go here, fill in the short form, and they’ll give you one immediately. You need to plug in your API key where you see XXXXXX below. To find variables of interest, I recommend the Census website’s advanced search. require(tidycensus) require(tidyverse) require(viridis) # Plug in your API key where the X's are; then uncomment that line. # census_api_key("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") ################################# ## Using the tidycensus package ################################# us.

Graph of economic growth and democracy across countries over time

Economic growth and democracy Marshall, Monty G, Keith Jaggers, and Ted Robert Gurr. 2011. Polity IV Project: Political Regime Characteristics and Transitions, 1800-2010. Center for Systemic Peace. Bolt, J. 2013. “The First Update of the Maddison Project; Re-Estimating Growth Before 1820.” Maddison Project Working Paper 4. http://www.ggdc.net/maddison.

Slides on 'Democracy' as propaganda for capitalism

Resisting the conventional wisdom that propaganda is mostly associated with authoritarian governments, these slides sketch how the liberal, capitalist government of the United States at the time of World War I exploited the concept of “Democracy” in what would become perhaps the most remarkable propaganda achievement in modern history. Includes photos, videos, historical data from Google Books, and a discussion of some recent research suprisingly consistent with this argument.

Generating summary statistics and box/violin plots in R

Start a basic data analysis with real data in R.

A quick-start guide to the statistical analysis of political attitudes and behaviors

Code and instructions to analyze the Eurobarometer using R.

Intro to R for graduate students

This document demonstrates how to perform several routine tasks in the analysis of state-level economic and political data for multiple countries over time, using the programming language R.