Learn R Programming

⚠️There's a newer version (4.0.0) of this package.Take me there.

Choroplethr

Choroplethr simplifies the creation of choropleth maps in R. Choropleths are thematic maps where geographic regions, such as states, are colored according to some metric, such as the number of people who live in that state. Choroplethr simplifies this process by

  1. Providing ready-made functions for creating choropleths using 220 different maps.
  2. Providing API connections to interesting data sources for making choropleths.
  3. Providing a framework for creating choropleths from arbitrary shapefiles.

Documentation

Documentation for choroplethr can be found Choroplethr.com.

Technical Support

If you have a technical question about Choroplethr, please ask on StackOverflow: https://stackoverflow.com/questions/tagged/choroplethr.

Copy Link

Version

Install

install.packages('choroplethr')

Monthly Downloads

1,033

Version

3.7.1

License

BSD_3_clause + file LICENSE

Maintainer

Ari Lamstein

Last Published

October 5th, 2022

Functions in choroplethr (3.7.1)

USAChoropleth

Normal choropleth that draws Alaska and Hawaii as insets. In addition to a columns named "region" and "value", also requires a column named "state".
CountyChoropleth

Create a county-level choropleth
StateChoropleth

Create a state-level choropleth
Admin1Choropleth

An R6 object for creating Administration Level 1 choropleths.
TractChoropleth

An R6 object for creating choropleths of Census Tracts.
Admin1RegionChoropleth

An R6 object for creating Administration Level 1 choropleths based on regions.
CountyZoomChoropleth

Create a county-level choropleth that zooms on counties, not states.
calculate_percent_change

Calculate the percentage change between two choroplethr dataframes.
admin1_region_choropleth

Create a map of Administrative Level 1 regions
county_choropleth_acs

Create a US County choropleth from ACS data
CountryChoropleth

An R6 object for creating country-level choropleths.
continental_us_states

A vector of the names of US Continental US States.
Choropleth

The base Choropleth object.
admin1_choropleth

Create an admin1-level choropleth for a specified country
country_choropleth

Create a country-level choropleth
county_choropleth

Create a choropleth of US Counties
congress116.regions

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

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

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

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

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

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

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

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

Remove non-voting Congressional Districts from a data.frame
get_acs_data

Returns a list representing American Community Survey (ACS) estimates
df_county_demographics

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

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

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

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

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

Get a handful of demographic variables on US Congressional Districts from the US Census Bureau as a data.frame.
get_tract_map

Get a map of tracts in a state, as a data.frame
df_state_demographics

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

Place two maps side by side
tract_choropleth

Create a choropleth of Census Tracts in a particular state.
state_choropleth_acs

Create a US State choropleth from ACS data
choroplethr_animate

Animate a list of choropleths
choroplethr_wdi

Create a country-level choropleth using data from the World Bank's World Development Indicators (WDI)
df_pop_ny_tract

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

A data.frame containing median age estimates for US states in 2015
df_pop_state

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

Create box plots to visualize race and ethnicity by party
get_county_demographics

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

Create a choropleth of US States