sr_census_tracts_in_district: Identify census tracts in a school district

View source: R/utils-shapefiles.R

sr_census_tracts_in_districtR Documentation

Identify census tracts in a school district

Description

Find the census tracts in the district and return a list containing the following elements: (1) vector of tract IDs that are in the district, (2) shapefile of tracts in the district.

Usage

sr_census_tracts_in_district(district_shapefile, state_abb)

Arguments

district_shapefile

The shapefile of the district. Can use tigris::school_districts() to get the shapefile.

state_abb

The two letter state abbbreviation of the state in which the district is located.

Examples

## Not run: 
state_abb <- 'AR'

district_shapefile <- tigris::school_districts(state = state_abb, cb = FALSE) |>
   dplyr::filter(GEOID == "0503060")

sr_census_tracts_in_district(district_shapefile, state_abb)

## End(Not run)


shanejorr/schoolreportr documentation built on Aug. 7, 2023, 12:25 p.m.