• R/O
  • SSH

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得windowscocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Commit MetaInfo

修订版866415849c9c1f24b46badf835e8c41f0023d5c2 (tree)
时间2022-08-12 01:00:03
作者Lorenzo Isella <lorenzo.isella@gmai...>
CommiterLorenzo Isella

Log Message

I fixed some issues with the mare data.

更改概述

差异

diff -r 99296f828451 -r 866415849c9c R-codes/create_csv_sdmx.R
--- a/R-codes/create_csv_sdmx.R Thu Aug 11 00:46:35 2022 +0200
+++ b/R-codes/create_csv_sdmx.R Thu Aug 11 18:00:03 2022 +0200
@@ -30,7 +30,9 @@
3030
3131 ## gdp <- readRDS("gdp.RDS")
3232
33-gdp <- read_excel("scb_data.xlsx", "gdp_ameco_long_format") %>%
33+## gdp <- read_excel("scb_data.xlsx", "gdp_ameco_long_format") %>%
34+gdp <- read_excel("../LI.xlsx", "gdp_ameco_long_format") %>%
35+
3436 clean_data() %>%
3537 rename("time_period"="expenditure_year",
3638 "obs_value"="gdp_eur_bn") %>%
@@ -465,7 +467,9 @@
465467 ## as_tibble
466468
467469
468-df_agri_ini <- read_excel("scb_data.xlsx", "scb_agri_data")
470+## df_agri_ini <- read_excel("scb_data.xlsx", "scb_agri_data")
471+
472+df_agri_ini <- read_excel("../LI.xlsx", "scb_agri_data")
469473
470474 df_agri <- df_agri_ini %>%
471475 clean_data() %>%
@@ -600,7 +604,10 @@
600604 ## df_fish_ini <- read.xlsx("MARE 2009 - 2019.xlsx", sheet=2) %>%
601605 ## as_tibble
602606
603-df_fish_ini <- read_excel("scb_data.xlsx", "scb_mare_data" )
607+## df_fish_ini <- read_excel("scb_data.xlsx", "scb_mare_data" )
608+
609+df_fish_ini <- read_excel("../LI.xlsx", "scb_mare_data" )
610+
604611
605612 ## df_fish_fin <- df_fish_ini %>%
606613 ## rename("geo"="TIME_PERIOD") %>%
@@ -681,6 +688,8 @@
681688
682689 df_fish_fin_save <- df_fish_ini %>%
683690 clean_data() %>%
691+ mutate(member_state=recode(member_state,"BGN"="BGR",
692+ "PLN"="POL")) |>
684693 left_join(y=iso_map_eu28, by=c("member_state"="iso3")) %>%
685694 rename("geo"="iso2") %>%
686695 left_join(y=gdp, by=c("expenditure_year"="time_period",
@@ -711,8 +720,11 @@
711720
712721
713722
714-write_csv(df_fish_fin_save, "aid_mare+COMP+2.1.sdmx.csv")
715-write_tsv(df_fish_fin_save, "aid_mare+COMP+2.1.sdmx.tsv")
723+write_csv(df_fish_fin_save, "aid_mare+COMP+2.2.sdmx.csv")
724+write_tsv(df_fish_fin_save, "aid_mare+COMP+2.2.sdmx.tsv")
725+
726+
727+save_excel(df_fish_fin_save, "aid_mare_cube_new.xlsx")
716728
717729
718730