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) <arXiv:1911.01503> and DeFord et al. (2021) <doi:10.1162/99608f92.eb30390f>, and the Short-burst optimization algorithm of Cannon et al. (2020) <arXiv:2011.02288>.
Last updated 9 days ago
geospatialgerrymanderingredistrictingsamplingopenblascppopenmp
9.39 score 67 stars 259 scripts 439 downloadsredist - 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) <arXiv:1911.01503> and DeFord et al. (2021) <doi:10.1162/99608f92.eb30390f>, and the Short-burst optimization algorithm of Cannon et al. (2020) <arXiv:2011.02288>.
Last updated 8 months ago
geospatialgerrymanderingredistrictingsampling
8.69 score 67 stars 259 scripts 438 downloadsgeomander - 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 5 months ago
cpp
8.24 score 14 stars 1 packages 187 scripts 436 downloadsredistmetrics - 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 6 months ago
7.94 score 10 stars 2 packages 23 scripts 251 downloadsredistmetrics - 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 6 months ago
7.94 score 10 stars 2 packages 23 scripts 251 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 7 months ago
ggplot2themes
6.65 score 198 stars 84 scriptsbskyr - 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 11 hours ago
atprotobluesky
6.15 score 16 stars 16 scripts 801 downloadstinytiger - 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 29 days ago
6.09 score 2 stars 6 packages 23 scripts 381 downloadsname - Tools for Working with Names
A system for organizing column names in data. Aimed at supporting a prefix-based and suffix-based column naming scheme. Extends 'dplyr' functionality to add ordering by function and more explicit renaming.
Last updated 2 years ago
5.98 score 1 stars 19k scripts 264 downloadsPL94171 - 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 2 years ago
census
5.89 score 7 stars 1 packages 37 scripts 335 downloadscensable - 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 months ago
5.76 score 8 stars 4 packages 40 scripts 385 downloadsalarmdata - Download, Merge, and Process Redistricting Data
Utility functions to download and process data produced by the ALARM Project, including 2020 redistricting files Kenny and McCartan (2021) <https://alarm-redist.org/posts/2021-08-10-census-2020/> and the 50-State Redistricting Simulations of McCartan, Kenny, Simko, Garcia, Wang, Wu, Kuriwaki, and Imai (2022) <doi:10.7910/DVN/SLCD3E>. The package extends the data introduced in McCartan, Kenny, Simko, Garcia, Wang, Wu, Kuriwaki, and Imai (2022) <doi:10.1038/s41597-022-01808-2> to also include states with only a single district.
Last updated 6 months ago
5.10 score 5 stars 28 scripts 267 downloadspalette - 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 6 months ago
5.09 score 4 stars 3 packages 17 scripts 261 downloadsfeltr - Access the Felt API
Upload, download, and edit internet maps with the Felt API (<https://feltmaps.notion.site/Felt-Public-API-reference-c01e0e6b0d954a678c608131b894e8e1>). 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 6 months ago
4.86 score 4 stars 6 packages 9 scripts 565 downloadscongress - 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 months ago
4.65 score 14 stars 16 scripts 662 downloadsei - Ecological Inference
Software accompanying Gary King's book: A Solution to the Ecological Inference Problem. (1997). Princeton University Press. ISBN 978-0691012407.
Last updated 2 years ago
cpp
4.52 score 37 scripts 250 downloadsggredist - 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 5 months ago
4.38 score 1 stars 1 packages 32 scripts 219 downloadsggredist - 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 5 months ago
4.38 score 1 stars 1 packages 32 scripts 219 downloadsdots - 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 1 years ago
4.18 score 3 stars 8 scripts 181 downloadsbaf - 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 4 months ago
4.08 score 2 packages 4 scripts 229 downloadsplanscorer - Score Redistricting Plans with 'PlanScore'
Provides access to the 'PlanScore' Application Programming Interface (<https://github.com/PlanScore/PlanScore/blob/main/API.md>) for scoring redistricting plans. Allows for upload of plans from block assignment files and shape files. For shapes in memory, such as from 'sf' or 'redist', it processes them to save and upload. Includes tools for tidying responses and saving output from the website.
Last updated 2 months ago
3.30 score 3 scripts 533 downloadsredistverse - 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 6 months ago
3.30 score 1 stars 5 scripts 484 downloadscvap - 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 9 months ago
3.30 score 2 stars 7 scripts 233 downloadscrayons - 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 8 months ago
3.18 score 1 stars 4 scripts 249 downloadsredistio - Interactive Redistricting
A point and click editor for districts built on 'shiny' and 'Leaflet'. 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 5 months ago
3.04 score 2 stars 2 scriptsjot - Jot Down Values for Later
Reproducible work requires a record of where every statistic originated. When writing reports, some data is too big to load in the same environment and some statistics take a while to compute. This package offers a way to keep notes on statistics, simple functions, and small objects. Notepads can be locked to avoid accidental updates. Notepads keep track of who added the notes and when the notes were added. A simple text representation is used to allow for clear version histories.
Last updated 2 years ago
3.00 score 2 stars 3 scripts 159 downloadsdivseg - 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 6 months ago
2.78 score 1 stars 12 scripts 245 downloadsgptzeror - 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 2 years ago
2.70 score 1 stars 4 scripts 563 downloadsapportion - 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>.
Last updated 2 years ago
2.70 score 4 scripts 269 downloadsvf - Read Voter Files
States in the United States make full voter registries available as public information. This enables researchers to use voter files with clean, consistent formats. This package is focused on official voter files, rather than commercially available alternatives. Not all states are supported. The states which have readily available and free voter files are supported.
Last updated 2 years ago
2.56 score 1 stars 72 scriptsclash - Access the Clash of Clans API
Interfaces with the official API for Clash of Clans <https://developer.clashofclans.com/#/>. Provides tools to work with players, clans, wars, raids, and other game events. All outputs are provided in a tidy format, where each player, clan, or attack is an observation.
Last updated 11 months ago
1.70 score 3 scriptsstyler.quote - Third-party Style Guide For 'quote' Style
Styles code according to the 'quote' style using 'styler'.
Last updated 11 months ago
1.70 score 3 scriptsroyale - Clash Royale API
R interface to the official API for Clash Royale <https://developer.clashroyale.com/#/>.
Last updated 11 months ago
1.70 score 4 scriptsparrot - Interact with Party Parrot Gifs
What the package does (one paragraph).
Last updated 2 years ago
1.70 score 7 scriptsacronames - Create Acronyms for Naming Things
Simple tool for developing names based on first letters of keywords.
Last updated 3 years ago
1.70 score 1 stars 1 scripts