Use new latest
value when gathering College Scorecard API data
#339
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The College Scorecard API now offers a
latest
parameter to fetchthe most recent data available, which is a big improvement over
the former guessing game.
This allows us to ditch the former requirement of specifying
new values for API_year and Salary_year via the Django admin.
Changes in
/data_sources/
and/fixtures/
are reference filesfor data provenance.
Testing
You can use the standalone setup to run the script against a single school.
You will need an API key from the Dept. of Education for the command to succeed.
Standalone setup
Check out this branch and run the standalone setup script. This takes about 3 minutes.
Fire up runserver and call up the API values for a single school. It helps to use a json viewing plugin for your browser, such as Chrome's JSONView.
http://localhost:8000/paying-for-college2/understanding-your-financial-aid-offer/api/school/155317/
Testing a full run of the script can take a half-hour or so.
Note