GeoMap Timeline

Skip to first unread message

Bluestreak2k5

unread,
Feb 3, 2012, 9:38:59 PM2/3/12
to Google Visualization API
I've been trying to find how to create a GeoMap timeline such as found
on Google Insights

http://www.google.com/insights/search/#geo=&q=Gas+price&cmpt=q

But I can't find any documentation on it. Is this something in Alpha/
Beta and can I get access to it?

Thanks

asgallant

unread,
Feb 6, 2012, 8:52:02 AM2/6/12
to google-visua...@googlegroups.com
It looks to me like that is basically an Annotated Timeline and a Geo Chart in a Dashboard, which is doable in the API as is.

Bluestreak2k5

unread,
Feb 7, 2012, 12:08:57 AM2/7/12
to Google Visualization API
Thanks! I never knew you could do such things with the charts, its
awesome!

This is my first attempt at getting such a thing working, but I've
come to a point where I don't know how to continue.

http://www.chrisdblumberg.com/unemployment/animated.html

I get an error saying I can't use dates in the arraytoData function.
Am I supposed to create 2 different dataTables and somehow assign them
to the 2 different charts?

I'm sure there are other errors after that, but I couldn't get past
that one.

asgallant

unread,
Feb 7, 2012, 9:30:13 AM2/7/12
to google-visua...@googlegroups.com
Try this instead:

var data google.visualization.DataTable();
data.addColumn('date''Date');
data.addColumn('string''State');
data.addColumn('number''Unemployment');
data.addRows([
    [new Date(200811)"US-AK"120000],
    [new Date(200821)"US-AK"130000],
    [new Date(200831)"US-AK"140000],
    [new Date(200841)"US-AK"150000],
    [new Date(200851)"US-AK"160000],
    [new Date(200861)"US-AK"170000],
    [new Date(200871)"US-AK"180000],
    [new Date(200881)"US-AK"190000]
]); 

Bluestreak2k5

unread,
Feb 7, 2012, 12:25:30 PM2/7/12
to Google Visualization API
Thanks I'll try that when I get home,

also is there a DateFilter for the controlType? I haven't been able to
find any list of what type of filters can be inserted here in the
Control Wrapper.

asgallant

unread,
Feb 7, 2012, 12:53:11 PM2/7/12
to google-visua...@googlegroups.com
I don't believe there is a date range filter available (yet?).

Bluestreak2k5

unread,
Feb 7, 2012, 2:12:12 PM2/7/12
to Google Visualization API
How would you create a controlWrapper on the Chart then, as I am
trying to do combing the GeoMap and Annotated timeline? Store the date
as a string and use a stringFilter on it?

Bluestreak2k5

unread,
Feb 7, 2012, 11:15:57 PM2/7/12
to Google Visualization API
I don't think its a Dashboard, I have it working, from what I
understand of the dashboard API this is what it should look like.

http://www.chrisdblumberg.com/unemployment/animated.html

I've also spent the time looking through other possible ways of doing
this in the API.

Their is animations, however it lists GeoChart and GeoMap not being
supported.

Is it possible they are calling clear() and drawData() over and over
to get this effect?

Here is an example using a package,
http://code.google.com/p/google-motion-charts-with-r/#Examples

The example has the exact same timeline feature as Google insights,
but I contacted them, and even they didn't know how to do it.

asgallant

unread,
Feb 8, 2012, 9:04:38 AM2/8/12
to google-visua...@googlegroups.com
Ahh - I had assumed you were referring to the combination of the GeoChart and AnnotatedTimeline chart they have on that page (which is where the Dashboard comes in).  I missed the 'View Change Over Time' option on the map; this is most likely a custom version of the GeoMap, which would not be available to us mere mortals (ala Google Finance).  You could roll your own version using GeoCharts (which wouldn't have the fade-in/fade-out effects [yet?]) by using a timer and redrawing after updating the DataTable (or changing the filter on a DataView and redrawing).
Reply all
Reply to author
Forward
0 new messages