https://github.com/travisz09/prism
Bulk download PRISM data from OSU api.
https://github.com/travisz09/prism
Last synced: about 1 month ago
JSON representation
Bulk download PRISM data from OSU api.
- Host: GitHub
- URL: https://github.com/travisz09/prism
- Owner: travisz09
- License: mit
- Created: 2024-10-21T22:19:09.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-10-30T20:08:04.000Z (7 months ago)
- Last Synced: 2024-10-30T21:18:45.675Z (7 months ago)
- Language: R
- Size: 25.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: Citations.md
Awesome Lists containing this project
README
# PRISM
## Bulk download PRISM data from OSU api.
### Travis Zalesky### Download bulk data from Oregon State University (OSU) Climate Group Parameter-elevation Regressions on Independent Slopes Model (PRISM).
PRISM data is available for a variety of common climate variables such as min/max temperature, precipitation, dew point etc. which are extremely useful in a variety of research applications. These datasets can be conveniently accessed through the [PRISM website](https://prism.oregonstate.edu/recent/), or they can be accessed programmatically through the data api using the R package [prism](https://cran.r-project.org/web/packages/prism/prism.pdf).
While the prism R package is great, this script extends the prism package in an attempt to solve a common problem. PRISM data is delivered as a raster for the contiguous US (at 4Km or 800m resolution), when often only a much smaller extent is needed to answer the research question at hand. Depending on the project, storing a large number of rasters for the whole US may be unnecessary and could massively increase data storage costs. Originally developed for a research project covering the Phoenix Metro. area this script is designed to work with a shapefile defining the area of interest, and includes a variety of functions which will iteratively (1) download the requested data file from PRISM, (2) clip the data to the study area, and (3) save the output clipped raster, preserving all relevant metadata and file structure. The original (US extent) data files are then, optionally, deleted to save storage space.
This repository requires a Shapefile (not provided), and is not intended to be run top to bottom. Rather there are a few variables near the top that are to be updated based on the PRISM vars required by the users, the shapefile is loaded into the R environment, then the user should identify the correct code block to run based on the temporal resolution needed for their research.
Thanks to the people at OSU Climate Group, as well as Edmund M. Hart and Kendon Bell, authors of the prism R package.
Feel free to use or modify these scripts as you see fit. I would appreciate it if you acknowledged the source for any substantial portion of this code used in your project. Thank you.