# mujawwadkhan/nasa-spaceapp-2026-firesync architecture

> Architecture diagram of the GitHub repository mujawwadkhan/nasa-spaceapp-2026-firesync, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mujawwadkhan/nasa-spaceapp-2026-firesync
- Repository: https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync

## Overview

FireSync turns NASA MODIS and VIIRS detections into a harmonized, district-level burning calendar, then presents calendars, alerts, live activity, trends, maps, and sensor-comparison analyses in Streamlit. The main workflow runs from FIRMS data through filtering, cell-day aggregation, regional calibration, and weekly outputs to the app. The README documents several app capabilities not visible in the sampled app excerpts; these are represented without inferring their internal call structure. Edges reflect README statements or the shown imports and calls.

Main entry points: [`app.py`](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py) (Streamlit application), [`firesync/calendar.py`](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/calendar.py) (Calendar and alerts), [`firesync/analysis.py`](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/analysis.py) (Trends and backtests), [`scripts/fetch_firms.py`](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/scripts/fetch_firms.py) (Archive fetcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data ingestion"]
  node_fetch["Archive fetcher<br/>[fetch_firms.py]"]
  node_raw["Raw detections"]
end

subgraph group_harmonization["Harmonization pipeline"]
  node_filter["Quality filtering<br/>[pipeline.py]"]
  node_cell_days["Cell-day grid<br/>[pipeline.py]"]
  node_regions["District assignment<br/>[pipeline.py]"]
  node_calibration["Cross-calibration<br/>[pipeline.py]"]
  node_weekly["Weekly record<br/>[weekly.parquet]"]
  node_processed["Processed datasets"]
end

subgraph group_analysis["Calendar analysis"]
  node_calendar_logic["Calendar and alerts<br/>[calendar.py]"]
  node_deeper_analysis["Trends and backtests<br/>[analysis.py]"]
end

subgraph group_product["FireSync app"]
  node_app["Streamlit application<br/>[app.py]"]
  node_burning_calendar["Burning calendar<br/>[app.py]"]
  node_early_warning["Early warning<br/>[app.py]"]
  node_live_view["Live activity<br/>[app.py]"]
  node_trends_view["Trend analysis<br/>[app.py]"]
  node_harmonization_view["Sensor comparison<br/>[app.py]"]
  node_map_search["Map and search<br/>[app.py]"]
  node_method_data["Method and data<br/>[app.py]"]
  node_geo["Administrative outlines"]
end

node_analyst(("User"))
node_firms["NASA FIRMS"]

node_analyst -->|"uses"| node_app
node_firms -->|"provides archive"| node_fetch
node_fetch -->|"downloads"| node_raw
node_raw -->|"supplies detections"| node_filter
node_filter -->|"filters to"| node_cell_days
node_cell_days -->|"assigns districts"| node_regions
node_regions -->|"stratifies"| node_calibration
node_calibration -->|"builds record"| node_weekly
node_weekly -->|"writes outputs"| node_processed
node_processed -->|"loads datasets"| node_app
node_geo -->|"supports maps"| node_app
node_app -->|"imports"| node_calendar_logic
node_app -->|"calls analysis"| node_deeper_analysis
node_app -->|"presents"| node_burning_calendar
node_app -->|"presents"| node_early_warning
node_app -->|"presents"| node_live_view
node_app -->|"presents"| node_trends_view
node_app -->|"presents"| node_harmonization_view
node_app -->|"presents"| node_map_search
node_app -->|"presents"| node_method_data
node_calendar_logic -.->|"computes calendar"| node_burning_calendar
node_calendar_logic -.->|"ranks anomalies"| node_early_warning
node_deeper_analysis -.->|"computes trends"| node_trends_view
node_deeper_analysis -.->|"backtests alerts"| node_early_warning

click node_fetch "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/scripts/fetch_firms.py"
click node_raw "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/tree/main/data"
click node_filter "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/pipeline.py"
click node_cell_days "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/pipeline.py"
click node_regions "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/pipeline.py"
click node_calibration "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/pipeline.py"
click node_weekly "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/data/processed/weekly.parquet"
click node_processed "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/tree/main/data/processed"
click node_calendar_logic "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/calendar.py"
click node_deeper_analysis "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/analysis.py"
click node_app "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py"
click node_burning_calendar "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py"
click node_early_warning "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py"
click node_live_view "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py"
click node_trends_view "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py"
click node_harmonization_view "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py"
click node_map_search "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py"
click node_method_data "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py"
click node_geo "https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/tree/main/data/geo"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_fetch,node_raw,node_analyst toneBlue
class node_filter,node_cell_days,node_regions,node_calibration,node_weekly,node_processed toneAmber
class node_calendar_logic,node_deeper_analysis toneMint
class node_app,node_burning_calendar,node_early_warning,node_live_view,node_trends_view,node_harmonization_view,node_map_search,node_method_data,node_geo toneRose
class node_firms toneIndigo
```

## Components

### Data ingestion

- [Archive fetcher](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/scripts/fetch_firms.py): `scripts/fetch_firms.py`
- [Raw detections](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/tree/main/data): `data`

### Harmonization pipeline

- [Quality filtering](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/pipeline.py): `firesync/pipeline.py`
- [Cell-day grid](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/pipeline.py): `firesync/pipeline.py`
- [District assignment](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/pipeline.py): `firesync/pipeline.py`
- [Cross-calibration](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/pipeline.py): `firesync/pipeline.py`
- [Weekly record](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/data/processed/weekly.parquet): `data/processed/weekly.parquet`
- [Processed datasets](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/tree/main/data/processed): `data/processed`

### Calendar analysis

- [Calendar and alerts](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/calendar.py): `firesync/calendar.py`
- [Trends and backtests](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/firesync/analysis.py): `firesync/analysis.py`

### FireSync app

- [Streamlit application](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py): `app.py`
- [Burning calendar](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py): `app.py`
- [Early warning](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py): `app.py`
- [Live activity](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py): `app.py`
- [Trend analysis](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py): `app.py`
- [Sensor comparison](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py): `app.py`
- [Map and search](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py): `app.py`
- [Method and data](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/blob/main/app.py): `app.py`
- [Administrative outlines](https://github.com/mujawwadkhan/nasa-spaceapp-2026-firesync/tree/main/data/geo): `data/geo`

### Other components

- **User**
- **NASA FIRMS**

## Connections

- User → Streamlit application: uses (evidence: `README.md`)
- NASA FIRMS → Archive fetcher: provides archive (evidence: `scripts/fetch_firms.py`)
- Archive fetcher → Raw detections: downloads (evidence: `scripts/fetch_firms.py`)
- Raw detections → Quality filtering: supplies detections (evidence: `README.md`)
- Quality filtering → Cell-day grid: filters to (evidence: `README.md`)
- Cell-day grid → District assignment: assigns districts (evidence: `firesync/pipeline.py`)
- District assignment → Cross-calibration: stratifies (evidence: `README.md`)
- Cross-calibration → Weekly record: builds record (evidence: `README.md`)
- Weekly record → Processed datasets: writes outputs (evidence: `README.md`)
- Processed datasets → Streamlit application: loads datasets (evidence: `README.md`)
- Administrative outlines → Streamlit application: supports maps (evidence: `README.md`)
- Streamlit application → Calendar and alerts: imports (evidence: `app.py`)
- Streamlit application → Trends and backtests: calls analysis (evidence: `app.py`)
- Streamlit application → Burning calendar: presents (evidence: `README.md`)
- Streamlit application → Early warning: presents (evidence: `README.md`)
- Streamlit application → Live activity: presents (evidence: `README.md`)
- Streamlit application → Trend analysis: presents (evidence: `README.md`)
- Streamlit application → Sensor comparison: presents (evidence: `README.md`)
- Streamlit application → Map and search: presents (evidence: `README.md`)
- Streamlit application → Method and data: presents (evidence: `README.md`)
- Calendar and alerts → Burning calendar: computes calendar (evidence: `app.py`)
- Calendar and alerts → Early warning: ranks anomalies (evidence: `app.py`)
- Trends and backtests → Trend analysis: computes trends (evidence: `app.py`)
- Trends and backtests → Early warning: backtests alerts (evidence: `app.py`)
