This is once again a fairly open-ended Data Challenge, where you’ll be demonstrating your ability to examine a dataset and then, most importantly, thoughtfully visualize some information from it.
You will be working with data from the Public Plans Database (PPD), which was compiled by Boston College’s Center for Retirement Research. Our dataset contains plan-level data from 2001 to 2018 for 180 state and local pension plans.
The requirements for this Challenge are threefold:
For each visualization, include any R code necessary to create either the visualization or the subset of data used in the visualization.
You can download an abridged copy of this notebook (to make getting started easier) by clicking here.
The complete dataset may be loaded with the following code:
library(tidyverse)
ppd <- read_csv("http://projects.rodrigozamith.com/datastorytelling/data/public_plans_database.csv", guess_max=3000)
That dataset has a large number of variables (270!), some of which can be difficult to decipher from the variable name alone. Thankfully, they provide detailed and helpful data documentation. I highly recommend reviewing that before playing with the data.
Here are some useful functions to help with this Challenge:
write_csv()
– Use this function to export a dataframe you’ve created to a CSV file, which you can use to load information into another visualization tool. Here’s a helpful video tutorial for how to use that simple function.
spread()
and gather()
– Use these functions to reshape a dataframe, going from either long form to wide form (spread()
) or vice versa (gather()
). You may need to do this to produce a CSV file that matches a program’s expectations. (For example, Infogram likes its data in wide format for a line chart.) Here’s a helpful video tutorial to illustrate how these two functions work.
Include a link to your visualization here. (Make sure you can also view it in your browser’s private browsing mode.)
Include all of the code used to create that visualization:
# Your code here
Please explain your objective and rationale here, per the Challenge instructions.
Include a link to your visualization here. (Make sure you can also view it in your browser’s private browsing mode.)
Include all of the code used to create that visualization:
# Your code here
Please explain your objective and rationale here, per the Challenge instructions.