I am trying to filter specific zones from this shapefile. The shapefile contains traffic zones from the 2016 TTS survey for the entire GTHA. I downloaded the shapefile from here: http://dmg.utoronto.ca/survey-boundary-files#2006_zone.
I am only interested in zones within Hamilton (5001-5252). I am having trouble with the code.
I am able to plot the shapefile, but cannot filter the zones that I am interested in to plot. I have loaded dplyr and sf packages, and tried using the code below:
hamilton <- gtha %>% filter(GTA06 >=5001 & GTA06 <=5252)
I keep getting the following message:
Error: object 'GTA06' not found