Access Data

This section resulted from a conversation with Patrick Freeland (LinkedIn, ATNI Tribes, Liken Knowledge) about the many projects he has been developing using Claude.

Sharing interactive data science tools on the web does not require maintaining a 24/7 database or server. Across seven real-world projects from ATNI Climate — summarized in pfGuides and paired with Deploy a Serverless Interactive Website — data access follows a practical spectrum from strictly offline to live agency feeds.

Which pattern fits a project depends on three questions: How often does the data change? Who governs or owns it? And does it require a private API key?

flowchart LR
    A(["🔒 <b>1. Local Only</b><br/>ocr-engine-next<br/>Zero web access"])
    B["📦 <b>2. Bundled Static</b><br/>TSDF · Curriculum · TERRA<br/>Data ships with page"]
    C["🛡️ <b>3. Build-Time Pull</b><br/>atni-task-force<br/>Pulled locally + leak gate"]
    D["🌐 <b>4. Live Public Feeds</b><br/>dynamic-drought-module<br/>Direct APIs + map slices"]
    E(["🔑 <b>5. Protected Relay</b><br/>policy-sentinel<br/>Cloud relay hides keys"])

    A --- B --- C --- D --- E

    style A fill:#f1f5f9,stroke:#64748b,stroke-width:2px,color:#0f172a
    style B fill:#e0f2fe,stroke:#0284c7,stroke-width:2px,color:#0f172a
    style C fill:#fef3c7,stroke:#d97706,stroke-width:2px,color:#0f172a
    style D fill:#d1fae5,stroke:#059669,stroke-width:2px,color:#0f172a
    style E fill:#eef2ff,stroke:#6366f1,stroke-width:2px,color:#0f172a

Five Ways Projects Access Data

1. Strictly Offline — Local Files Only (ocr-engine-next)

  • How it works: Runs as a native program directly on a collaborator’s computer, reading local PDFs and writing local outputs with zero network access.
  • Safeguards: Networking libraries are banned at build time, and automated tests verify that no outbound connections can occur at runtime.
  • Why use it: Sensitive Tribal-government documents never leave the local machine.

2. Bundled Static Data (TieredSovereignDataFramework, climate-curriculum, TERRA)

  • How it works: All tables, text, map geometries, and media are packaged directly inside the website files on GitHub Pages — no live external queries when a visitor opens the page.
  • Variations:
    • Tiered Sovereign Data Framework: Embeds structured definitions and decision-tree logic directly in page scripts.
    • Climate Curriculum: Compiles map vectors, photos, and fonts into a self-contained site that works 100% offline in low-connectivity classrooms, saving student notes only in browser storage (localStorage).
    • TERRA: Serves embedded project records and pre-built 3D terrain tiles from the same site, loading external interactive embeds only if a visitor explicitly clicks.
  • Why use it: Zero server maintenance, instant loading, and complete offline resilience.

3. Build-Time Collection with Privacy Gates (atni-task-force)

  • How it works: Python scripts pull data from public agencies (Grants.gov, Federal Register, EIA, SEC) on a maintainer’s computer — where any API keys stay private — and compile verified public summaries into a dedicated site/ folder.
  • Safeguards: Automated checks verify that internal community drafts (Tier 1) never leak into public files (Tier 0) before publishing. Visitors’ browsers make zero external API calls.
  • Why use it: Combines rich external datasets with strict data governance and privacy-preserving static delivery.

4. Direct Live Feeds & On-Demand Map Slices (dynamic-drought-module)

  • How it works: The visitor’s browser fetches live, keyless public agency feeds directly (USGS stream gauges, NOAA drought outlooks, wildfire perimeters, and Tribal boundaries). Large base maps are stored as compressed archives and streamed in small viewport-sized slices on demand, rather than downloaded all at once.
  • Bridging gaps: Lightweight cloud relays handle the few agency servers that block direct browser requests or exceed static file-size limits, while scheduled weekly updates refresh slow-changing climate tables.
  • Why use it: Keeps fast-moving environmental hazards up to date without a backend server — and reading Tribal boundaries live from the publishing agency avoids copying sovereign polygons into the repository.

5. Protected Relay for Keyed APIs (policy-sentinel)

  • How it works: A browser cannot safely store private API keys (anything sent to the browser is publicly visible). Instead, the static website sends search requests to a small, read-only cloud relay (Cloudflare Worker) that checks where the request came from, adds the private key for federal APIs (GovInfo, Congress.gov, Regulations.gov), enforces rate limits, and caches public documents.
  • Static + live blend: Slower-changing reference indexes (such as federal code titles) are pre-built as verified static files so only live searches need the relay.
  • Why use it: Enables live access to gated government APIs without exposing credentials or running a full backend server.

Comparison at a Glance

Pattern Example Project(s) When Data Moves Best Fit for Data Science
1. Local Only ocr-engine-next Never leaves workstation Sensitive or confidential documents requiring air-gapped processing
2. Bundled Static TieredSovereignDataFramework, climate-curriculum, TERRA Packaged before publishing Reference guides, classroom modules, and low-connectivity environments
3. Build-Time Pull atni-task-force Pulled locally, gated in CI Curated public dashboards where internal drafts must stay strictly isolated
4. Live Public Feeds dynamic-drought-module Streamed live by browser Real-time environmental monitoring, hazards, and interactive web maps
5. Protected Relay policy-sentinel Proxied live via cloud worker Live queries to rate-limited or API-keyed government databases

Key Takeaways

  1. Match freshness to need: Don’t fetch data live if a build-time snapshot or bundled file is sufficient — static data is faster, cheaper, and works offline.
  2. Protect sovereignty by design: Keep sensitive records local (ocr-engine-next), gate public vs. internal tiers before publishing (atni-task-force), or fetch authoritative boundaries live rather than copying them (dynamic-drought-module).
  3. Never put API keys in browser code: Keep keys on a local workstation for build-time pulls, or behind a small read-only cloud relay for live queries.
  4. Separate gathering from publishing: Even without a traditional backend server, pairing Python/scripted data collection with static web hosting supports a wide range of interactive data science workflows.

See Deploy a Serverless Interactive Website for the deployment pipelines, and byandell/pfGuides for additional project details.


This site uses Just the Docs, a documentation theme for Jekyll.