-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadd_bulk_1_to_6_photo_description.R
77 lines (53 loc) · 3.73 KB
/
add_bulk_1_to_6_photo_description.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
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
library(tidyverse)
library(readxl)
library(openxlsx)
# data
data_2019_2020_1 <- read_excel(path = "data/ucop_data_2019_2020_1_v5.xlsx")
# bulk 1 : photos
photos_bulk_1 <- read_excel(path = "sorties/finales/500_features_bulk_1/UCOP_ressources_photos_bulk_1.xlsx", sheet = "NOT")
photos_bulk_1 %>%
mutate(OS_Number = str_sub(string = CATALOGUE_ID.E42, start = 1, end = 8)) %>%
left_join(., y = data_2019_2020_1 %>%
select(OS_Number, `Feature form`, featInterpretationType)) %>%
mutate(DESCRIPTION.E62 = paste0("photo of a ", str_to_lower(`Feature form`), ": ", str_to_lower(featInterpretationType))) -> photos_bulk_1
write.xlsx(x = photos_bulk_1, file = "sorties/finales/500_features_bulk_1/photos_description_bulk_1.xlsx")
# bulk 2 : photos
photos_bulk_2 <- read_excel(path = "sorties/finales/500_features_bulk_2/UCOP_ressources_photos_bulk_number_2.xlsx", sheet = "NOT")
photos_bulk_2 %>%
mutate(OS_Number = str_sub(string = CATALOGUE_ID.E42, start = 1, end = 8)) %>%
left_join(., y = data_2019_2020_1 %>%
select(OS_Number, `Feature form`, featInterpretationType)) %>%
mutate(DESCRIPTION.E62 = paste0("photo of a ", str_to_lower(`Feature form`), ": ", str_to_lower(featInterpretationType))) -> photos_bulk_2
write.xlsx(x = photos_bulk_2, file = "sorties/finales/500_features_bulk_2/photos_description_bulk_2.xlsx")
# bulk 3 : photos
photos_bulk_3 <- read_excel(path = "sorties/finales/500_features_bulk_3/UCOP_ressources_photos_number_3.xlsx", sheet = "NOT")
photos_bulk_3 %>%
mutate(OS_Number = str_sub(string = CATALOGUE_ID.E42, start = 1, end = 8)) %>%
left_join(., y = data_2019_2020_1 %>%
select(OS_Number, `Feature form`, featInterpretationType)) %>%
mutate(DESCRIPTION.E62 = paste0("photo of a ", str_to_lower(`Feature form`), ": ", str_to_lower(featInterpretationType))) -> photos_bulk_3
write.xlsx(x = photos_bulk_3, file = "sorties/finales/500_features_bulk_3/photos_description_bulk_3.xlsx")
# bulk 4 : photos
photos_bulk_4 <- read_excel(path = "sorties/finales/500_features_bulk_4/UCOP_ressources_photos_number_4.xlsx", sheet = "NOT")
photos_bulk_4 %>%
mutate(OS_Number = str_sub(string = CATALOGUE_ID.E42, start = 1, end = 8)) %>%
left_join(., y = data_2019_2020_1 %>%
select(OS_Number, `Feature form`, featInterpretationType)) %>%
mutate(DESCRIPTION.E62 = paste0("photo of a ", str_to_lower(`Feature form`), ": ", str_to_lower(featInterpretationType))) -> photos_bulk_4
write.xlsx(x = photos_bulk_4, file = "sorties/finales/500_features_bulk_4/photos_description_bulk_4.xlsx")
# bulk 5 : photos
photos_bulk_5 <- read_excel(path = "sorties/finales/500_features_bulk_5/UCOP_ressources_photos_bulk_number_5.xlsx", sheet = "NOT")
photos_bulk_5 %>%
mutate(OS_Number = str_sub(string = CATALOGUE_ID.E42, start = 1, end = 8)) %>%
left_join(., y = data_2019_2020_1 %>%
select(OS_Number, `Feature form`, featInterpretationType)) %>%
mutate(DESCRIPTION.E62 = paste0("photo of a ", str_to_lower(`Feature form`), ": ", str_to_lower(featInterpretationType))) -> photos_bulk_5
write.xlsx(x = photos_bulk_5, file = "sorties/finales/500_features_bulk_5/photos_description_bulk_5.xlsx")
# bulk 6 : photos
photos_bulk_6 <- read_excel(path = "sorties/finales/500_features_bulk_6/UCOP_ressources_photos_bulk_number_6.xlsx", sheet = "NOT")
photos_bulk_6 %>%
mutate(OS_Number = str_sub(string = CATALOGUE_ID.E42, start = 1, end = 8)) %>%
left_join(., y = data_2019_2020_1 %>%
select(OS_Number, `Feature form`, featInterpretationType)) %>%
mutate(DESCRIPTION.E62 = paste0("photo of a ", str_to_lower(`Feature form`), ": ", str_to_lower(featInterpretationType))) -> photos_bulk_6
write.xlsx(x = photos_bulk_6, file = "sorties/finales/500_features_bulk_6/photos_description_bulk_6.xlsx")