I have successfully loaded a shapefile of NYC PUMA areas into R with maptools and I want to plot 55 points on top of it that I have in another file as follows:
X Y pumace10 events_2008 events_2009
-73.9092456917 40.8916125162 3701 2 0
-73.8617096298 40.8899373255 3702 0 0
-73.8010284966 40.8460832277 3703 1 1
However, the points will not plot.
First I do this to plot the shapefile:
plot(nycs)
Then I try to plot the points on top but no matter which of the following I do it always fails:
points(nyc_data$X,nnyc_data$Y,pch=20,col="red")
or
plot(nyc_data, pch=16, col='firebrick',add=TRUE)
or
plot(nyc_data$X,nyc_data$Y,pch=20,col="red")
(that final one plots the data on a new plot that is just an X-Y scatter instead of overlaid on the shapefile)
Any ideas how to do this?
EDIT, files added (amended to working files, hopefully!):
Shapefile info: https://www.sendspace.com/file/wbqrpb Points file: https://www.sendspace.com/file/9yrrbu