Instagram for Earth systems — a 3D globe explorer and multi-agency scroll stream that surfaces statistically validated regional trends from NASA and international space agencies: what is changing, where it is changing, how much it is changing, and whether it is statistically significant.
| Space Apps Challenge Question | Bluegram Implementation |
|---|---|
| 1. What is changing? | 4 NASA POWER Variables: Surface Temperature (T2M), Precipitation (PRECTOTCORR), Solar Radiation (ALLSKY_SFC_SW_DWN), and Relative Humidity (RH2M), plus live NASA EONET v3 hazards, Microsoft Planetary Computer STAC scenes, Meteomatics synoptic nowcasts, and 6-Agency (NASA · ESA · JAXA · ISRO · Roscosmos · CNSA) synthesis. |
| 2. Where is it changing? | Interactive 3D Globe (Three.js + NASA GIBS WMS + 3D EONET Hazard Rings): 13 canonical regions (10 global + 3 Indian subcontinent anchors: Western Ghats, Indo-Gangetic Plain, Sundarbans) with live GIBS Layer Switcher (Blue Marble, MODIS Terra True Color, VIIRS Night Lights) and toggleable 3D EONET Hazard Rings. |
| 3. How much is it changing? | Theil–Sen Estimator (scipy.stats.theilslopes): Non-parametric decadal slope (unit / decade) rendered on every marker, feed card, and Recharts annual time series overlay across customizable era windows (1981–2025, 2000–2025, 2010–2025, 1981–2005). |
| 4. Is it significant? | Mann–Kendall (pymannkendall) + Benjamini–Hochberg FDR (q-value): Every post displays a significance stamp (Significant p < 0.05, Borderline 0.05–0.10, Not significant > 0.10, or Insufficient data if >20% missing) alongside spatial FDR q-values. |
| Twist: Same driver, opposite direction | Contradiction Detector (SplitGlobe + DuelingPosts): Dual 3D globes and stacked telemetry cards contrasting curated pairs (e.g. Arctic vs Antarctic, Western Ghats vs Indo-Gangetic Plain) and live opposing trends from /api/trends. |
- Bluegram Pulse (
/feed) — Instagram-inspired multi-agency scroll stream paired with a sticky,IntersectionObserver-synced 3D side-globe that automatically flies to each scrolled region's coordinates. Includes 6-Agency Consensus Tabs (NASA · ESA · JAXA · ISRO · Roscosmos · CNSA), custom era windows, region subscriptions (★ Following), live NASA EONET v3 pings, historical anecdotes, and DOI-linked peer-reviewed papers. - 3D Globe, GIBS Switcher & 3D EONET Hazard Rings — Switch between NASA GIBS
Blue Marble Bathymetry,MODIS Terra True Color, andVIIRS Black Marblein real time, and toggle 3D EONET Hazard Rings plotting active wildfires, storms, and volcanoes directly on the sphere. - Live Planetary Intelligence Block (
PlanetaryIntelBlock) — Integrated into both/(TrendPost) and/feed(PulseFeedCard). Responses from/api/planetary-intelinclude optionaltemporalGrounding(agent-fill staleness + provenance per synoptic, STAC, and ISRO layers) whenAGENT_FILL_ROOTpoints at a checkout of agent-fill (default:../../agent-fillfromBlueGram/stats).- Synoptic Nowcast (
Meteomatics API): Real-time2m Temp,10m Wind,Sea-Level Pressure, andHumidity / 24h Precip(with automatic zero-auth Open-Meteo real-time fallback). - Microsoft Planetary Computer (
STAC v1 + Data API): Queries livesentinel-2-l2a/landsat-c2-l2satellite granules, cloud cover %, pass dates, and renders live satellite tile preview thumbnails. - ISRO ISTRAC & ISSDC Ground-Segment Telemetry: Maps regions to receiving ISTRAC Ground Stations (including ISTRAC Lucknow, Bengaluru / IDSN Byalalu ISSDC, Port Blair, and Antarctica AGEOS Bharati) with direct links to
isro.gov.in/Sciencedata.html,issdc.gov.in, andistrac.gov.in.
- Synoptic Nowcast (
- Verifiable Science (IPFS) — Pin TrendPost JSON payloads via Pinata (
PINATA_JWT) with persistentlocalStorageCID hydration (bluegram:ipfs-cids) and embeddedhttps://schema.org/DatasetJSON-LD.
cd stats
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
cp .env.example .env # Auto-loaded on startup; optional keys below
.venv/bin/uvicorn main:app --host 127.0.0.1 --port 8000Verify:
curl http://127.0.0.1:8000/api/regionscurl http://127.0.0.1:8000/api/providerscurl "http://127.0.0.1:8000/api/planetary-intel?region=indo-gangetic"
cd web
cp .env.example .env.local
npm install
npm run devOpen http://localhost:3000 (Globe Explorer) or http://localhost:3000/feed (Bluegram Pulse).
Zero-auth services (NASA POWER, NASA GIBS WMS, NASA EONET v3, Microsoft Planetary Computer STAC/Data API, and ISRO ISSDC/ISTRAC catalog links) work out of the box with no keys required.
| Variable | Required | Setup Instructions & Reference Link |
|---|---|---|
NEXT_PUBLIC_STATS_URL |
Yes | Set to http://localhost:8000 locally, or your deployed Google Cloud Run URL in production. |
DEEPSEEK_API_KEY |
Optional | Enables 2-sentence AI plain-language captions (/api/caption). Create a key at platform.deepseek.com/api_keys. |
PINATA_JWT |
Optional | Enables IPFS JSON pinning (/api/ipfs). Create a key at app.pinata.cloud/developers/api-keys → New Key → copy the JWT (API Key/Secret not needed). |
stats/main.py automatically loads stats/.env on startup. Check active status anytime at GET http://localhost:8000/api/providers.
| Variable | Service | Setup Instructions & Reference Link |
|---|---|---|
| (None required) | Microsoft Planetary Computer | Uses public STAC v1 (https://planetarycomputer.microsoft.com/api/stac/v1/search) and Data Preview API. Docs: planetarycomputer.microsoft.com/docs & Catalog. |
METEOMATICS_USER & METEOMATICS_PASSWORD |
Meteomatics Weather & Marine API | Claim via Space Apps Global Offers or sign up at meteomatics.com/en/api/getting-started. Put Basic Auth username/password in stats/.env. (If unset, Bluegram automatically falls back to live Open-Meteo synoptic telemetry). |
| (None required) | NASA EONET v3 | Live open natural events (https://eonet.gsfc.nasa.gov/api/v3/events). Docs: eonet.gsfc.nasa.gov. |
| (None required) | ISRO ISSDC · ISTRAC · Science Data | Ground-station & science archive links mapped per region: ISRO Science Data, ISSDC Portal, ISTRAC Network Brochure, and MOSDAC. |
NASA_API_KEY |
api.nasa.gov | Optional key for elevated EONET rate limits. Generate free at api.nasa.gov. |
NASA_EARTHDATA_TOKEN |
NASA Earthdata CMR | Optional Bearer token for direct CMR/NSIDC granules: urs.earthdata.nasa.gov. |
FIRMS_MAP_KEY |
NASA FIRMS | Optional MAP_KEY for thermal hotspot queries: firms.modaps.eosdis.nasa.gov/api. |
COPERNICUS_CDS_KEY |
ESA Copernicus C3S | Optional key for ERA5 cross-check: cds.climate.copernicus.eu. |
PIXXEL_AURORA_TOKEN |
Pixxel Aurora | Optional Personal Access Token for hyperspectral archive queries: docs.pixxel.space. |
stats/Dockerfile is pre-configured for Google Cloud Run (PORT=8080):
# 1. Authenticate & set your GCP project (redeem $300 credit from Space Apps Global Offers)
gcloud auth login
gcloud config set project YOUR_GCP_PROJECT_ID
# 2. Deploy the Python FastAPI stats service to Cloud Run from source
gcloud run deploy bluegram-stats \
--source ./stats \
--region us-central1 \
--allow-unauthenticated \
--set-env-vars="ALLOWED_ORIGINS=https://your-web-domain.vercel.app"| Endpoint | Method | Service | Contract Summary |
|---|---|---|---|
/api/regions |
GET |
Python (:8000) |
{ regions: [{ id, name, latitude, longitude }] } (13 regions) |
/api/providers |
GET |
Python (:8000) |
{ providers: { nasa_power, microsoft_planetary_computer, meteomatics_api, isro_issdc_istrac, ... } } |
/api/planetary-intel?region={id} |
GET |
Python (:8000) |
{ regionId, stacScene, synoptic, isroTelemetry, temporalGrounding? } |
/api/events/global |
GET |
Python (:8000) |
{ events: [{ id, title, category, date, latitude, longitude, sourceUrl }] } (for 3D Globe hazard rings) |
/api/events?region={id} |
GET |
Python (:8000) |
{ regionId, events: [{ id, title, category, date, distanceKm, sourceUrl }] } |
/api/trend?region={id}&variable={var}&start_year={y0}&end_year={y1} |
GET |
Python (:8000) |
{ region, variable, unit, startYear, endYear, direction, significance, pValue, qValue, missingRatio, slopePerDecade, series, annual, slopeLine, events, supplemental } |
/api/trends?variable={var}&start_year={y0}&end_year={y1} |
GET |
Python (:8000) |
{ variable, unit, startYear, endYear, points: [{ regionId, slopePerDecade, pValue, qValue, significance, direction }] } |
/api/contradiction-pairs?variable={var} |
GET |
Next.js (:3000) |
{ curated: ContradictionPair[], live: ContradictionPair[] } |
/api/caption |
POST |
Next.js (:3000) |
{ caption: string } (supports single region & comparisonMode) |
/api/ipfs |
POST |
Next.js (:3000) |
{ cid, gateway_url, timestamp, size } |
- Methods: Hussain & Mahmud (2019),
pymannkendall(doi:10.21105/joss.01556); Benjamini & Hochberg (1995), FDR (doi:10.1111/j.2517-6161.1995.tb02031.x); Gutierrez-Hernández & García (2024), RTA (doi:10.3390/rs16010001). - NASA & Partner Platforms: Stackhouse et al. (2018), NASA POWER; NASA EOSDIS GIBS; NASA EONET v3; Microsoft Planetary Computer; Meteomatics API; ISRO Science Data / ISSDC / ISTRAC; Earth Observing Dashboard; Miro Education (collaborative architecture whiteboarding).
