feat: add static analytics site generator for all data-browser apps#4789
feat: add static analytics site generator for all data-browser apps#4789
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a reusable static analytics site generator to the shared analytics Python package and wires it up with per-app scripts so each data-browser app can generate a static HTML GA4 dashboard with minimal configuration.
Changes:
- Introduce
analytics.static_sitesubpackage to fetch GA4 data, optionally resolve entity titles, and export a static dashboard (HTML template + JSON data). - Add per-app
generate_static_site.pyscripts (AnVIL Explorer/Catalog, HCA Explorer, LungMAP) with branding + custom event configuration. - Update
.gitignoreand report-month constants for March 2026.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| analytics/lungmap-analytics/sheets/generate_static_site.py | New LungMAP static site generation script with Azul project title resolution (catalog=lm10) and custom export events. |
| analytics/lungmap-analytics/sheets/constants.py | Updates reporting month/folder constants. |
| analytics/hca-explorer-sheets/generate_static_site.py | New HCA static site generation script with Azul project title resolution and custom export events. |
| analytics/hca-explorer-sheets/constants.py | Updates reporting month/folder constants. |
| analytics/anvil-explorer-sheets/utils.py | Minor cleanup in dataset title map pagination logic. |
| analytics/anvil-explorer-sheets/generate_static_site.py | New AnVIL Explorer static site generation script with dataset title enrichment and access-request tracking. |
| analytics/anvil-explorer-sheets/constants.py | Updates reporting month/folder constants. |
| analytics/anvil-catalog-sheets/generate_static_site.py | New AnVIL Catalog static site generation script (minimal config + filter_selected). |
| analytics/anvil-catalog-sheets/constants.py | Updates reporting month/folder constants. |
| analytics/analytics_package/setup.py | Packages the new analytics.static_site module and HTML template data. |
| analytics/analytics_package/analytics/static_site/template/index.html | New config-driven dashboard template (Chart.js charts + tables). |
| analytics/analytics_package/analytics/static_site/resolve.py | New catalog API resolver utilities (UUID → title, detail-record enrichment). |
| analytics/analytics_package/analytics/static_site/generator.py | New orchestration entry point for generating the site (fetch → resolve → copy template → export). |
| analytics/analytics_package/analytics/static_site/fetch.py | New GA4 fetch layer for traffic/pageviews/outbound/filters/sessions/engagement/custom events/downloads/access requests. |
| analytics/analytics_package/analytics/static_site/export.py | New JSON export layer for the static dashboard data files. |
| analytics/analytics_package/analytics/static_site/init.py | Exposes generate_site and resolver helpers as the public API. |
| analytics/analytics_package/analytics/static_site/README.md | Usage and architecture documentation for the generator. |
| .gitignore | Ignores generated site/ outputs, .credentials/, and egg-info directories. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds a shared static-site generator to the analytics Python package to produce app-specific, config-driven HTML analytics dashboards (Chart.js + findable-ui CSS) from GA4 data, with per-app entrypoint scripts for the supported data-browser apps.
Changes:
- Introduces
analytics.static_site(fetch/export/generator + HTML template + title-resolution helpers) and wires it into packaging. - Adds per-app
generate_static_site.pyscripts (AnVIL Explorer, AnVIL Catalog, HCA Explorer, LungMAP) with branding + custom event configuration + entity title resolution. - Updates report-month constants and ignores generated site output and credentials in
.gitignore.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| analytics/lungmap-analytics/sheets/generate_static_site.py | New LungMAP static-site generation script with Azul project title resolution (catalog=lm10). |
| analytics/lungmap-analytics/sheets/constants.py | Updates LungMAP report month/folder constants. |
| analytics/hca-explorer-sheets/generate_static_site.py | New HCA Explorer static-site generation script with Azul project title resolution. |
| analytics/hca-explorer-sheets/constants.py | Updates HCA report month/folder constants. |
| analytics/anvil-explorer-sheets/utils.py | Minor tweak in dataset title map pagination code. |
| analytics/anvil-explorer-sheets/generate_static_site.py | New AnVIL Explorer static-site generation script with dataset title resolution + access request tracking. |
| analytics/anvil-explorer-sheets/constants.py | Updates AnVIL Explorer report month/folder constants. |
| analytics/anvil-catalog-sheets/generate_static_site.py | New AnVIL Catalog static-site generation script. |
| analytics/anvil-catalog-sheets/constants.py | Updates AnVIL Catalog report month/folder constants. |
| analytics/analytics_package/setup.py | Packages analytics.static_site, includes template HTML, adds requests dependency. |
| analytics/analytics_package/analytics/static_site/template/index.html | New config-driven dashboard template (charts, tables, custom event sections). |
| analytics/analytics_package/analytics/static_site/resolve.py | New helpers to resolve UUIDs to titles via catalog APIs and enrich detail records. |
| analytics/analytics_package/analytics/static_site/generator.py | New orchestrator to fetch GA4 data, optionally resolve titles, export JSON, and write site. |
| analytics/analytics_package/analytics/static_site/fetch.py | New GA4 fetching logic for traffic/pageviews/outbound/filters/sessions/events/downloads/access requests. |
| analytics/analytics_package/analytics/static_site/export.py | New JSON export helpers for the template’s site/data/*.json inputs. |
| analytics/analytics_package/analytics/static_site/init.py | Exposes public static-site API (generate_site, title resolution helpers). |
| analytics/analytics_package/analytics/static_site/README.md | Usage and architecture documentation for the generator and per-app scripts. |
| .gitignore | Ignores generated site/ output, egg-info, and .credentials/. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds a shared static analytics dashboard generator to the analytics Python package and wires it up with per-app entrypoint scripts so each data-browser app can generate a branded, static HTML site from GA4 data.
Changes:
- Introduces
analytics.static_site(fetch/export/generator/title-resolution) plus a Chart.js-based HTML template. - Adds per-app
generate_static_site.pyscripts (AnVIL Catalog/Explorer, HCA Explorer, LungMAP) with branding + event configuration. - Updates packaging (
setup.py) and repo hygiene (.gitignore) to support distribution and local site output.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| analytics/lungmap-analytics/sheets/generate_static_site.py | New LungMAP static-site generator script with Azul project title resolution + custom events. |
| analytics/lungmap-analytics/sheets/constants.py | Updates report month/folder constants. |
| analytics/hca-explorer-sheets/generate_static_site.py | New HCA static-site generator script with Azul project title resolution + custom events. |
| analytics/hca-explorer-sheets/constants.py | Updates report month/folder constants. |
| analytics/anvil-explorer-sheets/utils.py | Minor change in dataset title map fetch loop. |
| analytics/anvil-explorer-sheets/generate_static_site.py | New AnVIL Explorer static-site generator script with dataset title enrichment + access request tracking. |
| analytics/anvil-explorer-sheets/constants.py | Updates report month/folder constants. |
| analytics/anvil-catalog-sheets/generate_static_site.py | New AnVIL Catalog static-site generator script (minimal config + filter_selected). |
| analytics/anvil-catalog-sheets/constants.py | Updates report month/folder constants. |
| analytics/analytics_package/setup.py | Packages analytics.static_site, includes template HTML, adds requests dependency. |
| analytics/analytics_package/analytics/static_site/template/index.html | New static dashboard template (config-driven, loads JSON outputs, renders charts/tables). |
| analytics/analytics_package/analytics/static_site/resolve.py | New helpers to fetch entity title maps and enrich exported detail records. |
| analytics/analytics_package/analytics/static_site/generator.py | New top-level orchestration for fetch → optional title resolution → export → template copy. |
| analytics/analytics_package/analytics/static_site/fetch.py | New GA4 data collection for charts/tables/custom events/file downloads/access requests. |
| analytics/analytics_package/analytics/static_site/export.py | New JSON export for all dashboard inputs + meta/config. |
| analytics/analytics_package/analytics/static_site/init.py | Exposes generate_site and title-resolution helpers. |
| analytics/analytics_package/analytics/static_site/README.md | New usage and architecture documentation. |
| .gitignore | Ignores generated site/, .egg-info/, and .credentials/. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1de6010 to
1cc36f1
Compare
There was a problem hiding this comment.
Pull request overview
Adds a reusable static-site analytics dashboard generator to the shared analytics package and wires it up for each data-browser app via per-app generate_static_site.py entrypoints.
Changes:
- Introduces
analytics.static_sitesubpackage to fetch GA4 data, export JSON artifacts, and copy a static HTML/Chart.js dashboard template. - Adds per-app static site generation scripts for AnVIL Explorer, AnVIL Catalog, HCA Explorer, and LungMAP with app-specific branding and event configuration.
- Updates packaging (
setup.py) and repo hygiene (.gitignore) to support the new package and generated site outputs.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| analytics/lungmap-analytics/sheets/generate_static_site.py | Adds LungMAP static site generation script and title resolution via Azul (catalog=lm10). |
| analytics/lungmap-analytics/sheets/constants.py | Updates report month/folder constants. |
| analytics/hca-explorer-sheets/generate_static_site.py | Adds HCA static site generation script and title resolution via Azul projects endpoint. |
| analytics/hca-explorer-sheets/constants.py | Updates report month/folder constants. |
| analytics/anvil-explorer-sheets/utils.py | Minor change in dataset title map pagination handling (comment removal). |
| analytics/anvil-explorer-sheets/generate_static_site.py | Adds AnVIL Explorer static site generation script with dataset title resolution and access-request tracking. |
| analytics/anvil-explorer-sheets/constants.py | Updates report month/folder constants. |
| analytics/anvil-catalog-sheets/generate_static_site.py | Adds AnVIL Catalog static site generation script (minimal config). |
| analytics/anvil-catalog-sheets/constants.py | Updates report month/folder constants. |
| analytics/analytics_package/setup.py | Packages analytics.static_site, includes template HTML, adds requests dependency. |
| analytics/analytics_package/analytics/static_site/template/index.html | Adds the static dashboard HTML + JS renderer (fetches exported JSON and renders charts/tables). |
| analytics/analytics_package/analytics/static_site/resolve.py | Adds API-backed entity title resolution and in-memory enrichment for detail tables. |
| analytics/analytics_package/analytics/static_site/generator.py | Adds orchestration entrypoint generate_site() (fetch → enrich → copy template → export). |
| analytics/analytics_package/analytics/static_site/fetch.py | Adds GA4 fetching logic for monthly traffic, tables, custom events, downloads, and access requests. |
| analytics/analytics_package/analytics/static_site/export.py | Adds JSON export logic for the dashboard’s site/data/*.json files. |
| analytics/analytics_package/analytics/static_site/init.py | Exposes the public static-site generator API. |
| analytics/analytics_package/analytics/static_site/README.md | Documents how to install and generate per-app static sites. |
| .gitignore | Ignores generated site/ directories, egg-info, and local .credentials/. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1433ba1 to
7d8258a
Compare
There was a problem hiding this comment.
Pull request overview
Adds a reusable static analytics dashboard generator to the shared analytics Python package and publishes generated dashboards to GitHub Pages for multiple data-browser apps.
Changes:
- Introduces
analytics.static_site(fetch/export/resolve + HTML template) to generate static GA4 dashboards. - Adds per-app
generate_static_site.pyscripts (AnVIL Explorer, AnVIL Catalog, HCA Explorer, LungMAP) plus updated constants. - Adds a
gh-pages/deployment workflow and generatedgh-pages/site artifacts for deployment.
Reviewed changes
Copilot reviewed 55 out of 59 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| gh-pages/index.html | Landing page linking to deployed app analytics dashboards |
| gh-pages/anvil-explorer/index.html | Generated static dashboard HTML for AnVIL Explorer |
| gh-pages/anvil-explorer/data/outbound_links.json | Generated outbound-link metrics for AnVIL Explorer |
| gh-pages/anvil-explorer/data/monthly_traffic.json | Generated monthly traffic metrics for AnVIL Explorer |
| gh-pages/anvil-explorer/data/meta.json | Generated metadata (report bounds, sessions, engagement) for AnVIL Explorer |
| gh-pages/anvil-explorer/data/file_downloads.json | Generated file download detail data for AnVIL Explorer |
| gh-pages/anvil-explorer/data/event_dataset_file_manifest_requested_detail.json | Generated detail table for manifest-request event (AnVIL Explorer) |
| gh-pages/anvil-explorer/data/event_dataset_bulk_download_requested_detail.json | Generated detail table for bulk-download event (AnVIL Explorer) |
| gh-pages/anvil-explorer/data/event_dataset_analyze_in_terra_requested_detail.json | Generated detail table for Terra-export event (AnVIL Explorer) |
| gh-pages/anvil-explorer/data/custom_events.json | Generated custom event rollups for AnVIL Explorer |
| gh-pages/anvil-explorer/data/config.json | Generated dashboard branding/config for AnVIL Explorer |
| gh-pages/anvil-explorer/data/access_requests.json | Generated access-request tracking data for AnVIL Explorer |
| gh-pages/hca-explorer/index.html | Generated static dashboard HTML for HCA Explorer |
| gh-pages/hca-explorer/data/monthly_traffic.json | Generated monthly traffic metrics for HCA Explorer |
| gh-pages/hca-explorer/data/meta.json | Generated metadata (report bounds, sessions, engagement) for HCA Explorer |
| gh-pages/hca-explorer/data/file_downloads.json | Generated file download detail data for HCA Explorer |
| gh-pages/hca-explorer/data/event_dataset_file_manifest_requested_detail.json | Generated detail table for manifest-request event (HCA Explorer) |
| gh-pages/hca-explorer/data/event_dataset_analyze_in_terra_requested_detail.json | Generated detail table for Terra-export event (HCA Explorer) |
| gh-pages/hca-explorer/data/custom_events.json | Generated custom event rollups for HCA Explorer |
| gh-pages/hca-explorer/data/config.json | Generated dashboard branding/config for HCA Explorer |
| gh-pages/lungmap/index.html | Generated static dashboard HTML for LungMAP |
| gh-pages/lungmap/data/pageviews.json | Generated pageview metrics for LungMAP |
| gh-pages/lungmap/data/outbound_links.json | Generated outbound-link metrics for LungMAP |
| gh-pages/lungmap/data/monthly_traffic.json | Generated monthly traffic metrics for LungMAP |
| gh-pages/lungmap/data/meta.json | Generated metadata (report bounds, sessions, engagement) for LungMAP |
| gh-pages/lungmap/data/filter_selected.json | Generated filter-selection event metrics for LungMAP |
| gh-pages/lungmap/data/file_downloads.json | Generated file download detail data for LungMAP |
| gh-pages/lungmap/data/event_dataset_file_manifest_requested_detail.json | Generated detail table for manifest-request event (LungMAP) |
| gh-pages/lungmap/data/event_dataset_bulk_download_requested_detail.json | Generated detail table for bulk-download event (LungMAP) |
| gh-pages/lungmap/data/event_dataset_analyze_in_terra_requested_detail.json | Generated detail table for Terra-export event (LungMAP) |
| gh-pages/lungmap/data/custom_events.json | Generated custom event rollups for LungMAP |
| gh-pages/lungmap/data/config.json | Generated dashboard branding/config for LungMAP |
| analytics/lungmap-analytics/sheets/generate_static_site.py | LungMAP-specific generation config and project title resolution |
| analytics/lungmap-analytics/sheets/constants.py | Updates LungMAP report month/constants |
| analytics/hca-explorer-sheets/generate_static_site.py | HCA-specific generation config and project title resolution |
| analytics/hca-explorer-sheets/constants.py | Updates HCA report month/constants |
| analytics/anvil-explorer-sheets/utils.py | Small cleanup in dataset title map fetch helper |
| analytics/anvil-explorer-sheets/generate_static_site.py | AnVIL Explorer generation config + dataset title enrichment + access request tracking |
| analytics/anvil-explorer-sheets/constants.py | Updates AnVIL Explorer report month/constants |
| analytics/anvil-catalog-sheets/generate_static_site.py | AnVIL Catalog generation config |
| analytics/anvil-catalog-sheets/constants.py | Updates AnVIL Catalog report month/constants |
| analytics/deploy_sites.sh | Script to copy generated site/ outputs into gh-pages/ for deployment |
| analytics/analytics_package/setup.py | Packages analytics.static_site, ships template HTML, adds requests dependency |
| analytics/analytics_package/analytics/static_site/resolve.py | Catalog API title resolution + enrichment helpers |
| analytics/analytics_package/analytics/static_site/generator.py | Orchestrates fetch → optional title enrichment → export → template copy |
| analytics/analytics_package/analytics/static_site/fetch.py | GA4 data fetch logic for traffic/pages/outbound/filters/events/downloads/access requests |
| analytics/analytics_package/analytics/static_site/export.py | JSON export pipeline for the static site data directory |
| analytics/analytics_package/analytics/static_site/init.py | Public API exports for static site generator |
| analytics/analytics_package/analytics/static_site/README.md | Documentation for generating and deploying the static dashboards |
| .prettierignore | Ignores gh-pages/ formatting |
| .gitignore | Ignores build artifacts, generated site/ dirs, and .credentials/ |
| .github/workflows/deploy-analytics.yml | GitHub Pages deployment workflow for gh-pages/ |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 56 out of 60 changed files in this pull request and generated 11 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…4779 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…4779 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…feHref #4779 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1bbb88b to
b0954a5
Compare
Ticket
Closes #4779
Summary
static_sitesubpackage (analytics/analytics_package/analytics/static_site/) that generates static HTML analytics dashboards from GA4 datagenerate_static_site.pyscript with app-specific config (branding, custom events, entity resolution)Test plan
generate_static_site.pyfor each app and verify the output site renders correctlycatalog=lm10for project title resolutionevent_countsconfig fall back to all-time totals🤖 Generated with Claude Code