r - Dynamic choropleth, with time slider or auto playing -
i trying replicate this map:
http://darkhorseanalytics.com/blog/wp-content/uploads/2014/05/nybreathe.gif
which alternates showing housing , employment densities in nyc through day, in r.
i have spatial object, s
, census small area polygons , 2 variables, inhabitants (s@data$pop
) , employment (s@data$emp
), each area.
as in example, have 2 "extreme" cases:
- choropleth of
s@data$pop
, in blue, dominant @ midnight. - choropleth of
s@data$emp
, in red, dominant @ noon.
and 'intermediate' plots make smooth transition between "1." , "2.".
and result "auto play", e. i., keep repeating cycle between "1." , "2.".
i imagine ggplot2 + shiny, having time slider control time of day. , perhaps somehow automate, or autoplay time variable. doable in shiny (or other r solution)?
Comments
Post a Comment