Logo Lanfrica

one-acre-fund/arc2weather

Domain:

climateagriculture

Record type:

software
Creator:
One
Host:
R package for systematically downloading available arc2 weather .tif files for east Africa # Africa Rainfall Climatology weather data package **Work in progress** Check with Matt Lowes if you have questions! Code for systematically downloading available ARC2 weather .tif files for east Africa and shaping the data for inclusion in the One Acre Fund data warehouse. One Acre Fund has been using aWhere for weather data access for the simplicity of their GPS based API. However, we're looking to do more with site GPS and weather data and have not seen aWhere to be a superior product in terms of quality. Therefore we are accesing publically available weather datasets so that we can more easily communicate and share with collaborators on weather data related projects. This code is the example / starter code for accessing a publically available weather dataset and formatting the data for 1AF's use cases. Eventually we'll be adding these data or CHIRPS into the organizational data warehouse so that we can automate extracting long and short term weather averages using site GPS. # How to install To install this package, please do the following: 1. You'll need to create a personal access token (PAT) on github to download the package from github. + Go to the tokens page on github to create a token. Be sure to select the `repo` scope so that it works! + Then, you'll need to edit the `.Renviron` file on your computer to make that PAT available to R when it tries to download the package. + To do this, type `usethis::edit_r_environ()` in R to edit the `.Renviron` file. + In the `.Renviron` file type `GITHUB_PAT = "longstringoflettersandnumbersyougetfromgithub"`. (What goes in the quotes is the PAT you got from GitHub). Then save and close that file. You might have to restart R for the changes to take effect. 2. Open R script and download the package using `devtools::install_github(one-acre-fund/arc2weather)`. (You can check that the GITHUB_PAT is working as it should by first typing `Sys.getenv("GITHUB_PAT")` in the R console.) 3. The package should now be available …