This repository contains R code for processing and analyzing two datasets: temperature data
which includes daily maximum temperature and daily minimum relative humidity records by zipcode, and seda data
which includes school information by zipcode.
The codes can be found in FASSE directory: /n/dominici_nsaph_l3/Lab/data_processing/seda_aggregation/ The data can be found in FASSE directory /n/dominici_nsaph_l3/Lab/data_processing/seda_aggregation/data/
SEDA Data: https://exhibits.stanford.edu/data/catalog/db586ns4974 Maximum air temperature: GRIDMET/Google Earth Engine Minimum relative humidity: GRIDMET/Google Earth Engine
To run the provided code, you need:
- R programming environment
- Required packages:
dplyr
,tidyr
- Clone the repository to your local machine.
- Install the required packages using
install.packages("dplyr")
andinstall.packages("tidyr")
in your R console. - Adjust file paths and names according to your data locations.
- Run the R scripts as described in the Data Processing section.
The seda_data_filtered
DataFrame is generated by reading seda_crosswalk_4.1.csv
which contains school-related information. It is filtered to retain only school name, school ID, year, and zipcode columns.
Result:
sedaschname | ncessch | sedasch | year | lzip |
---|---|---|---|---|
Albertville Middle School | 10000500870 | 10000500870 | 2013 | 35950 |
Evans Elementary School | 10000500879 | 10000500879 | 2013 | 35950 |
Albertville Elementary School | 10000500889 | 10000500889 | 2013 | 35950 |
Kate Duncan Smith DAR Middle | 10000600193 | 10000600193 | 2013 | 35747 |
Yearly maximum air temperature data is processed for years 2009 to 2018. Each year's data is loaded, converted to tidy format, and saved as .RData
files.
Result:
zipcode | date | max_air_temperature |
---|---|---|
01001 | 2016-01-01 | 277.3618 |
01001 | 2016-01-02 | 276.7532 |
01001 | 2016-01-03 | 278.6746 |
Yearly minimum relative humidity data is processed for years 2009 to 2018. Each year's data is loaded, converted to tidy format, and saved as .RData
files.
Result:
zipcode | date | min_relative_humidity |
---|---|---|
01001 | 2010-01-01 | 61.29655 |
01001 | 2010-01-02 | 58.00437 |
01001 | 2010-01-03 | 52.80716 |
This project is licensed under the MIT License.