A method to download Department of Education College Scorecard data using the public API < https://collegescorecard.ed.gov/data/documentation/>. It is based on the 'dplyr' model of piped commands to select and filter data in a single chained function call. An API key from the U.S. Department of Education is required.
'latest'rather than 2013. With continued data updates, this makes more sense than keeping an old year. Existing scripts that relied on the default for data from 2013 will need to be updated.
yearcolumn will be a character column with
latestas the value when the most recent data are choosen. The College Scorecard doesn't clearly note which data are the latest, so I have left the string. When building a panel dataset across multiple years, it will be best to use numeric year values for all years so that the resulting tibbles can be bound together cleanly.
matches()should now be available.
sc_filter_(), which allow users to select and filter variables using strings stored in environment variable
sc_zip()to take zip codes that start with zero (h/t @nateaff), either with string value or by returning leading zeros to numeric values that R drops
httrto make call rather than
jsonlitedirectly) in order to improve parsing on bad lines
sc_get()so that the API URL string could be returned when debugging call
ceiling()so that it doesn't make unnecessary API request/pull (h/t @jjchern)
sc_filter()to use subset object vectors
sc_filter()to use vectors stored in objects
sc_dict()to search all columns by default
sc_dict()bug that wouldn't allow for search by developer friendly names