
redist - Simulation Methods for Legislative Redistricting
Enables researchers to sample redistricting plans from a pre-specified target distribution using Sequential Monte Carlo and Markov Chain Monte Carlo algorithms. The package allows for the implementation of various constraints in the redistricting process such as geographic compactness and population parity requirements. Tools for analysis such as computation of various summary statistics and plotting functionality are also included. The package implements the SMC algorithm of McCartan and Imai (2023) <doi:10.1214/23-AOAS1763>, the enumeration algorithm of Fifield, Imai, Kawahara, and Kenny (2020) <doi:10.1080/2330443X.2020.1791773>, the Flip MCMC algorithm of Fifield, Higgins, Imai and Tarr (2020) <doi:10.1080/10618600.2020.1739532>, the Merge-split/Recombination algorithms of Carter et al. (2019) <doi:10.48550/arXiv.1911.01503> and DeFord et al. (2021) <doi:10.1162/99608f92.eb30390f>, and the Short-burst optimization algorithm of Cannon et al. (2020) <doi:10.48550/arXiv.2011.02288>.
Last updated
geospatialgerrymanderingredistrictingsamplingopenblascppopenmp
9.85 score 74 stars 2 dependents 473 scripts 440 downloads
geomander - Geographic Tools for Studying Gerrymandering
A compilation of tools to complete common tasks for studying gerrymandering. This focuses on the geographic tool side of common problems, such as linking different levels of spatial units or estimating how to break up units. Functions exist for creating redistricting-focused data for the US.
Last updated
cpp
8.80 score 15 stars 2 dependents 316 scripts 329 downloads
bskyr - Interact with 'Bluesky' Social
Collect data from and make posts on 'Bluesky' Social via the Hypertext Transfer Protocol (HTTP) Application Programming Interface (API), as documented at <https://atproto.com/specs/xrpc>. This further supports broader queries to the Authenticated Transfer (AT) Protocol <https://atproto.com/> which 'Bluesky' Social relies on. Data is returned in a tidy format and posts can be made using a simple interface.
Last updated
atprotoatprotocolblueskybluesky-apibskysocial-media
8.68 score 33 stars 1 dependents 48 scripts 1.4k downloads
redistmetrics - Redistricting Metrics
Reliable and flexible tools for scoring redistricting plans using common measures and metrics. These functions provide key direct access to tools useful for non-simulation analyses of redistricting plans, such as for measuring compactness or partisan fairness. Tools are designed to work with the 'redist' package seamlessly.
Last updated
openblascpp
8.60 score 11 stars 3 dependents 37 scripts 431 downloads
tinytiger - Lightweight Interface to TIGER/Line Shapefiles
Download geographic shapes from the United States Census Bureau TIGER/Line Shapefiles <https://www.census.gov/geographies/mapping-files/time-series/geo/tiger-line-file.html>. Functions support downloading and reading in geographic boundary data. All downloads can be set up with a cache to avoid multiple downloads. Data is available back to 2000 for most geographies.
Last updated
6.85 score 5 stars 8 dependents 39 scripts 514 downloads
PL94171 - Tabulate P.L. 94-171 Redistricting Data Summary Files
Tools to process legacy format summary redistricting data files produced by the United States Census Bureau pursuant to P.L. 94-171. These files are generally available earlier but are difficult to work with as-is.
Last updated
census
6.70 score 8 stars 1 dependents 35 scripts 487 downloads
censable - Making Census Data More Usable
Creates a common framework for organizing, naming, and gathering population, age, race, and ethnicity data from the Census Bureau. Accesses the API <https://www.census.gov/data/developers/data-sets.html>. Provides tools for adding information to existing data to line up with Census data.
Last updated
6.06 score 11 stars 5 dependents 46 scripts 674 downloadsThemePark - Themes for 'ggplot2' from Popular Culture
Provides 'ggplot2' themes that mirror works from popular culture, such as Barbie, Star Wars, Game of Thrones, and others. The package currently holds 14 themes and a number of corresponding discrete color scales, palettes, and fonts. Each theme (e.g., 'theme_barbie') generates a unique color scheme and font for a 'ggplot2' object that matches the color scheme and font found in the movie, TV show, or video game.
Last updated
ggplot2themes
6.05 score 203 stars 124 scripts
congress - Access the Congress.gov API
Download and read data on United States congressional proceedings. Data is read from the Library of Congress's Congress.gov Application Programming Interface (<https://github.com/LibraryOfCongress/api.congress.gov/>). Functions exist for all version 3 endpoints, including for bills, amendments, congresses, summaries, members, reports, communications, nominations, and treaties.
Last updated
5.78 score 21 stars 19 scripts 748 downloads
palette - Color Scheme Helpers
Hexadecimal codes are typically used to represent colors in R. Connecting these codes to their colors requires practice or memorization. 'palette' provides a 'vctrs' class for working with color palettes, including printing and plotting functions. The goal of the class is to place visual representations of color palettes directly on or, at least, next to their corresponding character representations. Palette extensions also are provided for data frames using 'pillar'.
Last updated
5.75 score 5 stars 7 dependents 27 scripts 913 downloads
manifesto - Create Project Manifest Files
Provides 'TOML' representations of packages needed that must be installed to run a project. Includes functions to specify detailed installation functions, validate files, and to use a given file as the requirements for a project. Handles package installations, when necessary, via 'pak'.
Last updated
5.65 score 6 stars 4 scripts 6 downloads
rict - Redistricting in Clean Tables
Provides a suite of tools to create tables that accompany maps. The tools create clean, informative tables for electoral outcomes, compactness, and other district-level quantities. Most tools are aimed at the redistricting context, but are broadly applicable to other electoral data.
Last updated
5.43 score 2 stars 1 dependents 18 scripts 467 downloads
baf - Block Assignment Files
Download and read US Census Bureau data relationship files. Provides support for cleaning and using block assignment files since 2010, as described in <https://www.census.gov/geographies/reference-files/time-series/geo/block-assignment-files.html>. Also includes support for working with block equivalency files, used for years outside of decennial census years.
Last updated
5.28 score 1 stars 3 dependents 106 scripts 304 downloads
dots - Dot Density Maps
Generate point data for representing people within spatial data. This collects a suite of tools for creating simple dot density maps. Several functions from different spatial packages are standardized to take the same arguments so that they can be easily substituted for each other.
Last updated
4.92 score 4 stars 14 scripts 558 downloads
flexoki - Inky Color Schemes
Provides color palettes designed to be reminiscent of text on paper. The color schemes were taken from <https://stephango.com/flexoki>. Includes discrete, continuous, and binned scales that are not necessarily color-blind friendly. Simple scale and theme functions are available for use with 'ggplot2'.
Last updated
4.73 score 5 stars 2 dependents 18 scripts 835 downloads
ei - Ecological Inference
Software accompanying Gary King's book: A Solution to the Ecological Inference Problem. (1997). Princeton University Press. ISBN 978-0691012407.
Last updated
cpp
4.45 score 38 scripts 324 downloads
ggredist - Scales, Geometries, and Extensions of 'ggplot2' for Election Mapping
Provides 'ggplot2' extensions for political map making. Implements new geometries for groups of simple feature geometries. Adds palettes and scales for red to blue color mapping and for discrete maps. Implements tools for easy label generation and placement, automatic map coloring, and themes.
Last updated
4.17 score 1 stars 1 dependents 49 scripts 221 downloads
opengraph - Process Metadata from the 'Open Graph Protocol'
Social media sites often embed cards when links are shared, based on metadata in the 'Open Graph Protocol' (<https://ogp.me/>). This supports extracting that metadata from a website. It further allows for the creation of tags to add to a website to support the 'Open Graph Protocol' and provides a list of the standard tags and their required properties.
Last updated
4.08 score 1 stars 2 dependents 7 scripts 613 downloadsadj - Lightweight Adjacency Lists
Provides an S3 class to represent graph adjacency lists using 'vctrs'. Allows for creation, subsetting, combining, and pretty printing of these lists. Adjacency lists can be easily converted to zero-indexed lists, which allows for easy passing of objects to low-level languages for processing.
Last updated
4.02 score 1 stars 1 dependents 6 scripts 194 downloads
cvap - Citizen Voting Age Population
Works with the Citizen Voting Age Population special tabulation from the US Census Bureau <https://www.census.gov/programs-surveys/decennial-census/about/voting-rights/cvap.html>. Provides tools to download and process raw data. Also provides a downloading interface to processed data. Implements a very basic approach to estimate block level citizen voting age population from block group data.
Last updated
4.00 score 4 stars 8 scripts 224 downloads
wf - Artificial Intelligence Workflow Tools
Manage skills for large language model coding agents. Supports installing skills from 'GitHub' or local directories, tracking versions in a lock file, and keeping installations current. Installations can be scoped to a single project or shared globally across projects.
Last updated
3.95 score 3 stars 6 scripts 513 downloads
crayons - Color Palettes from Crayon Boxes
Provides color palettes based on crayon colors since the early 1900s. Colors are based on various crayon colors, sets, and promotional palettes, most of which can be found at <https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors>. All palettes are discrete palettes and are not necessarily color-blind friendly. Provides scales for 'ggplot2' for discrete coloring.
Last updated
3.78 score 6 stars 5 scripts 195 downloads
lobby - Interact with the 'US Senate Lobbying Disclosure API'
Download and read data on lobbying in the United States Congress. Data is queried from the Senate's Application Programming Interface (<https://lda.senate.gov/api/>). This supports filings since 2008. Functions exist for all primary data endpoints, including queries by filings, contributions, registrations, clients, and lobbyists.
Last updated
3.70 score 2 stars 3 scripts 492 downloads
feltr - Access the Felt API
Upload, download, and edit internet maps with the Felt API (<https://developers.felt.com/rest-api/getting-started>). Allows users to create new maps, edit existing maps, and extract data. Provides tools for working with layers, which represent geographic data, and elements, which are interactive annotations. Spatial data accessed from the API is transformed to work with 'sf'.
Last updated
3.70 score 5 stars 9 scripts 640 downloads
divseg - Calculate Diversity and Segregation Indices
Implements common measures of diversity and spatial segregation. This package has tools to compute the majority of measures are reviewed in Massey and Denton (1988) <doi:10.2307/2579183>. Multiple common measures of within-geography diversity are implemented as well. All functions operate on data frames with a 'tidyselect' based workflow.
Last updated
3.56 score 3 stars 12 scripts 251 downloads
gptzeror - Identify Text Written by Large Language Models using 'GPTZero'
An R interface to the 'GPTZero' API (<https://gptzero.me/docs>). Allows users to classify text into human and computer written with probabilities. Formats the data into data frames where each sentence is an observation. Paragraph-level and document-level predictions are organized to align with the sentences.
Last updated
3.48 score 3 stars 5 scripts 640 downloads
gtscales - Color Scale Extensions for 'gt'
Adds legend helpers for color-encoded 'gt' tables. The primary interface combines 'gt::data_color()' with matched legends for continuous, binned, quantile, and discrete scales, while lower-level helpers support legend-only and reusable scale specification workflows.
Last updated
3.48 score 2 stars 3 scripts
apportion - Apportion Seats
Convert populations into integer number of seats for legislative bodies. Implements apportionment methods used historically and currently in the United States for reapportionment after the Census, as described in <https://www.census.gov/history/www/reference/apportionment/methods_of_apportionment.html>. These methods are also sometimes used for allocating seats by votes in proportional representation systems.
Last updated
fortran
3.30 score 1 stars 4 scripts 209 downloads
enum - Enumerate Partitions of Grid Graphs
Enumerates polyomino tilings of grid graphs. Partitions an m by n grid into k connected pieces where each piece has a size within given bounds, under rook or queen contiguity rules. A translation of the Julia 'enumerator' package by Schutzman (2019) <doi:10.5281/zenodo.3467675>.
Last updated
3.30 score 1 stars 198 scripts
redistverse - Easily Install and Load Redistricting Software
Easy installation, loading, and control of packages for redistricting data downloading, spatial data processing, simulation, analysis, and visualization. This package makes it easy to install and load multiple 'redistverse' packages at once. The 'redistverse' is developed and maintained by the Algorithm-Assisted Redistricting Methodology (ALARM) Project. For more details see <https://alarm-redist.org>.
Last updated
3.26 score 1 stars 18 scripts 193 downloads
redistio - Interactive Redistricting
A point and click editor for districts built on 'shiny' and 'mapgl'. Users can draw districts and calculate standard redistricting metrics, like compactness or the number of administrative splits. Maps can be exported as assignment files or shapefiles, readable by most other redistricting software.
Last updated
3.20 score 2 stars 4 scripts
ha - Interact with 'Home Assistant'
Provides tools to control smart home features via the API for 'Home Assistant' <https://developers.home-assistant.io/>. Allows for controlling states, services, and events. Supports configuring both local access and remote access.
Last updated
2.90 score 2 stars 3 scripts
pr - Classes for Probabilities
Provides S3 classes to represent probability vectors and matrices using 'vctrs'. Allows for creation, validation, and pretty printing of each class. Includes a special probability matrix type with counts to allow for cases with limited possible values.
Last updated
2.68 score 1 stars 19 scripts
ggtiger - Princeton Themes for 'ggplot2'
What the package does (one paragraph).
Last updated
2.32 score 1 stars 14 scripts
royale - Clash Royale API
R interface to the official API for Clash Royale <https://developer.clashroyale.com/#/>.
Last updated
1.70 score 4 scripts
parrot - Interact with Party Parrot Gifs
What the package does (one paragraph).
Last updated
1.70 score 7 scriptsstyler.quote - Third-party Style Guide For 'quote' Style
Styles code according to the 'quote' style using 'styler'.
Last updated
1.70 score 3 scriptsacronames - Create Acronyms for Naming Things
Simple tool for developing names based on first letters of keywords.
Last updated
1.70 score 1 stars 1 scripts













