geysertimes / geysertimes-r-package

R package for accessing and analyzing the GeyserTimes database
Other
2 stars 4 forks source link

Missing longitude and latitude coded as 0 in geysers #10

Open spkaluzny opened 4 years ago

spkaluzny commented 4 years ago

There are 15 geysers in https://www.geysertimes.org/api/v5/geysers that have longitude and latitude of 0. The timezone values for these include US/Mountain (12), Atlantic/Reykjavik (1) and Pacific/Auckland (1). I don't believe any of those are located at (0, 0). I suspect those geyser's longitude and latitude are currently unknown so they should be labelled as missing, not 0.

To see (in R):

library("dplyr")
library("jsonlite")
d <- jsonlite::fromJSON("https://www.geysertimes.org/api/v5/geysers")$geysers
d <- d %>%
  mutate(longitude = as.numeric(longitude), latitude = as.numeric(latitude))
d %>% filter(longitude == 0, latitude == 0) %>%
  select(id, name, timezone, latitude, longitude, groupName)
taltstidl commented 4 years ago

Correct, these values should be considered as cases with missing locations. Our database currently doesn't allow NULL values for the latitude and longitude values. We're working on an internal rewrite towards a GraphQL API that will also migrate some of the database structure, so we're aiming to fix this there. In the meantime you'll probably want to replace these with NULL in R.

Housekeeping: related to issue #7