Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new latest value when gathering College Scorecard API data #339

Merged
merged 4 commits into from
Mar 27, 2019

Conversation

higs4281
Copy link
Member

@higs4281 higs4281 commented Nov 8, 2018

The College Scorecard API now offers a latest parameter to fetch
the 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 files
for 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.

./standalone_setup.sh

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.

unset DJANGO_SETTINGS_MODULE
./manage.py runserver
ED_API_KEY=[KEY] ./manage.py update_via_api --school_id 155317
  • You should get an echo indicating the University of Kansas was updated. You can confirm this in the API responses.
  • Refresh one of the API tabs, then flip between tabs to compare. You should see updated values for
    • gradRate
    • medianMonthlyDebt
    • medianTotalDebt
    • repay3yr
    • tuitionUnderInS
    • tuitionUnderOoss

Testing a full run of the script can take a half-hour or so.

ED_API_KEY=[KEY] ./manage.py update_via_api

Note

  • This version of the update script was used to process the 2018 Scorecard data.

The College Scorecard API now offers a `latest` parameter to fetch
the most recent data available, which is a big improvement over
the former guessing game.

This also allows us to ditch the former requirement of specifying
a new API_year value each year via the Django admin.
The College Scorecard API now offers a `latest` parameter to fetch
the most recent data available, which is a big improvement over
the former guessing game.

This also allows us to ditch the former requirement of specifying
a new API_year value each year via the Django admin.

Changes in `/data_sources/` and `/fixtures/` are reference files
for data provenance.
@coveralls
Copy link

coveralls commented Nov 8, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling b340f0c on use-latest-for-api into 642bb7f on master.

Copy link

@Scotchester Scotchester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing instructions work as expected!

@higs4281 higs4281 merged commit 983dbe1 into master Mar 27, 2019
@higs4281 higs4281 deleted the use-latest-for-api branch March 27, 2019 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants