Closed sigmafelix closed 7 months ago
Related to NIEHS/beethoven#174 NIEHS/beethoven#189 NIEHS/amadeus#49. Will discuss with @mitchellmanware to minimize task conflicts and streamline our workflow.
After a discussion, we decided on merging our changes then replace repeated lines in each download function with reusable functions I wrote.
I think that writing a wrapper function is not urgent. It will be done when we refactor the codes around wrapping up the covariate calculation milestone.
Mitchell Manware, December 20
Wrapper function has been incorporated into URL unit tests for each dataset. Tests are on branch mm_download_unit_tests_1214 in tests/testthat/test-download_functions.R
.
@mitchellmanware
I updated my branch with a wrapper function download_data()
and the replacement of repeated lines with support functions (in ./input/Rinput/download_functions/download_support.R). Could you merge my branch into yours then add tests for remaining download functions? For the local test, download.R and download_support.R will need to be copied into ./R.
Thank you.
cf. Wrapper function: https://github.com/Spatiotemporal-Exposures-and-Toxicology/NRTAPmodel/blob/ead3433f4beb1f9b20d0b22d85a96e15e365b81f/input/Rinput/download_functions/download.R#L1-L80
TRI/AADT (from NEI) data download functions were added to my development branch. I will close this issue.
Following the discussion today, we agree on writing a wrapper function to simplify data download procedure. A basic form of the wrapper would look like:
There are several discussion points:
name_element
orflag_element
?tools
ordata
directory? -- following the configuration script idea of @dzilber