Skip to main content
Loading navigation
Back to prompt library

Build a Disaster Declaration Administrative Frequency Indexer — implementation

Linked challenge: Build a Disaster Declaration Administrative Frequency Indexer

Prompt source

implementation81 lines11 sectionsNo variables1 code block
## Build
Aggregate OpenFEMA severe storm administrative disaster declarations across rural municipalities. Rank local road and culvert infrastructure administrative declaration exposure for prioritized capital resilience dossiers and adaptation grant applications.

## User
Infrastructure Resilience Officer

## Workflow
1. Fetch OpenFEMA DisasterDeclarationsSummaries filtered by incidentType 'Severe Storm(s)'.
2. Cross-reference administrative disaster declarations with municipal GIS inventories of culverts and bridges.
3. Calculate historical administrative declaration frequency over 10-year rolling windows.
4. Generate prioritized capital resilience dossiers for community grant submissions based on declaration exposure.

## Interface
Static HTML report generator producing municipality vulnerability scorecards with embedded CSV tables.

## Data
Query OpenFEMA API endpoint /v2/DisasterDeclarationsSummaries utilizing $filter on state and incidentType, or download bundled JSON datasets.
Starter examples below are synthetic. They are not downloaded records.

## Source
[FEMA OpenFEMA](https://www.fema.gov/about/openfema/api)
Leverages OpenFEMA query filters including $select, $filter, and $orderby to extract historical administrative storm events by county.

## Tools
semantic-kernel, requests, pydantic.
Semantic Kernel orchestrates data integration plugins with deterministic validation rules to generate structured grant narratives.
Local Ollama model or hosted Claude model to draft structured infrastructure grant justifications.

## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.

## Acceptance
- Correctly filters declarations matching incidentType 'Severe Storm(s)'.
- Computes rolling 10-year administrative storm declaration count for designated county.
- Outputs prioritized asset mitigation scores aligned with administrative disaster frequency.

## Starter Examples
```json
[
  {
    "input": {
      "_record_type": "simplified synthetic app record",
      "municipality": "Riverdale",
      "county_fips": "37183",
      "records": [
        {
          "disasterNumber": 1901,
          "incidentType": "Severe Storm(s)",
          "year": 2012
        },
        {
          "disasterNumber": 2050,
          "incidentType": "Severe Storm(s)",
          "year": 2018
        },
        {
          "disasterNumber": 2210,
          "incidentType": "Severe Storm(s)",
          "year": 2021
        }
      ],
      "culvert_count": 45
    },
    "expected_output": {
      "municipality": "Riverdale",
      "storm_declaration_count": 3,
      "adaptation_priority": "PRIORITY_LEVEL_1",
      "recommendation": "Submit culvert enlargement grant application"
    }
  },
  {
    "input": {
      "_record_type": "simplified synthetic app record",
      "municipality": "Pinehill",
      "county_fips": "37001",
      "records": [],
      "culvert_count": 12
    },
    "expected_output": {
      "municipality": "Pinehill",
      "storm_declaration_count": 0,
      "adaptation_priority": "PRIORITY_LEVEL_3",
      "recommendation": "Maintain standard monitoring"
    }
  }
]
```

## Safety
Grant priorities are non-binding planning recommendations and do not guarantee federal funding allocation.
Use mock external writes. Require human review before any real deployment.