Skip to content

Refreshing analytics data

Analytics data is precomputed on a materialized view to speed up database queries. The tradeoff with this approach is that the view isn't constantly up to date with emissions data.

To update the analytics view data, follow these steps:

  1. Log in Django admin.
  2. Navigate to Emission Analytics -> Aggregated Emissions. image
  3. Click on Refresh Data. The data will refresh on the foreground and will take a few seconds (10~15s).

The materialized view *needs to be refreshed when these happen:

  1. Area presets are added or modified. This needs to be triggered after the presets are computed.
  2. New emission data is added, but you need to see results fast (there's a cron job that runs once a day already).