data

Data Blogging with R

Start a data blog to win friends and influence people

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.

Slides

In one week, you'll publish your first data-driven blog post — and gain your first readers. Guaranteed.

Inequality and the Pacification of Militant Protest in the United States, 1919-2012

To generate the graph below, you need two data files. The first is yearly income decile data from Piketty (2014), which should be named “Inequality_USA.csv.” The second is the Cross-National Time-Series data from Banks and Wilson (2017), which should be called “2017 Edition CNTSDATA.csv.” Finally, the code snippet below should be in a file called “Baron_et_al-ISQ.R” — that will be an R script that compiles the two datasets before producing the figure from our article.

The Alt-Right is not all Right: On the ideology of Kekistan

Kekistan is mostly right-wing, but with a "long tail" of centrists and leftists. The number one issue priority of Kekistanis is free speech, and Kekistani public opinion includes a large number of contradictory interests each belonging to a small number of people. There is some racism in Kekistan, but that's also in the long-tail, with many other random topics such as cryptocurrency, atheism, anime, Christianity, and AI.

Who’s afraid of free speech in the United States?

The pushback against political correctness has led to overly hasty generalizations about leftist opposition to free speech. Survey data tell some surprising stories.

The moral foundations of social justice warriors

Are Social Justice Warriors a real ideological faction of the Left, with a unique moral psychology? The first in a multi-part series using 'big data' to understand obscure ideological subcultures.

Data appendix on global rioting dynamics

Supplementary information for my article on the hidden decline of rioting.

Who are Jordan Peterson’s followers?

An academic psychologist is connecting left-libertarians and Trump supporters.