Learn R Programming

Choroplethr

Choroplethr makes it easy to create color-coded (choropleth) maps in R. No knowledge of cartography or shapefiles needed; go directly from your geographically identified data to a highly customizable map with a single line of code! Supported geographies: U.S. states, counties, and census tracts, world countries and sub-country regions (e.g., provinces, prefectures, etc.).

Copy Link

Version

Install

install.packages('choroplethr')

Monthly Downloads

956

Version

5.0.0

License

BSD_3_clause + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Zhaochen He

Last Published

June 27th, 2025

Functions in choroplethr (5.0.0)

state.map.hires

An sf containing higher resolution geometry data for US states
df_state_demographics

A data.frame containing demographic statistics for each state plus the District of Columbia.
get_acs_data

Use tidycensus to obtain the data needed to create a choropleth map.
df_county_demographics

A data.frame containing demographic statistics for each county in the United States.
df_country_demographics

A data.frame containing population estimates for Countries in 2012.
df_president

A data.frame containing election results from the 2012 US Presidential election.
get_county_demographics

Get a handful of demographic variables on US Counties from the US Census Bureau as a data.frame.
county_choropleth_acs

Create a US County choropleth from ACS data
get_admin1_map

Download a map of first level administrative regions from naturalearthdata.com
county_choropleth

Create a choropleth map using U.S. county level data:
state.map.lores

An sf containing lower resolution geometry data for US states
state.regions

Supported regions for US states
df_president_ts

A data.frame containing all US presidential election results from 1789 to 2012
tract_choropleth

Create a choropleth map using census tract level data for a given state.
get_state_demographics

Get a handful of demographic variables on US States from the US Census Bureau as a data.frame.
df_congress116_party

A data.frame containing party affiliation data about the Congressional Districts of 116th US Congress
df_ny_tract_demographics

A data.frame containing demographic statistics for each Census Tract in New York State.
df_japan_census

A data.frame containing basic demographic information about Japan.
common_args

Common Parameters
congress116.regions

A data.frame containing geographic metadata about the Congressional Districts of the 116th US Congress
df_pop_ny_tract

A data.frame containing population estimates for all Census Tracts in New York State in 2012.
df_congress116_demographics

A data.frame containing demographic statistics about the 116th Congressional Districts
df_pop_state

A data.frame containing population estimates for US States in 2012.
get_tract_demographics

Get a handful of demographic variables on Census Tracts in a State from the US Census Bureau as a data.frame.
df_state_age_2010

A data.frame containing median age estimates for US states in 2010
get_tract_map

Download a map of all census tracts in a given state
df_state_age_2015

A data.frame containing median age estimates for US states in 2015
state.map.bigdc

An sf containing geometry data for US states with DC enlarged
state_choropleth_acs

Create a US State choropleth from ACS data
state_choropleth

Create a choropleth map using U.S. state level data
df_pop_county

A data.frame containing population estimates for US Counties in 2012.
Choropleth

The base Choropleth object.
county.map.2015

An sf containing geometry data for US counties in 2015
admin1_choropleth

Create a choropleth map using regional data at the sub-country level
country.regions

Supported regions for world countries
county.map.2024

An sf containing geometry data for US counties in 2024
country_choropleth

Create a choropleth map using country-level data
continental_us_states

A vector of the names of US Continental US States.
country.map

An sf containing geometry data for countries of the world
county.regions.2015

Supported regions for US counties in 2015
county.regions.2024

Supported regions for US counties in 2024
df_pop_country

A data.frame containing population estimates for Countries in 2012.
state.map.hex

An sf containing a hexagonal tile map for US states