sr_cities_in_district: Identify cities in the district

View source: R/utils-shapefiles.R

sr_cities_in_districtR Documentation

Identify cities in the district

Description

Get the cities in a school district and return a dataframe with the cities and their populations.

Usage

sr_cities_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 on the state that you want to show all schools for.

Value

A data frame with all the cities within a district's boundaries and each city's population.

Examples

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

sr_table_cities_in_district(district_shapefile, "AR")

## End(Not run)


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