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 2 months ago
geospatialgerrymanderingredistrictingsamplingopenblascppopenmp
9.34 score 67 stars 259 scripts 326 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 10 months ago
geospatialgerrymanderingredistrictingsamplingopenblascppopenmp
8.69 score 67 stars 259 scripts 371 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 7 months ago
cpp
8.16 score 14 stars 1 dependents 191 scripts 345 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 7 months ago
openblascpp
7.79 score 10 stars 2 dependents 23 scripts 216 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 7 months ago
openblascpp
7.79 score 10 stars 2 dependents 23 scripts 216 downloadsbskyr - 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 3 days ago
atprotobluesky
6.60 score 19 stars 21 scripts 744 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 8 months ago
ggplot2themes
6.56 score 198 stars 103 scriptsname - 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
6.29 score 2 stars 19k scripts 268 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 2 months ago
6.11 score 2 stars 6 dependents 24 scripts 308 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 dependents 37 scripts 239 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 8 months ago
5.78 score 8 stars 4 dependents 42 scripts 288 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 7 months ago
5.11 score 4 stars 3 dependents 18 scripts 227 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 7 months ago
4.86 score 4 stars 6 dependents 9 scripts 575 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 6 months ago
4.53 score 14 stars 16 scripts 618 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 207 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 7 months ago
4.38 score 1 stars 1 dependents 32 scripts 187 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 7 months ago
4.38 score 1 stars 1 dependents 32 scripts 187 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 2 years ago
4.18 score 3 stars 8 scripts 158 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 5 months ago
4.08 score 2 dependents 4 scripts 237 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 4 months ago
3.30 score 3 scripts 540 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 7 months ago
3.30 score 1 stars 5 scripts 472 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 10 months ago
3.30 score 2 stars 7 scripts 227 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 10 months ago
3.18 score 1 stars 4 scripts 201 downloadsjot - 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.18 score 3 stars 3 scripts 135 downloadsopengraph - 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 1 months ago
3.00 score 1 stars 5 scripts 236 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 7 months ago
3.00 score 2 stars 2 scriptsdivseg - 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 8 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 554 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.57 score 1 stars 75 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 1 years 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 1 years ago
1.70 score 3 scriptsroyale - Clash Royale API
R interface to the official API for Clash Royale <https://developer.clashroyale.com/#/>.
Last updated 1 years 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