Lydia Orr
Lydia Orr

Reputation: 1

Averaging Census Tracts and their Demographics into Thiessen Polygons (ArcGIS, R)

I am creating catchment zones based on points. I want to know the demographics of the catchment zones. Right now I have two shape files - one with the Census tracts and all of the demographic data and another with Thiessen polygons around points to create the catchment zones.

I need the average of all tracts within the catchment zone. I have tried Spatial Join (both contains and intersects), but end up with missing data. I also think that it is not averaging/weighting all the data, just giving the demographics for of the census tracts within the Thiessen polygon.

Also tried to use sf in R. I was able to read in my files and can confirm the layers are In the same projection and have the data that I want. I can also confirm that they intersect. I have tried to get them to merge a few ways and none of them work.

# attempt #1
Merge1 <- st_join(Philly, Thiessen, join=st_intersects) # did not work, created
# even more rows and columns. I think it mostly added them together. 

# attempt #2
Merge2 <- st_join(Thiessen, Philly, join=st_intersects) # this did the same

# attempt #3
Merge3 <- st_join(Philly, Thiessen, join=st_intersection(Philly, Thiessen))
# this returns an error both when the second () is filled and blank

# attempt #4
Merge3 <- st_join(Philly, Thiessen) # returned the same as all the others

# attempt #5
Merge4 <- st_join(Thiessen, Philly, join=st_contains) # better... created 159 rows

Any thoughts are helpful!

Upvotes: 0

Views: 39

Answers (0)

Related Questions