NIEHS / amadeus

https://niehs.github.io/amadeus/
Other
7 stars 1 forks source link

Mm manuscript 0425 #78

Closed mitchellmanware closed 6 months ago

mitchellmanware commented 6 months ago

branch mm-manuscript-0425 includes:

  1. Rename download functions from download_*_data to download_* a. https://github.com/NIEHS/amadeus/issues/66 b. Removing redundant "data" provides uniform function names across download, process, and covariate functions. c. Applied to all unit tests and vignettes.

  2. Deprecate the directory_to_download_ parameter a. https://github.com/NIEHS/amadeus/issues/67 b. the directory_to_save parameter is used to create sub-directories for zip files and unzipped data files. c. download_merra2, download_geos, and download_narr_* create sub-directories for each collection of data downloaded.

  3. Download multiple collections with download_geos and download_merra2 a. https://github.com/NIEHS/amadeus/issues/64 b. Function accepts a vector of "collections" and downloads data files for temporal range for each collection c. Eliminates re-calls or for loop. d. Data saved in collection-specfiic sub-directory within directory_to_save

  4. Calculate covariates for polygons a. https://github.com/NIEHS/amadeus/issues/65 b. the process_locs_vector function, which prepares extraction locations before being passed to calc_worker, now accepts polygon boundaries from terra and sf packages. c. calc_worker has been updated to perform extractions with terra::extract if provided points and exactextractr::exact_extract if given polygons (includes polygon locs and buffered points)

  5. Temporal data of process_* and calc_* have been reviewed for accuracy a. https://github.com/NIEHS/amadeus/issues/68 b. calc_time sets date or hourly $time columns as POSIXt class, and year and year-month as integer class c. calc_check_time ensures proper time class before return to user d. time-less or time-range data (ie Ecoregions, gRoads, Koppen Geiger) are given temporal information with terra::metags, and returned in the calculated covariates data.frame in the $description column

  6. Retain point or polygon geometry in calculated covariates data.frame a. https://github.com/NIEHS/amadeus/issues/69 b. Geometry information is returned in "WKT" format as points and polygons c. Warning given in description for long character string if geom = TRUE and geometry is polygons

  7. process_hms accepts snake and camel case variables a. https://github.com/NIEHS/amadeus/issues/70 b. failed previously if variable = "light" instead of variable = "Light"

  8. Replaced redundant "level=" in pressure level covariates data.frame a. https://github.com/NIEHS/amadeus/issues/71 b. Retains long data format with pressure level variable in separate column from data. c. Perhaps discussion with group is necessary to determine whether we want long format (as is now) or wide (include pressure level value in column name)

  9. Updated README.md and download data vignette a. https://github.com/NIEHS/amadeus/issues/72 b. download_data and NASA EarthData Account vignette updated.

sigmafelix commented 6 months ago

@mitchellmanware Checked and merged. Thank you so much for your hard work! 👍