feat: add static analytics site generator for HCA Data Portal#3034
Merged
feat: add static analytics site generator for HCA Data Portal#3034
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a static analytics dashboard for the HCA Data Portal, checks in a generated site snapshot, and introduces GitHub Pages deployment for publishing the dashboard.
Changes:
- Add
analytics/generate_static_site.pyto build a portal-branded static analytics site from the shared analytics package. - Commit the generated site HTML plus JSON data artifacts for the current report snapshot.
- Add a Pages deployment workflow, ignore local credentials, and update the analytics package dependency.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
analytics/site/index.html |
Static dashboard shell and client-side rendering logic. |
analytics/site/data/search_queries.json |
Generated search-query analytics snapshot. |
analytics/site/data/pageviews.json |
Generated top-page analytics snapshot. |
analytics/site/data/outbound_links.json |
Generated outbound-link analytics snapshot. |
analytics/site/data/monthly_traffic.json |
Generated monthly traffic history snapshot. |
analytics/site/data/meta.json |
Generated report metadata for the snapshot. |
analytics/site/data/filter_selected.json |
Generated filter-event data snapshot. |
analytics/site/data/file_downloads.json |
Generated direct-download data snapshot. |
analytics/site/data/file_download_events.json |
Generated file-download event totals snapshot. |
analytics/site/data/custom_events.json |
Generated custom-event summary snapshot. |
analytics/site/data/config.json |
Runtime branding/config for the static site. |
analytics/site/data/access_requests.json |
Generated access-request data snapshot. |
analytics/requirements.txt |
Updates the shared analytics package source. |
analytics/generate_static_site.py |
New script to generate the static site. |
analytics/constants.py |
Advances analytics reporting month constants. |
.gitignore |
Ignores local credentials directory. |
.github/workflows/deploy-analytics.yml |
Adds GitHub Pages deployment workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NoopDog
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
Closes #3033
Summary
analytics/generate_static_site.pyscript that calls the shared analytics package to generate a static HTML dashboard with GA4 data for the HCA Data Portal.credentials/to.gitignoreand update analytics package dependency to include static site supportThe script uses the hostname filter (
data.humancellatlas.org) to scope data to the portal only (the GA4 property is shared with the explorer), with an analytics start date of 2024-02-01 when the hostname split became reliable.Test plan
🤖 Generated with Claude Code