-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path01_setup_gadm.R
More file actions
88 lines (77 loc) · 3.54 KB
/
01_setup_gadm.R
File metadata and controls
88 lines (77 loc) · 3.54 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# ----
# title : build census database - GADM
# description : this script integrates data of 'Database of Global Administrative Areas' (https://gadm.org/index.html)
# license : https://creativecommons.org/licenses/by-sa/4.0/
# authors : Steffen Ehrmann
# date : 2025-01-31
# version : 1.0.0
# status : done
# comment : version 4.1
# ----
# geography : Global
# spatial : ADM0, ADM1, ADM2, ADM3 (ADM4, ADM5)
# period : -
# variables :
# - land : -
# - crops : -
# - livestock : -
# - tech : -
# - social : -
# sampling : -
# ----
# register dataseries ----
#
regDataseries(name = "gadm",
description = "Database of Global Administrative Areas v4.1",
homepage = "https://gadm.org/index.html",
version = "3.6",
licence_link = "https://gadm.org/license.html")
regDataseries(name = "hdx",
description = "The Humanitarian Data Exchange",
homepage = "https://data.humdata.org/",
version = "1.87.2",
licence_link = "https://data.humdata.org/faqs/licenses")
# register geometries ----
#
regGeometry(gSeries = "gadm",
label = list(ADM0 = "NAME_0"),
archive = "gadm36_levels_gpkg.zip|gadm36_levels.gpkg",
archiveLink = "https://geodata.ucdavis.edu/gadm/gadm3.6/gadm36_levels_gpkg.zip",
downloadDate = ymd("2024-01-04"),
updateFrequency = "unknown")
regGeometry(gSeries = "gadm",
label = list(ADM0 = "NAME_0", ADM1 = "NAME_1"),
archive = "gadm36_levels_gpkg.zip|gadm36_levels.gpkg",
archiveLink = "https://geodata.ucdavis.edu/gadm/gadm3.6/gadm36_levels_gpkg.zip",
downloadDate = ymd("2024-01-04"),
updateFrequency = "unknown")
regGeometry(gSeries = "gadm",
label = list(ADM0 = "NAME_0", ADM1 = "NAME_1", ADM2 = "NAME_2"),
archive = "gadm36_levels_gpkg.zip|gadm36_levels.gpkg",
archiveLink = "https://geodata.ucdavis.edu/gadm/gadm3.6/gadm36_levels_gpkg.zip",
downloadDate = ymd("2024-01-04"),
updateFrequency = "unknown")
regGeometry(gSeries = "gadm",
label = list(ADM0 = "NAME_0", ADM1 = "NAME_1", ADM2 = "NAME_2", ADM3 = "NAME_3"),
archive = "gadm36_levels_gpkg.zip|gadm36_levels.gpkg",
archiveLink = "https://geodata.ucdavis.edu/gadm/gadm3.6/gadm36_levels_gpkg.zip",
downloadDate = ymd("2024-01-04"),
updateFrequency = "unknown")
regGeometry(gSeries = "gadm",
label = list(ADM0 = "NAME_0", ADM1 = "NAME_1", ADM2 = "NAME_2", ADM3 = "NAME_3", ADM4 = "NAME_4"),
archive = "gadm36_levels_gpkg.zip|gadm36_levels.gpkg",
archiveLink = "https://geodata.ucdavis.edu/gadm/gadm3.6/gadm36_levels_gpkg.zip",
downloadDate = ymd("2024-01-04"),
updateFrequency = "unknown")
regGeometry(gSeries = "gadm",
label = list(ADM0 = "NAME_0", ADM1 = "NAME_1", ADM2 = "NAME_2", ADM3 = "NAME_3", ADM4 = "NAME_4", ADM5 = "NAME_5"),
archive = "gadm36_levels_gpkg.zip|gadm36_levels.gpkg",
archiveLink = "https://geodata.ucdavis.edu/gadm/gadm3.6/gadm36_levels_gpkg.zip",
downloadDate = ymd("2024-01-04"),
updateFrequency = "unknown")
# normalise geometries ----
#
normGeometry(pattern = "gadm",
query = paste0("WHERE NAME_0 IN ('Canada')"),
stringdist = FALSE, strictMatch = TRUE,
beep = 10)