My initial goals for this project were to:
Historic wildfire GIS information is maintained by the National Interagency Fire Center (NIFC).
NIFC data are distributed through ArcGIS Online products:
These sources can be queried using the {arcgislayers}
package (Parry 2024).
The functions I’ve written for this project lean heavily on Kyle Walker’s {tigris}
(2024) and {tidycensus}
(2024) packages.
filter_geom
argument in arc_read()
nm_fires <- arcgislayers::arc_read(r"(https://services3.arcgis.com/T4QMspbfLg3qTGWY/ArcGIS/rest/services/InterAgencyFirePerimeterHistory_All_Years_View/FeatureServer/0)",
where = "FIRE_YEAR BETWEEN 2010 AND 2020",
filter_geom = st_as_sfc(nm)
) |>
st_make_valid(geos_method = "valid_linework") |>
distinct(toupper(INCIDENT), .keep_all = T) |>
slice_max(
order_by = Shape__Area,
n = 10
) |>
select(-`toupper(INCIDENT)`) |>
mutate(COMMENTS = str_trunc(COMMENTS, 35))
Note
The NIFC data is much less clean than the Census data; we have to validate geometry and de-duplicate incidents. In addition, many of the comment-writers had lots to say – we’ll truncate the COMMENTS
field to 35 characters.
The cumulative area of these fires is 3368.7 square miles. However, there are other impacts that are not apparent by only looking at the burned land area.
years_before
and years_after
parameters, but must still be >= 5 yearsget_counties_all_years()
and get_tracts_all_years()
st_filter()
to determine which tracts an event boundary intersects withsf
object is spatially joined to the tracts it intersects with before and after
map_data()
is applied to iterate get_acs()
across these combinations
Variable starts with… | Function to be computed |
---|---|
mean |
mean() |
median |
median() |
All other strings | sum() |
Default variables include:
c(
"pop_total" = "B03002_001", # total population
"pop_nh_white" = "B03002_003", # non-Hispanic White
"pop_nh_black" = "B03002_004", # non-Hispanic Black
"pop_nh_aian" = "B03002_005", # non-Hispanic American Indian/Alaskan Native
"pop_nh_asian" = "B03002_006", # non-Hispanic Asian
"pop_nh_hipi" = "B03002_007", # non-Hispanic Native Hawaiian And Other Pacific Islander
"pop_nh_other" = "B03002_008", # non-Hispanic Some Other Race Alone
"pop_nh_two" = "B03002_009", # non-Hispanic Two or More Races
"pop_hisp" = "B03002_012", # Hispanic or Latino
"median_hhi" = "B19013_001", # median household income
"mean_hh_size" = "B25010_001", # household size
"sch_enrollment" = "B14001_002" # school enrollment
)
The final output object is an sf
object, returned in either "tidy"
(the default) or "wide"
format.
output = "tidy" |
output = "wide" |
---|---|
Twice as long as nrow(data) * length(variables) , with one field containing the point-in-time, one containing the corresponding ACS vintage year, one containing the variable, and one containing the estimate |
Same length as nrow(data) , with a column returned for each variable requested and one denoting the years of the ACS vintages used |
No differences are calculated; the user must group and perform calculations | Absolute differences are calculated; this avoids divide by zero error |
Can be used for side-by-side comparison maps (such as a slider map) comparing an event to itself | Useful for single choropleth maps comparing events to one another |
OBJECTID | MAP_METHOD | DATE_CUR | COMMENTS | GEO_ID | IRWINID | UNQE_FIRE_ID | FIRE_YEAR | LOCAL_NUM | INCIDENT | UNIT_ID | POO_RESP_I | FEATURE_CA | GIS_ACRES | USER_NAME | SOURCE | AGENCY | FIRE_YEAR_INT | Shape__Area | Shape__Length | FORID | OTHERID | pt_in_time | data_yr | variable | computed |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
24800 | Digitized From Hardcopy Orthophoto quad | 201202230000 | NA | {066DE785-7868-44DC-B1FF-AD0600D05F53} | NA | 2011-AZASF-000020 | 2011 | 2011-020 | Wallow | NA | NA | Wildfire Final Fire Perimeter | 538051.6 | NA | USFS | USFS | 2011 | 3161860839 | 725941.9 | NA | NA | before | 2009 | mean_hh_size | 2.83 |
24800 | Digitized From Hardcopy Orthophoto quad | 201202230000 | NA | {066DE785-7868-44DC-B1FF-AD0600D05F53} | NA | 2011-AZASF-000020 | 2011 | 2011-020 | Wallow | NA | NA | Wildfire Final Fire Perimeter | 538051.6 | NA | USFS | USFS | 2011 | 3161860839 | 725941.9 | NA | NA | before | 2009 | median_hhi | 33802.00 |
24800 | Digitized From Hardcopy Orthophoto quad | 201202230000 | NA | {066DE785-7868-44DC-B1FF-AD0600D05F53} | NA | 2011-AZASF-000020 | 2011 | 2011-020 | Wallow | NA | NA | Wildfire Final Fire Perimeter | 538051.6 | NA | USFS | USFS | 2011 | 3161860839 | 725941.9 | NA | NA | before | 2009 | pop_hisp | 3446.00 |
24800 | Digitized From Hardcopy Orthophoto quad | 201202230000 | NA | {066DE785-7868-44DC-B1FF-AD0600D05F53} | NA | 2011-AZASF-000020 | 2011 | 2011-020 | Wallow | NA | NA | Wildfire Final Fire Perimeter | 538051.6 | NA | USFS | USFS | 2011 | 3161860839 | 725941.9 | NA | NA | before | 2009 | pop_nh_aian | 4764.00 |
24800 | Digitized From Hardcopy Orthophoto quad | 201202230000 | NA | {066DE785-7868-44DC-B1FF-AD0600D05F53} | NA | 2011-AZASF-000020 | 2011 | 2011-020 | Wallow | NA | NA | Wildfire Final Fire Perimeter | 538051.6 | NA | USFS | USFS | 2011 | 3161860839 | 725941.9 | NA | NA | before | 2009 | pop_nh_asian | 69.00 |
OBJECTID | MAP_METHOD | DATE_CUR | COMMENTS | GEO_ID | IRWINID | UNQE_FIRE_ID | FIRE_YEAR | LOCAL_NUM | INCIDENT | UNIT_ID | POO_RESP_I | FEATURE_CA | GIS_ACRES | USER_NAME | SOURCE | AGENCY | FIRE_YEAR_INT | Shape__Area | Shape__Length | FORID | OTHERID | acs_vintage | mean_hh_size | median_hhi | pop_hisp | pop_nh_aian | pop_nh_asian | pop_nh_black | pop_nh_hipi | pop_nh_other | pop_nh_two | pop_nh_white | pop_total | sch_enrollment |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
24800 | Digitized From Hardcopy Orthophoto quad | 201202230000 | NA | {066DE785-7868-44DC-B1FF-AD0600D05F53} | NA | 2011-AZASF-000020 | 2011 | 2011-020 | Wallow | NA | NA | Wildfire Final Fire Perimeter | 538051.56 | NA | USFS | USFS | 2011 | 3161860839 | 725941.9 | NA | NA | 2009 to 2014 | 0.1250000 | 7718 | -434 | 392 | -31 | 98 | 2 | 2 | -101 | -4266 | -4338 | -1479 |
29377 | Infrared Interpretation | 201212310000 | NA | {D542FB27-0045-4CF3-A49F-A5913F690B67} | NA | 2012-NMGNF-000200 | 2012 | 000200 | Whitewater-Baldy Complex | NMGNF | NMGNF | Wildfire Final Fire Perimeter | 297801.12 | NA | USFS | USFS | 2012 | 1730419827 | 1116513.1 | NA | NA | 2010 to 2015 | 0.1466667 | -1097 | -236 | -101 | 12 | 20 | 0 | 0 | 50 | -290 | -545 | 215 |
13348 | Other | 201107210000 | NA | {7BF09AF5-9A22-4A7A-B64B-2C959495DAE4} | NA | 2011-NMSNF-000099 | 2011 | 000099 | Las Conchas | NMSNF | NMSNF | Wildfire Final Fire Perimeter | 156593.62 | NA | USFS | USFS | 2011 | 967018464 | 440306.1 | NA | NA | 2009 to 2014 | -0.0175000 | -4409 | 60 | 1068 | -33 | -3 | 19 | 108 | -75 | -27 | 1117 | 551 |
29401 | Infrared Interpretation | 201307112315 | KCFAST Report Incorrectly Has Si... | {DF4D9D65-A856-472F-A827-60C4E2268D61} | NA | 2013-NMGNF-000008 | 2013 | 000008 | Silver | NMGNF | NMGNF | Wildfire Final Fire Perimeter | 138705.45 | NA | USFS | USFS | 2013 | 799345275 | 375737.0 | NA | NA | 2011 to 2016 | -0.1866667 | -15806 | 52 | -25 | 20 | 27 | 0 | 19 | 151 | -960 | -716 | -266 |
46314 | GPS - Uncorrected Data | 201202010000 | Data received from fire team member | {77E85B4F-7FFB-44F5-B0DC-B95568BCDD16} | NA | 2011-NMLNF-000425 | 2011 | 000425 | Donaldson | NMN5S | NMN5S | Wildfire Final Fire Perimeter | 96129.21 | NA | USFS | USFS | 2011 | 558682949 | 206076.9 | NA | NA | 2009 to 2014 | 0.6400000 | -167 | 737 | 12 | -8 | -26 | -5 | 0 | -114 | 1211 | 1807 | 670 |
Using output = "tidy"
allows us to compare one variable easily over time.
Using output = "wide"
allows us to compare differences in one variable easily across multiple events.
The Wallow Fire (2011) had the most severe impact on the Hispanic and Latino populations based on this methodology.
The way that I’ve constructed this project allows it to be easily extended to other topics, not just wildfire:
tigris
with different column names depending on the vintage usedoutput = "wide"
) can only be absolute
The Washington Metropolitan Area Transit Authority (WMATA) opened a series of metro rail stations through Northern Virginia on July 26, 2014, in the Phase 1 extension of the Silver Line (“Dulles Corridor Metrorail Project” 2015). These stations include Greensboro, McLean, Spring Hill, Tysons, and Wiehle–Reston East.
Using the above methodology, we can investigate the question: what was the impact of opening these stations on the surrounding areas?
According to the U.S. Department of Transportation, most pedestrians are willing to walk a quarter to a half a mile to a transit stop (2008). We can compute a polygon for the upper bound of this estimate using the mapboxapi
package.
wmata_stops <- st_read("data/wmata_silver_p1.gpkg", layer = "wmata_silver_p1")
hf_mi_stops <- mb_isochrone(wmata_stops,
profile = "walking",
distance = c(805),
id_column = "stop_id") |>
mutate(stop_yr = 2014) |>
left_join(st_drop_geometry(select(wmata_stops, c(stop_id, stop_name))),
by = join_by(id == stop_id))