Geocharts - drawing at state and county level

2,755 views
Skip to first unread message

Jess Smith

unread,
Jan 11, 2012, 9:00:07 AM1/11/12
to Google Visualization API
Hi! Can anyone post code showing how to draw geocharts at the state
and/or county level? I can only draw down to the national level so far
-- the continental US with no state outlines at all. Any advice would
be appreciated. Thanks!

asgallant

unread,
Jan 11, 2012, 9:49:37 AM1/11/12
to google-visua...@googlegroups.com
Set the 'resolution' option to 'provinces' and use the ISO 3166-2:US code for each state (ie, 'US-AL' for Alabama) in your DataTable.

Daniel Barrett

unread,
Jan 12, 2012, 1:28:04 AM1/12/12
to google-visua...@googlegroups.com
Using the ISO 3166-2 codes for the region looks promising, but I
didn't see in passing any information on how counties should be
referenced. I was hoping from your message that the Vis API team had
fixed an issue I am interested in,
http://code.google.com/p/google-visualization-api-issues/issues/detail?id=205,
but it doesn't look like that's the case. Do I refer to the counties
by name or by FIPS code, or is there some standard convention for
them?

I tried the playground using the "resolution: 'provinces'" option and
I was able to at least get a state map but it had no county borders.
If I changed my resolution to 'metros' instead I saw county lines but
my attempts to reference the counties in a chart failed.

As a topical example, how would one go about creating a geochart of
New Hampshire, say, with shading on each county for how many votes
went to one particular Republican running for the party nomination?

On Wed, Jan 11, 2012 at 8:49 AM, asgallant <drew_g...@abtassoc.com> wrote:
> Set the 'resolution' option to 'provinces' and use the ISO 3166-2:US code
> for each state (ie, 'US-AL' for Alabama) in your DataTable.
>

> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-visualization-api/-/tQ2Vo_oTBT8J.
>
> To post to this group, send email to
> google-visua...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-visualizati...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-visualization-api?hl=en.

asgallant

unread,
Jan 12, 2012, 10:35:28 AM1/12/12
to google-visua...@googlegroups.com
There is no support for county-level mapping.  The 'metros' resolution is for metro codes, not counties.  Metro codes can span different states, so they probably aren't useful for mapping votes.

Jess Smith

unread,
Jan 18, 2012, 10:46:33 AM1/18/12
to Google Visualization API
Are "metro codes" the same as MSAs (Metropolitan Statistical Areas)
that are commonly used in Census and other government data?

asgallant

unread,
Jan 19, 2012, 9:46:17 AM1/19/12
to google-visua...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages