Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LA wildfires as a use-case #101

Merged
merged 2 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions sample_data/ingest_use_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

from .use_cases.boston_floods import ingest as boston_floods_ingest
from .use_cases.new_york_energy import ingest as new_york_energy_ingest
from .use_cases.la_wildfires import ingest as la_wildfires_ingest


USE_CASE_FOLDER = Path('sample_data/use_cases')
Expand Down Expand Up @@ -151,6 +152,8 @@ def ingest_datasets(use_case, include_large=False, dataset_indexes=None):
boston_floods_ingest.convert_dataset(dataset_for_conversion, dataset)
elif use_case == 'new_york_energy':
new_york_energy_ingest.convert_dataset(dataset_for_conversion, dataset)
elif use_case == 'la_wildfires':
la_wildfires_ingest.convert_dataset(dataset_for_conversion, dataset)
else:
print(
'\t', f'Dataset too large ({dataset_size_mb} MB); skipping conversion step.'
Expand Down
79 changes: 79 additions & 0 deletions sample_data/use_cases/la_wildfires/datasets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[
{
"name": "MODIS 1km 48h USA + Hawaii",
"description": "MODIS 1km USA (Conterminous) + Hawaii 48h shapefile. From: https://firms.modaps.eosdis.nasa.gov/active_fire/",
"category": "region",
"type": "vector",
"files": [
{
"path": "la-fire-2025/modis-1-48.zip",
"url": "https://data.kitware.com/api/v1/item/67aa368b091a514e82eec908/download"
}
],
"style_options": {}
},
{
"name": "USA Current Wildfire Perimeters",
"description": "NIFC, taken on Feb 4, 2025. From: https://data-nifc.opendata.arcgis.com/",
"category": "region",
"type": "vector",
"files": [
{
"path": "la-fire-2025/current_fire_perimeters.geojson",
"url": "https://data.kitware.com/api/v1/item/67aa368c091a514e82eec90b/download"
}
]
},
{
"name": "USA Current Wildfire Incidents",
"description": "IRWIN, taken on Feb 4, 2025. From: https://forestsandrangelands.gov/WFIT/applications/IRWIN/index.shtml",
"category": "region",
"type": "vector",
"files": [
{
"path": "la-fire-2025/current_fire_incidents.geojson",
"url": "https://data.kitware.com/api/v1/item/67aa368c091a514e82eec90e/download"
}
],
"style_options": {}
},
{
"name": "California Fire Perimeters",
"description": "NIFC + FIRIS, taken Feb 4, 2025. From: https://www.fire.ca.gov/incidents/2025/1/7/palisades-fire",
"category": "region",
"type": "vector",
"files": [
{
"path": "la-fire-2025/ca_perimeters_nifc_firis.geojson",
"url": "https://data.kitware.com/api/v1/item/67aa33ed091a514e82eec8ff/download"
}
],
"style_options": {}
},
{
"name": "Palisades Satellite Imagery",
"description": "MAXAR, Jan 14, 2025. From: https://registry.opendata.aws/maxar-open-data/",
"category": "region",
"type": "raster",
"files": [
{
"path": "la-fire-2025/palidades-2025-01-14.tif",
"url": "https://data.kitware.com/api/v1/item/67aa368a091a514e82eec905/download"
}
],
"style_options": {}
},
{
"name": "Eaton/Altadena Satellite Imagery",
"description": "MAXAR, Jan 14-19, 2025. From: https://registry.opendata.aws/maxar-open-data/",
"category": "region",
"type": "raster",
"files": [
{
"path": "la-fire-2025/eaton-2025-01-14_to_19.tif",
"url": "https://data.kitware.com/api/v1/item/67aa353a091a514e82eec902/download"
}
],
"style_options": {}
}
]
8 changes: 8 additions & 0 deletions sample_data/use_cases/la_wildfires/ingest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def convert_dataset(dataset, options):
print('\t', f'Converting data for {dataset.name}...')
dataset.spawn_conversion_task(
style_options=options.get('style_options'),
network_options=options.get('network_options'),
region_options=options.get('region_options'),
asynchronous=False,
)
18 changes: 18 additions & 0 deletions sample_data/use_cases/la_wildfires/projects.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"name": "Los Angeles Wildfires (Jan 2025)",
"default_map_center": [
34.27,
-118.47
],
"default_map_zoom": 9,
"datasets": [
"MODIS 1km 48h USA + Hawaii",
"USA Current Wildfire Perimeters",
"USA Current Wildfire Incidents",
"California Fire Perimeters",
"Palisades Satellite Imagery",
"Eaton/Altadena Satellite Imagery"
]
}
]
2 changes: 1 addition & 1 deletion uvdat/core/management/commands/populate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
'use_case',
choices=['boston_floods', 'new_york_energy'],
choices=['boston_floods', 'new_york_energy', 'la_wildfires'],
help='Sample data collection to load',
)
parser.add_argument(
Expand Down