|
@@ -1,8 +1,10 @@
|
1
|
1
|
# Scratch file
|
2
|
2
|
library(janitor)
|
3
|
3
|
library(dplyr)
|
4
|
|
-library(ggmap)
|
|
4
|
+#library(ggmap)
|
|
5
|
+library(nominatim)
|
5
|
6
|
library(readr)
|
|
7
|
+source("osm_api.R")
|
6
|
8
|
Geo2017 <- clean_names(read_csv("data/AllDHBsGeocoded.csv"), case = "snake") %>%
|
7
|
9
|
select(-facility_opening_date) %>%
|
8
|
10
|
mutate(dhb_name = ifelse(is.na(dhb_name), "Missing", dhb_name),
|
|
@@ -43,6 +45,4 @@ gp_new <- filter(gp_prac, is.na(gp_prac$calculated_address)) %>%
|
43
|
45
|
table(newFacil$facility_type_name)
|
44
|
46
|
table(Geo2017$facility_type_name)
|
45
|
47
|
|
46
|
|
-newcoded <- geocode(gp_new$address,
|
47
|
|
- output = "latlona") %>%
|
48
|
|
- rename("calculated_address" = address)
|
|
48
|
+newcoded <- osm_geocode(gp_new$address[1:5])
|