R - Map or GeoMap motion?

135 views
Skip to first unread message

nzcoops

unread,
Jun 11, 2012, 10:01:28 AM6/11/12
to Google Visualization API
Hi all,

Within R.

I'm looking to create a motion 'clip' where the data is geographical,
so based on say GeoMap as opposed to two axis like population size and
GDP etc. Is this possible? I'm new to gvis, have got gvisGeoMap and
gvisMap working, haven't seen an example yet where that is done within
a motion framework.

Basically I'm looking for 'cases' of a disease to show up as blips on
a map as time scrolls by, maybe I'm being optimistic.

Cheers

asgallant

unread,
Jun 11, 2012, 12:11:22 PM6/11/12
to google-visua...@googlegroups.com
You can do this (though I would suggest you use GeoCharts instead of GeoMaps, as GeoMaps are deprecated).  What kind of control are you looking to have for this?  Do you want to display cases at a given point in time or over a span of time?

nzcoops

unread,
Jun 11, 2012, 8:01:58 PM6/11/12
to google-visua...@googlegroups.com
Thanks for the reply. I prefer the look of Charts as opposed to Maps.

I'm hoping to be able to hit play and have it roll through by month (or year) with each frame showing a dot as to where a case was diagnosed in that given month (or year). The idea being we might see in the earlier years that the cases were coming from all over the region and the later years they're only coming from the main cities, for example.

Can you point me to an example, or even suggest a first attemp of how the GeoChart command should be 'wrapped' inside the motion command?

Cheers

asgallant

unread,
Jun 12, 2012, 11:01:54 AM6/12/12
to google-visua...@googlegroups.com
There isn't any "motion" command to make this work, you have to redraw the chart with the new data every time you want to make time advance.  I wrote up a simple script that auto-advances through time: http://jsfiddle.net/asgallant/86ZA3/1/

I made it based on countries, but you can use other locations.
Reply all
Reply to author
Forward
0 new messages