mikejohnson51 / climateR

An R 📦 for getting point and gridded climate data by AOI
https://mikejohnson51.github.io/climateR/
MIT License
165 stars 40 forks source link

Add utility to animate outputs #71

Closed mikejohnson51 closed 11 months ago

mikejohnson51 commented 1 year ago

Add gifski as a dependency to provide animation tools.

animate = function(data, ...) {

...
}
mikejohnson51 commented 1 year ago

We now have


AOI = AOI::aoi_get(state = "OR")

g = getGLDAS(AOI = AOI,
         varname='rootmoist_inst',
         model='NOAH025_M.2.1',
         startDate='2006-10-01',
         endDate='2007-09-30')

animation(g$rootmoist_inst, 
          AOI = AOI,
          outfile = "tester.gif")

tester

mikejohnson51 commented 1 year ago

Added vector animation capacity:

AOI = AOI::aoi_get(state = "south", county = "all")

getGridMET(AOI,
               varname = "pr",
               startDate = "1991-10-29",
               endDate  = "1991-11-06") %>% 
  execute_zonal(geom = AOI, ID = "fip_code") %>% 
  animation(feild_pattern = "pr_", outfile = "test.gif")

test

mikejohnson51 commented 12 months ago

@anguswg-ucsb would you mind reviewing this changes (in viz.R) and seeing what you'd change/improve?

anguswg-ucsb commented 12 months ago

@anguswg-ucsb would you mind reviewing this changes (in viz.R) and seeing what you'd change/improve?

Yes, I'll take a look and let you know my edits.

mikejohnson51 commented 12 months ago

Super! If you find/add anything please send it this way as a PR :)