Newer
Older
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# download the lists of changes between the various NUTS versions from: https://ec.europa.eu/eurostat/en/web/nuts/history
# save the excel: D:\data\fadn\lieferung_20210414\yang\fadn_work_space\NUTS
rm(list=setdiff(ls(), c("str_data","fadn.animal")))
# nuts2 rules ####
nuts2_transformation = TRUE
if (nuts2_transformation){
# deu ####
deu <- tibble(
NUTS2 = c("DEE1","DEE2","DEE3", "DE41", "DE42", "DED1", "DED3"),
NUTS2_new = c("DEE0","DEE0","DEE0", "DE40", "DE40", "DED4" ,"DED5"),
regional_surface = 1,
COUNTRY = "DEU"
) %>% mutate(change = case_when(NUTS2_new == "DEE0" ~ "merge",
NUTS2_new == "DE40" ~"merge",
NUTS2_new == "DED4" ~"boundary shift, new region",
NUTS2_new == "DED5" ~"boundary shift, new region",
TRUE ~ "recoded"),
from_NUTS3 = '', from_ex_NUTS3 = '')
# ell ####
ell <- tibble(
NUTS2 = c("GR11","EL11", "GR12", "EL12","GR13", "EL13", "GR14", "EL14", "GR21", "EL21","GR22", "EL22","GR23", "EL23","GR24", "EL24","GR25", "EL25",
"GR30","GR41","GR42","GR43"),
NUTS2_new = c(rep("EL51",2), rep("EL52", 2), rep("El53",2), rep("EL54",2), rep("EL61",2),rep("EL62",2), rep("EL63",2),rep("EL64",2),rep("EL65",2),
"EL30","EL41","EL42","EL43"),
regional_surface = 1,
COUNTRY = "ELL"
) %>% mutate(change = case_when(regional_surface ==1 ~ "recoded"),
from_NUTS3 = '', from_ex_NUTS3 = '')
# fra ####
fra <- read.table(
text = "NUTS2 NUTS2_new
FR24 FRB0
FR26 FRC1
FR43 FRC2
FR25 FRD1
FR23 FRD2
FR30 FRE1
FR22 FRE2
FR42 FRF1
FR21 FRF2
FR41 FRF3
FR51 FRG0
FR52 FRH0
FR61 FRI1
FR63 FRI2
FR53 FRI3
FR81 FRJ1
FR62 FRJ2
FR72 FRK1
FR71 FRK2
FR82 FRL0
FR83 FRM0
FRA1 FRY1
FRA2 FRY2
FRA3 FRY3
FRA4 FRY4
FRA5 FRY5", header =TRUE) %>% as_tibble() %>%
mutate (COUNTRY = "FRA", regional_surface = 1) %>%
mutate_if(is.factor, as.character) %>%
mutate(change = (case_when(regional_surface ==1 ~ "recoded" )),
from_NUTS3 = '', from_ex_NUTS3 = ''
)
# hun??? ####
# fadn data has no HU11
hun <- read.table(
text = "NUTS2 NUTS2_new COUNTRY regional_surface
HU10 HU12 HUN 0.92
HU10 HU11 HUN 0.08", header = TRUE ) %>%
as_tibble() %>%
mutate_if(is.factor, as.character) %>%
mutate(change = (case_when(NUTS2 =="HU10" ~ "split" )),
from_NUTS3 = '', from_ex_NUTS3 = '')
# IRE ######
# IE01 discontinued
# IE02 discontinued
# IE04 new region ?????????????????
# IE05 new region, made from ex-IE023, IE024 and IE025 IE05=IE023+IE024+IE025 (from NUTS3)
# IE06 new region ?????????????????
# old . new value
#.................
# IE01. IE04 0.77
# IE01. IE06 0.23
# IE02. IE05 0.81
# IE02. IE06 0.42
ire <- read.table(
text = "NUTS2 NUTS2_new regional_surface change
IE01 IE04 0.77 'discontinued, new region'
IE01 IE06 0.23 'discontinued, new region'
IE02 IE05 0.81 'discontinued, new region'
IE02 IE06 0.42 'discontinued, new region' ", header = TRUE ) %>%
as_tibble() %>%
mutate (COUNTRY = "IRE", from_NUTS3 = '', from_ex_NUTS3 = '') %>%
mutate_if(is.factor, as.character)
# ita ####
ita <- read.table(
text = "NUTS2 NUTS2_new regional_surface
ITD1 ITH1 1
ITD2 ITH2 1
ITD3 ITH3 1
ITD4 ITH4 1
ITE4 ITI4 1
ITE1 ITI1 1
ITE2 ITI2 1
ITD5 ITH5 1.03
ITE3 ITI3 0.97", header = TRUE ) %>%
as_tibble() %>%
mutate (COUNTRY = "ITA",
change = (case_when(regional_surface==1 ~ "recoded",
TRUE ~ "boundary shift, new region")),
from_NUTS3 = '',
from_ex_NUTS3 = '') %>%
mutate_if(is.factor, as.character)
# ltu ####
ltu <- read.table(
text = "NUTS2 NUTS2_new regional_surface from_NUTS3
LT00 LT01 0.15 LT00A
LT00 LT02 0.85 'LT00-LT00A'", header = TRUE ) %>%
as_tibble() %>%
mutate (COUNTRY = "LTU",
change = (case_when(regional_surface!=1 ~ "split")),
from_ex_NUTS3 = '') %>%
mutate_if(is.factor, as.character)
# pol ####
pol <- read.table(
text = "NUTS2 NUTS2_new regional_surface from_NUTS3
PL11 PL71 1 ''
PL33 PL72 1 ''
PL31 PL81 1 ''
PL32 PL82 1 ''
PL34 PL84 1 ''
PL12 PL91 0.17 'PL127+PL129+PL12A-newPL926'
PL12 PL92 0.83 'PL128+PL12B+PL12C+PL12D+PL12E+newPL926'", header = TRUE ) %>%
as_tibble() %>%
mutate (COUNTRY = "POL",
change = (case_when(regional_surface==1 ~ "recoded", TRUE ~ "split" )),
from_ex_NUTS3 = '') %>%
mutate_if(is.factor, as.character)
# suo #####
# merge new region
# 1: FI1A FI1D 1
# 2: FI13 FI1D 1
0.01
# ...........................
# split new region
# 3: FI18 FI1B 0.21
# 4: FI18 FI1C 0.78
suo <- read.table(
text = "NUTS2 NUTS2_new regional_surface
FI13 FI1D 1
FI1A FI1D 1
FI18 FI1D 0.01
FI18 FI1B 0.21
FI18 FI1C 0.78
", header = TRUE ) %>%
as_tibble() %>%
mutate (COUNTRY = "SUO",
change = (case_when(NUTS2 %in% c("FI13","FI1A") ~ "merge", TRUE ~ "split" )),
from_NUTS3 = '', from_ex_NUTS3 = '') %>%
mutate_if(is.factor, as.character)
# sve ####
sve <- read.table(
text = "NUTS2 NUTS2_new regional_surface
SE01 SE11 1
SE02 SE12 1
SE09 SE21 1
SE04 SE22 1
SE0A SE23 1
SE06 SE31 1
SE07 SE32 1
SE08 SE33 1", header = TRUE ) %>%
as_tibble() %>%
mutate (COUNTRY = "SVE",
change = "recoded",
from_NUTS3 = '',
from_ex_NUTS3 = '') %>%
mutate_if(is.factor, as.character)
# svn ???####
# before 2006 version: SI00 split into SI01 and SI02 ????????????????
svn <- read.table(
text = "NUTS2 NUTS2_new regional_surface change
SI00 SI01 '' split
SI00 SI01 '' split
SI01 SI03 1.03 'boundary shift, new region'
SI02 SI04 0.97 'boundary shift, new region'", header = TRUE ) %>%
as_tibble() %>%
mutate (COUNTRY = "SVN", from_NUTS3 = '', from_ex_NUTS3 = '') %>%
mutate_if(is.factor, as.character)
# uki ####
uki <- read.table(
text = "NUTS2 NUTS2_new regional_surface change from_ex_NUTS3
# boundary shift
Loading full blame...