-
Notifications
You must be signed in to change notification settings - Fork 1
/
geocode.R
36 lines (22 loc) · 799 Bytes
/
geocode.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# c. mcclintock
# geocoding addresses
# ................................................................
# load libraries
library(tidyverse)
library(RColorBrewer)
library(knitr)
library(scales)
library(gganimate)
library(lubridate)
# load data
load("data/mpd-20.RData")
# ................................................................
summer <- subset(stops, stop_dt > "2020-05-25" & stop_dt < "2020-09-01")
?geocode_OSM()
summer$stop_location_block <- gsub("BLOCK OF ", "", summer$stop_location_block)
summer_addresses <- summer$stop_location_block
addresses1to5k <- geocode_OSM(summer_addresses[1:5000])
write.csv(addresses1to5k, "addresses1to5k.csv")
#
# addresses1to5k <- geocode_OSM(summer_addresses[5001:10000])
# addresses1to5k <- geocode_OSM(summer_addresses[10001:13998])