code

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.

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.