This document provides context for the Gemini code assistant to understand the project and provide better assistance.
This is a Python-based data engineering project that uses the Dagster framework to create "Software Defined Assets". The project focuses on public health and environmental data, collecting and processing data from various sources, including:
- Air Quality: AirNow, PurpleAir, and San Diego Air Pollution Control District (APCD)
- Water Quality: San Diego beach water quality monitoring and IBWC spills
- Public Health: San Diego County epidemiology data, CDC NNDS data (Mpox, Measles), and San Diego public complaints
- Environmental: Streamflow data and weather forecasts from OpenMeteo
- GIS Data: Subregions and tracts for spatial analysis
The project is organized as a uv workspace with multiple Dagster code locations:
- workflows/resilient_core/ — shared utilities, resources, and constants
- workflows/tijuana/ — regional/border environmental monitoring (air quality, water quality, complaints, weather)
- workflows/pathogens/ — CDC NNDSS, mpox, WAHIS disease surveillance
- workflows/epidemiology/ — San Diego county disease surveillance
- workflows/sim/ — epidemic forecasting (ResilientSims)
- Create a virtual environment:
uv venv
- Install dependencies:
uv sync --all-packages
- Activate the virtual environment:
source .venv/bin/activate
Set the following environment variables for API access:
export AIRNOW_API_KEY="your_key"
export PURPLEAIR_API_KEY="your_key"
export AIRTABLE_API_KEY="your_key"
export AIRTABLE_BASE_ID="your_base_id"
export SLACK_WEBHOOK_URL="your_webhook"
export MINIO_ENDPOINT="your_endpoint"
export MINIO_ACCESS_KEY="your_access_key"
export MINIO_SECRET_KEY="your_secret_key"You can also add these to a .env file in the workflows directory and run export $(grep -v '^#' workflows/.env | xargs).
To run the Dagster development server and view all code locations in the UI:
uv run dagster devTo run a single code location:
uv run dagster dev -m tijuanaYou can then access the Dagster UI at http://localhost:3000.
To materialize (i.e., run) specific assets, use the dagster asset materialize command with the appropriate module.
Materialize a single asset (tijuana code location):
dagster asset materialize --select airnow_current_conditions -m tijuanaMaterialize a group of assets using tags:
dagster asset materialize --select tag:tijuana -m tijuana- Dagster: The project uses Dagster as the core framework for defining and managing data assets.
- Python: The project is written in Python.
- Dependencies: Project dependencies are managed with
uvand defined inpyproject.tomlfiles across the workspace. - Testing: The project includes a
testsdirectory, but the testing strategy is not fully clear from the initial analysis. - Directory Structure: The project is a uv workspace with code locations in
workflows/tijuana/,workflows/pathogens/,workflows/epidemiology/,workflows/sim/, and shared code inworkflows/resilient_core/.