
Package List
ctk_packages.RdReturn the embedded package list copied from https://christophertkenny.com.
Examples
ctk_packages()
#> name logo
#> 1 redist hexes/hex_redist.png
#> 2 redistmetrics hexes/hex_redistmetrics.png
#> 3 geomander hexes/hex_geomander.png
#> 4 PL94171 hexes/hex_PL94171.png
#> 5 censable hexes/hex_censable.png
#> 6 tinytiger hexes/hex_tinytiger.png
#> 7 dots hexes/hex_dots.png
#> 8 cvap hexes/hex_cvap.png
#> 9 ppmf hexes/hex_ppmf.png
#> 10 divseg hexes/hex_divseg.png
#> 11 name hexes/hex_name.png
#> 12 jot hexes/hex_jot.png
#> 13 ei hexes/hex_ei.png
#> 14 alarmdata hexes/hex_alarmdata.png
#> 15 ggredist hexes/hex_ggredist.png
#> 16 congress hexes/hex_congress.png
#> 17 feltr hexes/hex_feltr.png
#> 18 planscorer hexes/hex_planscorer.png
#> 19 redistverse hexes/hex_redistverse.png
#> 20 crayons hexes/hex_crayons.png
#> 21 apportion hexes/hex_apportion.png
#> 22 gptzeror hexes/hex_gptzeror.png
#> 23 bskyr hexes/hex_bskyr.png
#> 24 redistio hexes/hex_redistio.png
#> 25 palette hexes/hex_palette.png
#> 26 ThemePark hexes/hex_ThemePark.png
#> 27 baf hexes/hex_baf.png
#> 28 causaltbl hexes/hex_causaltbl.png
#> 29 opengraph hexes/hex_opengraph.png
#> 30 flexoki hexes/hex_flexoki.png
#> 31 typr hexes/hex_typr.png
#> 32 manifesto hexes/hex_manifesto.png
#> 33 adj hexes/hex_adj.png
#> 34 lobby hexes/hex_lobby.png
#> 35 pr hexes/hex_pr.png
#> 36 rict hexes/hex_rict.png
#> 37 wf hexes/hex_wf.png
#> 38 crann hexes/hex_crann.png
#> 39 enum hexes/hex_enum.png
#> 40 gtscales hexes/hex_gtscales.png
#> info
#> 1 Simulation Methods for Legislative Redistricting
#> 2 Redistricting metrics
#> 3 Geographic Tools for Studying Gerrymandering
#> 4 Tabulate P.L. 94-171 Redistricting Data Summary Files
#> 5 Making Census Data More Usable
#> 6 Lightweight Interface to TIGER/Line Shapefiles
#> 7 Dot Density Maps
#> 8 Citizen Voting Age Population
#> 9 Read Census Privacy Protected Microdata Files
#> 10 Compute Diversity and Segregation Indices
#> 11 Tools for Working with Names
#> 12 Jot Down Notes for Later
#> 13 Ecological Inference
#> 14 Download, Merge, and Process Redistricting Data
#> 15 Scales, Palettes, and Extensions of ggplot2 for Redistricting
#> 16 Access the Congress.gov API
#> 17 Access the Felt API
#> 18 Score Redistricting Plans with PlanScore
#> 19 Easily Install and Load Redistricting Software
#> 20 Color Palettes from Crayon Boxes
#> 21 Apportion Seats
#> 22 Identify Text Written by Large Language Models using GPTZero
#> 23 Interact with Bluesky Social
#> 24 Interactive Redistricting
#> 25 Color Scheme Helpers
#> 26 Themes for 'ggplot2' from Popular Culture
#> 27 Block Assignment Files
#> 28 Tidy Causal Data Frames and Tools
#> 29 Process Metadata from the Open Graph Protocol
#> 30 Inky Color Schemes
#> 31 Write and Render Typst Documents
#> 32 Create Project Manifest Files
#> 33 Lightweight Adjacency Lists
#> 34 Interact with the US Senate Lobbying Disclosure API
#> 35 Classes for Probabilities
#> 36 Redistricting in Clean Tables
#> 37 Artificial Intelligence Workflow Tools
#> 38 Spanning Tree Methods for Graphs
#> 39 Enumerate Partitions of Grid Graphs
#> 40 Color Scale Extensions for 'gt'
#> coauthors status
#> 1 Cory McCartan, Ben Fifield, and Kosuke Imai CRAN
#> 2 Cory McCartan, Ben Fifield, and Kosuke Imai CRAN
#> 3 <NA> CRAN
#> 4 Cory McCartan CRAN
#> 5 <NA> CRAN
#> 6 Cory McCartan CRAN
#> 7 <NA> CRAN
#> 8 <NA> CRAN
#> 9 <NA> CRAN
#> 10 <NA> CRAN
#> 11 <NA> CRAN
#> 12 <NA> CRAN
#> 13 Shusei Eshima, Gary King, and Molly Roberts GitHub
#> 14 Cory McCartan, Tyler Simko, Michael Zhao, and Kosuke Imai CRAN
#> 15 Cory McCartan CRAN
#> 16 <NA> CRAN
#> 17 <NA> CRAN
#> 18 <NA> CRAN
#> 19 Cory McCartan CRAN
#> 20 <NA> CRAN
#> 21 <NA> CRAN
#> 22 <NA> CRAN
#> 23 <NA> CRAN
#> 24 <NA> GitHub
#> 25 <NA> CRAN
#> 26 Matthew B. Jané and Luke C. Pilling GitHub
#> 27 <NA> CRAN
#> 28 Cory McCartan GitHub
#> 29 <NA> CRAN
#> 30 <NA> CRAN
#> 31 <NA> CRAN
#> 32 <NA> GitHub
#> 33 Cory McCartan CRAN
#> 34 <NA> CRAN
#> 35 <NA> GitHub
#> 36 <NA> CRAN
#> 37 <NA> CRAN
#> 38 <NA> GitHub
#> 39 <NA> GitHub
#> 40 <NA> GitHub
#> link color topic
#> 1 https://alarm-redist.org/redist/ #A61C00 redistricting
#> 2 https://alarm-redist.org/redistmetrics/ #93C47D redistricting
#> 3 https://christophertkenny.com/geomander/ #BF9000 redistricting
#> 4 https://corymccartan.com/PL94171/ #A06D54 census
#> 5 https://christophertkenny.com/censable/ #008FC4 census
#> 6 https://alarm-redist.org/tinytiger/ #E69138 census
#> 7 https://christophertkenny.com/dots/ #020000 plotting
#> 8 https://christophertkenny.com/cvap/ #CDEBE1 census
#> 9 https://christophertkenny.com/ppmf/ #EFC519 census
#> 10 https://christophertkenny.com/divseg/ #A020F0 other
#> 11 https://christophertkenny.com/name/ #FF0000 other
#> 12 https://christophertkenny.com/jot/ #3E885B other
#> 13 https://iqss-research.github.io/ei/ #E18751 redistricting
#> 14 https://alarm-redist.org/alarmdata/ #87A293 redistricting
#> 15 https://alarm-redist.org/ggredist/ #FED09E plotting
#> 16 https://christophertkenny.com/congress/ #ABC0E4 api
#> 17 https://christophertkenny.com/feltr #3D521E api
#> 18 https://christophertkenny.com/planscorer/ #5D4F9C api
#> 19 https://alarm-redist.org/redistverse/ #91573A redistricting
#> 20 https://christophertkenny.com/crayons/ #FC73B4 plotting
#> 21 https://christophertkenny.com/apportion/ #0A1C30 census
#> 22 https://christophertkenny.com/gptzeror #38547F api
#> 23 https://christophertkenny.com/bskyr/ #0083FE api
#> 24 https://christophertkenny.com/redistio/ #B6D7A8 redistricting
#> 25 https://christophertkenny.com/palette/ #7C4700 plotting
#> 26 https://matthewbjane.com/ThemePark/ #E86CB7 plotting
#> 27 https://christophertkenny.com/baf #787878 redistricting
#> 28 https://corymccartan.com/causaltbl #98B2B6 other
#> 29 https://christophertkenny.com/opengraph/ #833B0C other
#> 30 https://christophertkenny.com/flexoki/ #FFFCF0 plotting
#> 31 https://christophertkenny.com/typr/ #239dad other
#> 32 https://christophertkenny.com/manifesto/ #FDF6E3 other
#> 33 https://alarm-redist.org/adj/ #bbd5ac redistricting
#> 34 https://christophertkenny.com/lobby/ #b99258 other
#> 35 https://christophertkenny.com/pr/ #2e4b43 other
#> 36 https://christophertkenny.com/rict/ #7aa9d9 redistricting
#> 37 https://christophertkenny.com/wf/ #846892 other
#> 38 https://christophertkenny.com/crann/ #223922 other
#> 39 https://christophertkenny.com/enum/ #69464c other
#> 40 https://christophertkenny.com/gtscales/ #f4d08f other
#> description
#> 1 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), the enumeration algorithm of Fifield, Imai, Kawahara, and Kenny (2020), the Flip MCMC algorithm of Fifield, Higgins, Imai and Tarr (2020), the Merge-split/Recombination algorithms of Carter et al. (2019) and DeFord et al. (2021), and the Short-burst optimization algorithm of Cannon et al. (2020).
#> 2 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.
#> 3 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.
#> 4 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.
#> 5 Creates a common framework for organizing, naming, and gathering population, age, race, and ethnicity data from the Census Bureau. Accesses the API <a href="https://www.census.gov/data/developers/data-sets.html">https://www.census.gov/data/developers/data-sets.html</a>. Provides tools for adding information to existing data to line up with Census data.
#> 6 Download geographic shapes from the United States Census Bureau TIGER/Line Shapefiles <a href="https://www.census.gov/geographies/mapping-files/time-series/geo/tiger-line-file.html">https://www.census.gov/geographies/mapping-files/time-series/geo/tiger-line-file.html</a>. 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.
#> 7 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.
#> 8 Works with the Citizen Voting Age Population special tabulation from the US Census Bureau <a href="https://www.census.gov/programs-surveys/decennial-census/about/voting-rights/cvap.html">https://www.census.gov/programs-surveys/decennial-census/about/voting-rights/cvap.html</a>. 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.
#> 9 Implements data processing described in to align modern differentially private data with formatting of older US Census data releases. The primary goal is to read in Census Privacy Protected Microdata Files data in a reproducible way. This includes tools for aggregating to relevant levels of geography by creating geographic identifiers which match the US Census Bureau's numbering. Additionally, there are tools for grouping race numeric identifiers into categories, consistent with OMB (Office of Management and Budget) classifications. Functions exist for downloading and linking to existing sources of privacy protected microdata.
#> 10 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). Multiple common measures of within-geography diversity are implemented as well. All functions operate on data frames with a 'tidyselect' based workflow.
#> 11 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.
#> 12 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.
#> 13 Software accompanying Gary King's book: A Solution to the Ecological Inference Problem. (1997). Princeton University Press. ISBN 978-0691012407.
#> 14 Utility functions to download and process data produced by the ALARM Project, including 2020 redistricting files Kenny and McCartan (2021) <a href="https://alarm-redist.org/posts/2021-08-10-census-2020/">https://alarm-redist.org/posts/2021-08-10-census-2020/</a> and the 50-State Redistricting Simulations of McCartan, Kenny, Simko, Garcia, Wang, Wu, Kuriwaki, and Imai (2022). The package extends the data introduced in McCartan, Kenny, Simko, Garcia, Wang, Wu, Kuriwaki, and Imai (2022) to also include states with only a single district.
#> 15 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.
#> 16 Download and read data on United States congressional proceedings. Data is read from the Library of Congress's Congress.gov Application Programming Interface (<a href="https://github.com/LibraryOfCongress/api.congress.gov/">https://github.com/LibraryOfCongress/api.congress.gov/</a>). Functions exist for all version 3 endpoints, including for bills, amendments, congresses, summaries, members, reports, communications, nominations, and treaties.
#> 17 Upload, download, and edit internet maps with the Felt API (<a href="https://feltmaps.notion.site/Felt-Public-API-reference-c01e0e6b0d954a678c608131b894e8e1">https://feltmaps.notion.site/Felt-Public-API-reference-c01e0e6b0d954a678c608131b894e8e1</a>). 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'.
#> 18 Provides access to the 'PlanScore' Application Programming Interface (<a href="https://github.com/PlanScore/PlanScore/blob/main/API.md">https://github.com/PlanScore/PlanScore/blob/main/API.md</a>) 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.
#> 19 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 <a href="https://alarm-redist.org">https://alarm-redist.org</a>.
#> 20 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 <a href="https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors">https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors</a>. All palettes are discrete palettes and are not necessarily color-blind friendly. Provides scales for 'ggplot2' for discrete coloring.
#> 21 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 <a href="https://www.census.gov/history/www/reference/apportionment/methods_of_apportionment.html">https://www.census.gov/history/www/reference/apportionment/methods_of_apportionment.html</a>.
#> 22 An R interface to the 'GPTZero' API (<a href="https://gptzero.me/docs">https://gptzero.me/docs</a>). 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.
#> 23 Collect data from and make posts on 'Bluesky' Social via the Hypertext Transfer Protocol (HTTP) Application Programming Interface (API), as documented at <a href="https://atproto.com/specs/xrpc">https://atproto.com/specs/xrpc</a>. This further supports broader queries to the Authenticated Transfer (AT) Protocol <a href="https://atproto.com/">https://atproto.com/</a> which 'Bluesky' Social relies on. Data is returned in a tidy format and posts can be made using a simple interface.
#> 24 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.
#> 25 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'.
#> 26 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.
#> 27 Download and read US Census Bureau data relationship files. Provides support for cleaning and using block assignment files since 2010, as described in <a href="https://www.census.gov/geographies/reference-files/time-series/geo/block-assignment-files.html">https://www.census.gov/geographies/reference-files/time-series/geo/block-assignment-files.html</a>. Also includes support for working with block equivalency files, used for years outside of decennial census years.
#> 28 Provides a 'causal_tbl' class for causal inference. A 'causal_tbl' keeps track of information on the roles of variables like treatment and outcome, and provides functionality to store models and their fitted values as columns in a data frame.
#> 29 Social media sites often embed cards when links are shared, based on metadata in the Open Graph Protocol (<a href="https://ogp.me/">https://ogp.me/</a>). 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.
#> 30 Provides color palettes designed to be reminiscent of text on paper. The color schemes were taken from <a href="https://stephango.com/flexoki">https://stephango.com/flexoki</a>. Includes discrete, continuous, and binned scales that are not necessarily color-blind friendly. Simple scale and theme functions are available for use with 'ggplot2'.
#> 31 Compile Typst files using the typst-cli (<a href=""https://typst.app"">https://typst.app</a>) command line tool. Automatically falls back to rendering via embedded Typst from Quarto (<a href=""https://quarto.org"">https://quarto.org</a>) if Typst is not installed. Includes utilities to check for typst-cli availability and run Typst commands.
#> 32 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.
#> 33 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.
#> 34 Download and read data on lobbying in the United States Congress. Data is queried from the Senate's Application Programming Interface (<a href=""https://lda.senate.gov/api/"">https://lda.senate.gov/api/</a>). This supports filings since 2008. Functions exist for all primary data endpoints, including queries by filings, contributions, registrations, clients, and lobbyists.
#> 35 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.
#> 36 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.
#> 37 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.
#> 38 Implements spanning tree algorithms for undirected graphs represented as 'adj' adjacency lists. Provides enumeration of all spanning trees via Winter's (1986) contraction-based algorithm (<a href=""https://link.springer.com/article/10.1007/BF01939361"">doi:10.1007/BF01939361</a>), counting via Kirchhoff's matrix tree theorem, minimum spanning trees via Kruskal's algorithm, uniform random sampling via Wilson's (1996) loop-erased random walk (<a href=""https://dl.acm.org/doi/10.1145/237814.237880"">oi:10.1145/237814.237880</a>), and structural utilities including fundamental cycles and cuts.
#> 39 Enumerates polyomino tilings of grid graphs. Partitions an grid into a specified number of 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) (<a href=""https://zenodo.org/records/3468055"">doi:10.5281/zenodo.3467675</a>).
#> 40 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.