This project maps the density of people with West Indian ancestry in Brooklyn, New York.
library(tidyverse)
library(tidycensus)
library(sf)
library(scales)
library(viridis)
library(plotly)
The borough boundaries are represented with a shape file downloaded from NYC Open Data.
The census tract boundaries and data come from the 2016-2020 5-year American Community Survey, accessed with the tidyverse R package.
Census data includes:
A calculated percentage of people reporting West Indian ancestry in each census tract (census tracts with no residents were removed)
boros <- st_read("~/Desktop/GRAD SCHOO/Year 1/Semester 1/Methods/part2/data/raw/geo/Borough_Boundaries.geojson")
raw_ancestry <- get_acs(geography = "tract",
variables = c(ancestry_pop = "B04006_001",
west_indian = "B04006_094"),
state='NY',
county = 'Kings',
geometry = T,
year = 2020,
output = "wide")
west_indian <- raw_ancestry |>
mutate(pct_west_indian = west_indianE/ancestry_popE) |>
filter(ancestry_popE > 0)
ggplot() +
geom_sf(data = west_indian,
mapping = aes(fill = pct_west_indian,
text = paste0(NAME, ":",
"<br>Percent West Indian ancestry: ",
percent(pct_west_indian, accuracy=1))),
color = "transparent") +
theme_void() +
scale_fill_distiller(breaks=c(0, .2, .4, .6, .8, 1),
direction = 1,
na.value = "#fafafa",
name="Percent West Indian Ancestry (%)",
labels=percent_format(accuracy = 1L)) +
labs(
title = "Brooklyn, West Indian Ancestry by Census Tract",
caption = "Source: American Community Survey, 2016-20"
) +
geom_sf(data = boros |> filter(boro_name == "Brooklyn"),
color = "black", fill = NA, lwd = .5)
As you can see, there is a clear concentration of people with West Indian ancestry in Southwest Brooklyn. The census tracts with the highest population density include those in the East Flatbush and Canarsie neighborhoods. The census tracts with the highest concentration of people with West Indian ancestry reach over 60%.
Created by Delaney Connor, 11-11-24