Revisión | 7fab32ec9541a76d0b2a9eee4ae82c49cdbac8a8 (tree) |
---|---|
Tiempo | 2024-09-18 02:52:57 |
Autor | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
I improved the script and the handling of the output files.
@@ -11,13 +11,13 @@ | ||
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | -df1_ini <- read_csv("SI1.csv",col_types=cols(`Dejavnost SKD 2. nivo ID`="c") ) |> | |
14 | +df1_ini <- read_csv("../input/SI1.csv",col_types=cols(`Dejavnost SKD 2. nivo ID`="c") ) |> | |
15 | 15 | clean_names() |
16 | 16 | |
17 | -df2_ini <- read_csv("SI2.csv") |> | |
17 | +df2_ini <- read_csv("../input/SI2.csv") |> | |
18 | 18 | clean_names() |
19 | 19 | |
20 | -df3_ini <- read_csv("SI3.csv") |> | |
20 | +df3_ini <- read_csv("../input/SI3.csv") |> | |
21 | 21 | clean_names() |> |
22 | 22 | mutate(datum_odobritve=excel_numeric_to_date(datum_odobritve)) |
23 | 23 |
@@ -205,9 +205,13 @@ | ||
205 | 205 | ## filter(member_state_2_letter_code=="SI") |
206 | 206 | |
207 | 207 | |
208 | -nace <- readRDS("../nace_codes/df_nace.RDS") |> | |
208 | +## nace <- readRDS("../nace_codes/df_nace.RDS") |> | |
209 | +## select(-code) | |
210 | + | |
211 | +nace <- readRDS("../input/df_nace.RDS") |> | |
209 | 212 | select(-code) |
210 | 213 | |
214 | + | |
211 | 215 | df_nace <- tibble(macro=seq_fixed_width(1:99,2), |
212 | 216 | x=1:99) |> |
213 | 217 | mutate(macro2=case_when( |
@@ -301,11 +305,14 @@ | ||
301 | 305 | ## mutate(case_reference=str_trim(case_reference, "both")) |
302 | 306 | |
303 | 307 | |
304 | - | |
305 | -save_excel(df_tot, "SI_aid.xlsx") | |
308 | +remove_file("../output/SI_aid.xlsx") | |
309 | +save_excel(df_tot, "../output/SI_aid.xlsx") | |
310 | + | |
311 | +remove_file("../output/slovenian_tam.parquet") | |
312 | +write_parquet(df_tot, "../output/slovenian_tam.parquet") | |
306 | 313 | |
307 | 314 | |
308 | -write_parquet(df_tot, "slovenian_tam.parquet") | |
309 | - | |
315 | +remove_file("../../tam_arrow/input/parquet-files/slovenia/slovenian_tam.parquet") | |
316 | +write_parquet(df_tot, "../../tam_arrow/input/parquet-files/slovenia/slovenian_tam.parquet") | |
310 | 317 | |
311 | 318 | print("So far so good") |