An RKWard GUI Plugin for US Census Bureau Data Extraction and Spatial Mapping
rk.tidycensus provides a seamless, point-and-click graphical interface inside RKWard to download microdata, socio-economic indicators, and spatial geometries from the US Census Bureau. Acting as a GUI wrapper for the powerful tidycensus R package by Kyle Walker, this plugin allows users to fetch, clean, and map census data without writing a single line of code.
This package includes a multi-component workflow: it not only downloads the data but also provides a dedicated plotter to map the spatial outputs instantly.
sf): Automatically downloads and attaches boundary shapefiles to your census data (geometry = TRUE).tidycensus objects directly without the need for manual spatial joins (left_join).tigris caching and silences console clutter during heavy shapefile downloads.You must have RKWard installed along with the following R packages:
install.packages(c("tidycensus", "sf", "ggplot2", "viridis"))
Note: You will need a free US Census Bureau API Key to download data. You can request one here.
You can install this plugin directly from GitHub using devtools:
# Install the plugin
# devtools::install_github("AlfCano/rk.tidycensus")
install.packages("rk.tidycensus", repos = c('https://alfcano.r-universe.dev', 'https://cloud.r-project.org'))
Once installed, open RKWard, navigate to Settings -> Configure RKWard -> Plugins, and activate rk.tidycensus.
This plugin adds two new tools to your RKWard menus, designed to be used in sequence:
Navigate to: Data ➔ Official Statistics ➔ Download US Census Data
.Renviron). Select your desired survey (e.g., ACS 5-Year) and the Year.B01003_001 for Total Population).us_census_data).Navigate to: Plots ➔ Maps ➔ Plot TidyCensus Map
Since tidycensus already binds the data to the spatial polygons, mapping is instantaneous:
us_census_data object. Choose the value column you want to map (usually estimate).The graphical interface automatically adapts to your RKWard language settings. Currently supported languages:
Author: Alfonso Cano (@AlfCano)
Email: alfonso.cano@correo.buap.mx
This project is licensed under the GPL (>= 3) License.
Disclaimer: This package is a third-party GUI tool and is not officially affiliated with the US Census Bureau.