-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-database.R
47 lines (39 loc) · 924 Bytes
/
build-database.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
35
36
37
38
39
40
41
42
43
44
45
46
47
## build the sample database
# set the file encoding
options(encoding = "UTF-8")
# load libraries
library(DBI)
library(fs)
library(jpndistrict)
library(jpmesh)
library(lubridate)
library(readxl)
library(rtatools)
library(RPostgres)
library(remotes)
library(scales)
library(sf)
library(sfheaders)
library(tidyverse)
library(tictoc)
library(conflicted)
# set winner functions for conflicts
conflict_prefer("filter","dplyr")
conflict_prefer("map", "purrr")
conflict_prefer("tic", "tictoc")
conflict_prefer("toc", "tictoc")
tic(msg = "Road Traffic Accidents")
source("R/db-register-traffic-accidents.R")
toc()
tic(msg = "Traffic Flow")
source("R/db-register-traffic-flow.R")
toc()
tic(msg = "Land Use")
source("R/db-register-land-use.R")
toc()
tic(msg = "Administrative Areas")
source("R/db-register-administrative-areas.R")
toc()
tic(msg = "Japanese Regional Grid Squares")
source("R/db-register-grid-squares.R")
toc()