MazamaScience / AirFireModeling

Utilities to ease merging of USFS AirFire model output and monitoring data.
0 stars 0 forks source link

refactor modelDomains() and modelInfo() #10

Closed jonathancallahan closed 4 years ago

jonathancallahan commented 4 years ago

Looks like providing access to this information grew organically and is ready for a refactoring.

The information we need is quite small and is most useful as a dataframe. So the AirFireModeling.R function should just define a complete bluesky_modelInfo dataframe as a package data object, avoiding the unnecessary function definitions and calls.

The following examples show how to create package data in R code. This is appropriate for package data files that are small and hand-crafted, like the model info.

https://github.com/MazamaScience/MazamaLocationUtils/blob/master/R/MazamaLocationUtils.R coreMetadataNames

https://github.com/MazamaScience/MazamaSpatialUtils/blob/master/R/MazamaSpatialUtils.R CONUS

https://github.com/MazamaScience/PWFSLSmoke/blob/master/R/PWFSLSmoke.R AQI

hmrtn commented 4 years ago

bluesky_modelInfo is now an internal dataframe. It no longer contains subdirectory information strings, as this was throwing very strange errors when using bluesky_availiablemodels().