Note that all references to scorecard data can be ignored if you are not running the ACLU instance of the Elections API, since that part depends on a private data repo.
Once a given legislator leaves office the following things should happen:
- Update the
congress_legislators
source (delete thecongress_legislators
directory and then runmake congress_legislators
from the sources folder), assuming the unitedstates source repo is updated - Update the
data
records:python scripts/data_congress_legislators.py
- Commit/push any changed JSON records
- Update the current scorecard spreadsheet
- Run
make
fromelections-api-private
to download the scorecard CSVs - Run the following commands locally, from the elections-api root:
make congress_legislators make congress_details make congress_scores
- From the product-dev-ops directory, deploy to staging:
./scripts/api-deploy.sh elections-stg "make congress_legislators && make congress_details && make congress_scores"
- If things look okay on staging, deploy it on production:
./scripts/api-deploy.sh elections "make congress_legislators && make congress_details && make congress_scores"
- Update the "Congress Legislator Details" spreadsheet
- Download the CSV and save it as
sources/aclu/aclu_[chamber]_[session].csv
(depending on the current session and whether the legislator is a House Rep or a Senator) - Run the following commands locally, from the elections-api root:
make congress_details make congress_scores
- From the product-dev-ops directory, deploy to staging:
./scripts/api-deploy.sh elections-stg "make congress_details && make congress_scores"
- If things look okay on staging, deploy it on production:
./scripts/api-deploy.sh elections "make congress_details && make congress_scores"
You might be wondering, "why should we make congress_scores
if this is only updating the details spreadsheet? The reason is that we store some aggregate scorecard data in the details table, so that means rebuilding the details table will erase all those scorecard-related values.