This directory contains the React + TypeScript + Vite application that powers the DISDRODB interactive station map.
The app renders a searchable, filterable Leaflet map of disdrometer stations.
The expected station data JSON files are automatically pushed into public/data/ by an external GitHub Action from the upstream metadata repository.
The web map is the browser interface for exploring the DISDRODB metadata archive. It lets users:
- browse all indexed stations on an interactive world map
- filter stations by text, deployment status, data availability, duration, time period, sensor type, and data source
- inspect station metadata in a detail panel
- open the source metadata file on GitHub
- follow data download links when public DISDRODB data is available
- React 19
- TypeScript
- Vite
- Leaflet
- React Leaflet
src/main.tsx: React bootstrapsrc/App.tsx: top-level layout and state orchestrationvite.config.ts: Vite configuration, including the GitHub Pages base path
src/components/StationMap.tsx: Leaflet map, base layers, fit-to-bounds behavior, marker styling, and reset-view controlsrc/components/Filters.tsx: sidebar filters and active-filter chipssrc/components/StationList.tsx: filtered station result listsrc/components/StationDetail.tsx: detail panel with location, time coverage, sensor, attribution, and links
src/hooks/useStations.ts: fetches generated JSON and applies client-side filteringsrc/hooks/useUrlState.ts: synchronizes filter state with URL query parameterssrc/types/station.ts: shared TypeScript interfaces for stations, filter options, and filter state
Data is automatically generated via a separate pipeline and injected into this repository via a GitHub Action logic. The app expects the following structure:
public/data/stations.json: generated station records consumed by the apppublic/data/filter-options.json: generated filter option values
To test the application locally in development mode, run the following commands from this repository root.
nvm usenpm installStart local hot module replacement by running:
npm run devThe terminal will print out a URL (by default http://localhost:5173/disdrodb-webmap/). Open this URL in your web browser. Any changes you make to the code (e.g. src/ files) will seamlessly update the live-rendering in your browser automatically—no manual page refresh required!
- The Vite base path is configured for GitHub Pages hosting under
/disdrodb-webmap/. - GitHub Actions automatically manage the build and deployment logic inside
.github/workflows/GenerateMap.yml. Every time code is pushed to themainbranch, the workflow automatically provisions the build and hosts it on GitHub Pages. - Generated production assets are emitted to
dist/.
Filtering is processed entirely client-side. The filters persist in the URL query string allowing link-sharing of active filter configurations. Supported filters include:
- free-text search (scans station name, location, campaign, country, sensor name, etc.)
- deployment status:
all,ongoing,terminated - data availability:
all,public,offline - data source and sensor type multiselect checkboxes