Repository navigation
Archiving
This guide is for dashboard admins who manage study waves (experiments) and need clean counts for the current study—submitted reports, trending graphs, and CSV exports—without mixing in older data.
Agency users do not use these controls. Their home page, graphs, and report list automatically show only non-archived reports for the active experiment assigned to their agency.
For developers and research scripts, see Technical Documentation (section “Experiment cohorts and archive”).
| Term | Meaning |
|---|---|
| Study wave / experiment | A labeled cohort of reports (e.g. 2026-main). Each report has an experimentId. |
| Active experiment | The wave used for new submissions and for graphs / metrics on the home page. |
| Archived | Older reports hidden from day-to-day work. Data stays in Firestore; nothing is deleted. |
| Piped / scraped articles | Reports submitted automatically (origin = scraped). Counted separately in experiment metrics. |
- Log in as an admin (not agency-only).
- Open Settings from the side navigation.
- Use the Experiment & archive section at the top of Settings.
On the home reports table, admins also have a Show archived checkbox next to the read/unread filters. That only affects the list (and CSV export)—not the overview pie charts or comparison graph, which always use the active experiment and non-archived reports.
| Area | What you see |
|---|---|
| Overview & comparison graphs | Active experiment, non-archived reports only. |
| Admin reports list (default) | All study waves, non-archived only. |
| Admin reports list + “Show archived” | All study waves, including archived rows. |
| Agency reports list | Active experiment, non-archived, that agency only. |
| CSV export (admin) | Same rows as the current list filters (including search/filters), not the entire database. |
Do this when you want dashboards and exports to reflect a new period without deleting old reports.
In Experiment & archive:
- Use Add study wave if the new wave is not in the dropdown yet (id like
2027-main, human-readable label). - Choose Active experiment and click Save active experiment.
New reports created from the dashboard or public report flow are tagged with this active id.
If reports were created before archiving existed, run Initialize experiment fields once. It sets missing archived / experimentId values using each report’s created date (older dates map to older cohorts such as 2024-pilot, 2025-main, then the current active wave).
Confirm in the browser when prompted. Prefer running this on the emulator or staging before production.
When prior-wave reports should disappear from default lists and graphs:
- Set Archive cutoff date (e.g. first day of the new calendar year for the new wave).
- Click Preview archive count and check the number.
- Click Archive before cutoff and confirm.
This marks every non-archived report with createdDate before that date as archived. Archived reports remain in the database for research access.
Default cutoff in the app is aligned with project config (2026-01-01 unless changed in code). Pick the date that matches your study design, not necessarily January 1.
The panel shows Current cohort metrics for the selected experiment: submitted count and scraped/piped count. Refresh by changing the active experiment dropdown or after a bulk archive.
- Leave Show archived unchecked for normal operations.
- Check it to audit or export rows that were bulk-archived. Archived rows may show an archived indicator in the table when implemented.
Graphs on the home page do not include archived data when this box is checked.
- They cannot change the active experiment or run bulk archive.
- If counts look “low” after a rollover, that is expected: older archived reports are excluded from their view.
- Direct links to an old report id may still open the detail page; admins may see that the report is archived.
- Bulk archive is irreversible from the UI (there is no “unarchive all” button). Restoring archived status requires a developer or Firestore admin.
- Always preview before archiving on production.
- Run Initialize experiment fields only once per environment unless your team documents a repeat run.
- After changing production data, tell anyone pulling external spreadsheets or scripts to filter
archived == falseand the correctexperimentId(see technical documentation).
| Task | Where |
|---|---|
| Set active study wave | Settings → Experiment & archive |
| Add a new wave | Settings → Experiment & archive → Add study wave |
| Hide old reports by date | Settings → Preview → Archive before cutoff |
| Fix old documents missing fields | Settings → Initialize experiment fields |
| Include archived in table/export | Home → reports → Show archived |
| Developer / API details | Technical Documentation |