Public dashboard detailing Web Platform Baseline availability. Based on the Cloudflare BEACON RUM dataset, this dashboard is built with Eleventy (11ty) and hosted at the Baseline Availability site.
├── .github/workflows/
│ └── deploy.yml # GitHub Actions pipeline to build 11ty & publish to GitHub Pages
├── queries/
│ ├── country_daily_aggregates.sql # Daily country-level browser & OS version aggregates
│ └── global_daily_aggregates.sql # Daily global browser & OS version aggregates
├── scripts/
│ ├── calculate-baseline.js # Maps RUM user agents to Baseline targets & builds global/regional/country bundles
│ └── fetch-data.js # Queries BigQuery, writes daily JSON files, and runs Baseline calculations
├── src/
│ ├── _data/
│ │ ├── bigquery/ # Raw per-day JSON files fetched from BigQuery
│ │ ├── browsers.json # Browser display names and metadata
│ │ ├── regions.json # UN M49 regional hierarchy & ISO 3166-1 alpha-2 country mappings
│ │ └── site.json # Global site metadata
│ ├── _includes/layouts/
│ │ └── base.njk # Base HTML5 layout
│ ├── assets/js/
│ │ └── baseline-components.js # Interactive web components (location filter, summary table, charts)
│ ├── css/
│ │ └── styles.css # Dashboard styles
│ └── index.njk # Dashboard entry template
├── eleventy.config.js # 11ty configuration & template filters
├── CHANGELOG.md # Chronological log of site and data pipeline changes
├── .env.example # Template for local environment variables & GCP credentials
└── package.json
The dashboard supports filtering Baseline availability and browser compatibility breakdowns by Worldwide, Region / Sub-Region, or Country:
- Countries & Territories: Keyed by two-letter ISO 3166-1 alpha-2 country codes (e.g.,
US,DE,JP) reported in the RUM Archivecountryfield (src/_data/bigquery/country_daily_aggregates/). Any traffic without a resolved country is grouped underXX(Unspecified GeoIP). - Regional Hierarchy (UN M49): Regions and sub-regions in
src/_data/regions.jsonfollow the United Nations M49 standard (Standard Country or Area Codes for Statistical Use), organized into three nested levels:- Macro-regions (6 continental regions, such as Africa, Americas, Asia, Europe, Oceania, and Antarctica)
- Sub-regions (18 groupings, such as Sub-Saharan Africa, Latin America and the Caribbean, Northern Europe, and South-eastern Asia)
- Intermediate / Leaf regions (23 finest-grained regional subdivisions, such as Eastern Africa, South America, and Western Africa, which directly map to member countries and include cross-references to
caniuse-dbalt-*region codes)
- Traffic-Weighted Rollups: Regional availability, 7-day deltas, daily time series, and browser version breakdowns are aggregated from member countries weighted by each country's page-load volume (
src/_data/baseline_region_summary.jsonand client-side rollups insrc/assets/js/baseline-components.js). - Shareable URL Parameters: Direct links to specific countries, regions, and Baseline targets are supported via
?country=<ISO_CODE>(e.g.,?country=US,?country=JP, or?country=united-states),?region=<SLUG_OR_M49_CODE>(e.g.,?region=europe,?region=northern-europe, or?region=150), and?target=<TARGET_ID>(e.g.,?target=widely,?target=newly, or?target=2025). Changing any location or target filter pushes a new history entry viahistory.pushStateso browser Back/Forward buttons step through filter selections, and returning to Worldwide or unpinning a target clears the corresponding parameter.
-
Node.js (v20.6+ required for native
.envloading, v22 recommended) -
Local Environment File (
.env): Copy the template:cp .env.example .env
Configure your GCP project ID:
GOOGLE_CLOUD_PROJECT=your-gcp-project-id
-
Google Cloud Authentication:
- Local Development (
gcloud):gcloud auth application-default login gcloud config set project your-gcp-project-id - Service Account Key (Alternative):
If using a service account key file locally, set the path in
.env:GOOGLE_APPLICATION_CREDENTIALS=./service-account-key.json
- Local Development (
npm installValidate queries without executing them (dry run):
npm run fetch-data:dry-runExecute queries, process results, and write JSON files into src/_data/bigquery/:
npm run fetch-dataStart the local development server at http://127.0.0.1:8080:
npm run serveBuild static HTML into _site/:
npm run build- In the GitHub repository settings under Settings → Pages, set Build and deployment > Source to GitHub Actions.
- Under Settings → Secrets and variables → Actions, configure repository secrets for BigQuery automation:
GCP_PROJECT_ID: Your Google Cloud Project ID.- Authentication (choose one):
- Workload Identity Federation (Recommended):
GCP_WORKLOAD_IDENTITY_PROVIDER: Workload Identity Provider resource name.GCP_SERVICE_ACCOUNT: Service account email.
- Service Account Key:
GCP_SA_KEY: Full JSON content of a service account key.
- Workload Identity Federation (Recommended):
- Pushing to
main(or triggering.github/workflows/deploy.ymlin the Actions tab) authenticates against GCP, fetches updated BigQuery metrics, builds static HTML with 11ty, and publishes to GitHub Pages.