Estimating Across Geographic Levels

Functions for approximating values at different levels of geography

estimate_down()

Estimate Down Levels

estimate_up()

Estimate Up Levels

geo_estimate_down()

Estimate Down Geography Levels

geo_estimate_up()

Estimate Up Geography Levels

geo_match()

Match Across Geographic Layers

Buiding Datasets

Functions to help build and refine data

block2prec()

Aggregate Block Table by Matches

block2prec_by_county()

Aggregate Block Table by Matches and County

create_block_table()

Create Block Level Data

create_tract_table()

Create Tract Level Data

geo_filter()

Filter to Intersecting Pieces

geo_trim()

Trim Away Small Pieces

Downloading Datasets

Functions to help download common datasets

alarm_states()

List Available States from ALARM Data

clean_vest()

Clean Vest Names

get_alarm()

Get ALARM Dataset

get_vest()

Get VEST Dataset

vest_states()

List Available States from VEST Dataverse

Fixing Geographic Imperfections

Functions to help pretend that the geographies were properly connected

add_edge()

Add Edges to an Adjacency List

adjacency()

Build Adjacency List

check_contiguity() cct() ccm()

Check Contiguity by Group

check_polygon_contiguity()

Check Polygon Contiguity

compare_adjacencies()

Compare Adjacency Lists

geo_sort()

Sort Precincts

split_precinct()

Split a Precinct

subtract_edge()

Subtract Edges from an Adjacency List

suggest_component_connection()

Suggest Connections for Disconnected Groups

suggest_neighbors()

Suggest Neighbors for Lonely Precincts

Format Data with Dave’s Redistricting

Functions to get maps into DRA or from DRA

dra2r()

DRA to R

r2dra()

R to DRA

Center of Shape

Adjusted centroids to ensure that the point is in the shape

geos_centerish()

Get the kind of center of each shape

geos_circle_center()

Get the centroid of the maximum inscribed circle

st_centerish()

Get the kind of center of each shape

st_circle_center()

Get the centroid of the maximum inscribed circle

Tools for working with borders

Functions that deal with two sides of a seam between two administrative units

seam_adj()

Filter Adjacency to Edges Along Border

seam_geom()

Filter Shape to Geographies Along Border

seam_rip()

Remove Edges along a Boundary

seam_sew()

Suggest Edges to Connect Two Sides of a Border

Spatial Autocorrelation

Functions to measure local and global autocorrelation measures

global_gearys()

Compute Global Geary's C

global_morans()

Compute Global Moran's I

gstar_i()

Compute Standardized Getis Ord G*i

local_gearys()

Compute Local Geary's C

local_morans()

Compute Local Moran's I

Included Example Data

checkerboard

Checkerboard

checkerboard_adj

Checkerboard Adjacency

nrcsd

nrcsd

orange

orange

precincts

precincts

rockland

rockland

towns

towns

va18sub

va18sub

va_blocks

va_blocks

va_blocks

va_vtd

Plotting Functions

geo_plot()

Plots a Shape with Row Numbers as Text

geo_plot_group()

Create Plots of Shapes by Group with Connected Components Colored

Leftovers

Functions that don’t really fit elsewhere

geomander-package

Geographic Tools for Studying Gerrymandering

baf_to_vtd()

Estimate Plans from a Block Assignment File to Voting Districts

count_connections()

Count Times Precincts are Connected