View source: R/countypointmap.R
countypointmap | R Documentation |
very simple mapping of color coded map of US counties.
countypointmap(
x,
query = NULL,
state_zoom = NULL,
title = "",
num_colors = 1,
...
)
x |
required vector of numeric values to plot |
query |
flexible way to define what locations - default is all US counties.
Can be a set of countyfips or full names like Cook County IL or even one or more states -
See |
state_zoom |
optional but more flexible than in county_choropleth, which requires it be the full state name all lowercase. This function instead accepts case-insensitive state name or two letter state abbreviation or state fips as number or text. |
title |
required, used in |
num_colors |
Default is 1 (unlike default in county_choroplethr) for graded colors to show outliers well, passed to |
... |
Additional parameters like state_zoom (but in ), to pass to |
This is just a wrapper for county_choropleth
but it is much more flexible in how the counties are specified.
While county_choropleth
requires statecounty fips numbers,
and zooms in on a state defined by 2-digit fips,
this wrapper lets you specify counties by full name like Cook County IL
or even one or more states.
It is buggy as drafted, however.
Also note acs package is useful such as for county_choropleth_acs('B01001', endyear = 2018, state_zoom = 'new york')
Just draws a map
county_choropleth
pointmap
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.