I am loading the Gowalla dataset in R available at the stanford repository and renaming the column names. https://snap.stanford.edu/data/loc-gowalla.html
Gowalla<-read.csv(file = "Gowalla_edges.txt", sep="\t", header=FALSE)
colnames(Gowalla)<-c("uid", "utc", "lat", "long", "vid")
My aim is to select the rows which contain latitudes and longitudes within Lodon city. The bounding box in terms of latitudes and longitudes is given at http://www.mapdevelopers.com/geocode_bounding_box.php
You can visit and search for bounding box for london and it gives you the range of latitudes and longitudes.
Now when i search in R for a specific latitude say for example
which(Gowalla$lat == 30.23591)
It returns null where as it is the very first latitude in the data!
However if i search for vid which is an integer and not a decimal like latitude
which(Gowalla$vid==22847)
it gives me the row numbers for that value.
So my question is why can't i search for latitudes and longitudes using "which" function and why gowalla returns null in my case?
Once i find the answer to this I can using if-else and search for rows which fall in my london's bounding box. Is there any efficient method of searching for rows which fall in the london's bounding box?
The bounding box for london is between Latitudes 51.672343 and 51.384940 and Longitudes 0.148271 Longitudes -0.351468
Thanks.