The IRWIN module provides access to wildfire incident data from the Integrated Reporting of Wildland Fire Information system. This is the authoritative source for federal and some state fire agency incident data.
usingWildfireData.IRWIN# List all datasetsIRWIN.datasets()# Filter by categoryIRWIN.datasets(category=:incidents)# Get dataset infoIRWIN.info(:usa_current_incidents)
Downloading Data
# Download current incidentsdata = IRWIN.download(:usa_current_incidents, limit=10)# Download fire occurrence records for Californiadata = IRWIN.download(:fire_occurrence, where="POOState = 'US-CA'", limit=100)# Download large fires onlydata = IRWIN.download(:usa_current_incidents, where="DailyAcres > 1000", limit=10)
Querying
# Count all current incidentsn = IRWIN.count(:usa_current_incidents)# Count fire occurrence recordsn = IRWIN.count(:fire_occurrence)n = IRWIN.count(:fire_occurrence, where="POOState = 'US-CA'")# Get field informationfields = IRWIN.fields(:usa_current_incidents)
Saving and Loading Files
# Download and save to local filepath = IRWIN.download_file(:usa_current_incidents, limit=100)# Load previously downloaded filedata = IRWIN.load_file(:usa_current_incidents)
Working with Results
data = IRWIN.download(:usa_current_incidents, limit=5)# Access incident propertiesfor feature in dataprintln("$(feature.IncidentName)")println(" Acres: $(feature.DailyAcres)")println(" State: $(feature.POOState)")end