The California Fire Science Consortium established fire regions across the state of California to aid in managing and responding to wildfires. This project aims to use metadata of weather stations within these established fire regions in order to provide relevant weather information during a wildfire event. Code in this project was used in a larger project for the National Science Foundation, where machine learning models were used on the created dataset to identify potential risk factors that are currently ignored by regulatory bodies. Links to the metadata listed by NOAA are listed in notebook used for creation of dataset.
The data for this project was obtained from the NOAA National Centers for Environmental Information (NCEI) Climate Data Record of Hourly Surface Meteorological and Upper-Air Observations.
The data was processed using Python and the following libraries:
- Requests
- Pandas
- Shapely
- Regular Expressions (re)
The steps involved in the data processing are as follows:
- The fire regions were established using the coordinates provided by the California Fire Science Consortium and stored as Shapely Polygons.
- A list of weather stations and their coordinates were extracted from the data file obtained from NCEI.
- For each weather station, the program checks if it is located within one of the established fire regions and appends it to a list of stations within that region.
- The function
lat_lon_to_shapely
was created to convert latitude and longitude into Shapely Point objects. - The function
find_region
takes a fire location and returns the fire region it is located in. - The function
region_station_list
takes a fire region and returns a list of weather stations and their coordinates within that region. - The function
closest_to_fire_center
takes a list of weather stations and a fire location and returns a list of the closest weather stations to the fire center.
- All of these combine to ultimately be used towards adding to initial dataset
The data output from this project adds the climate data acquired in the form of columns representing different variables for each row representing a fire in the dataset.
This project provided a useful tool for analyzing wildfire risk factors by providing relevant information from weather stations within established fire regions. This project motivated the creation of a future project that packaged the methodologies used, showcased on this github as simple_noaa.