Skip to main content
Use this when you are updating existing metrics (same schema, newer values).

Goal

Generate fresh processed data and publish it so visualWeb immediately reads it from visualsApi.

Required output bundle

The API expects this structure under public/data:
  • yearly/<year>.json for every year in scope
  • columnar/*.npy files
  • columnar/metadata.json
  • columnar/fips_order.json
  • fips_lookup.json
  • us_counties.geojson

Step 1: Regenerate processed files

From the TSAM pipeline:
This writes to: /Users/columbus/Development/idopt/matlabtoPythonTask/TSAMWPScripts/data_server/processed

Step 2: Copy into visualsApi

Step 3: Quick API checks

In another terminal:

Step 4: Quick frontend check

Move the year slider and metric selector to verify map updates and tooltip values.

Step 5: Commit and push

Data file updates should be committed in:
  • visualsApi for public/data/*
  • visualWeb only if frontend logic changed

Step 6: Deploy API

Production endpoint: https://api.idoptlab.com/api

Common gotchas

  • Keep FIPS as zero-padded 5-character strings.
  • Keep metadata.json years and metric names aligned with files that exist.
  • If any metric key name changes, update frontend mappings (see New Metric Checklist).