What we need to do is import the data for all the years from 2003 through 2012 and extract data for the county-level (agglvl_code==70) average annual pay (avg_annual_pay) for each county, plot it, and then string the pay values together in an animation. Since we basically need to do the same thing for each year's data, we can do this in a for loop, and we can create functions to encapsulate the repeated actions. We start by writing code for a single year, performing the following steps:
- We import the data from the ZIP file that we call zipfile in this prototype code. In reality, the filenames are of the pattern 2003_annual_singlefile.zip, and the CSV files in them are of the pattern 2003.annual.singlefile.csv. We will use ...