I have a dataframe that shows bus stop locations in Glasgow and another dataframe that shows Datazone polygons for Glasgow. I am using the sf package and have made both dataframes spatial. I want to do a spatial join to create a new dataframe (joined_ds) to match each bus stop location to a Datazone polygon and its associated characteristics (deprivation score). I'm using st_intersection which gives me a new dataframe with all the correct columns but 0 observations.
joined_ds <- st_intersection(st_buffer(bus_stop_data,0), st_buffer(datazones,0))
Both datasets are using the appropriate CRS (EPSG: 27700 for the British National Grid) and I know that the points and polygons overlap because I have successfully plotted them on a map using ggplot, so no idea why my dataframe is showing 0 obs. I've also tried loading in the datasets from scratch and no luck.
Any suggestions welcome, thanks!