Commit c3c4fa0b authored by Thomas Brand's avatar Thomas Brand

Add an end date.

parent 4cf58a00
......@@ -35,6 +35,8 @@ listcountry <- list("France" = "FR",
"Italy" = "IT",
"Spain" = "ES",
"Euro Area" = "EA19")
yearmax <- 2017
```
We compute the implicit tax rates (ITR) on consumption, labour and corporate income for France, Italy, Spain, Germany and the Euro Area since 1995. We use as reference the reports on Taxation trends in the European Union: @2018, @2017, @2016 and @2014.
......@@ -81,7 +83,7 @@ filter <- paste0("A.MIO_NAC.S13_S212.",url_taxes,".",url_country)
ITR_cons_num <-
rdb("Eurostat","gov_10a_taxag", mask = filter) %>%
filter(year(period)>=1995 & year(period)<2017) %>%
filter(year(period)>=1995 & year(period)<yearmax) %>%
select(country=geo,period,var=na_item,value)
```
We verify the minDate and maxDate of the data series we have just obtained from Eurostat's database:
......@@ -148,7 +150,7 @@ We pay special attention to France, Italy, Spain & Germany, and following the DG
conso_specificities <-
read_csv("s_conso.csv") %>%
select(country, period, var, value=total) %>%
filter(year(period)>=1995 & year(period)<2017) %>%
filter(year(period)>=1995 & year(period)<yearmax) %>%
spread(var,value)
ITR_cons_num <-
......@@ -175,7 +177,7 @@ filter <- paste0("A.CP_MNAC.","P31_S14_DC",".",url_country)
ITR_cons_den <-
rdb("Eurostat","nama_10_fcs",mask = filter) %>%
filter(year(period)>=1995 & year(period)<2017) %>%
filter(year(period)>=1995 & year(period)<yearmax) %>%
select(country=geo,period,value,var=na_item)
ITR_cons_minmax_d <-
......@@ -204,7 +206,7 @@ gdp <-
rdb("Eurostat","nama_10_gdp",mask = filter) %>%
select(period,value,country=geo) %>%
add_column(var="gdp") %>%
filter(year(period)>=1995 & year(period)<2017)
filter(year(period)>=1995 & year(period)<yearmax)
EA_gdp <-
gdp %>%
......@@ -284,7 +286,7 @@ ITR_lab_num_raw <-
ITR_lab_num1 <-
ITR_lab_num_raw %>%
transmute(country=geo,period,var=na_item,value) %>%
filter(year(period)>=1995 & year(period)<2017 & !grepl('D51A_C1', var))
filter(year(period)>=1995 & year(period)<yearmax & !grepl('D51A_C1', var))
```
##Step 2: taxes on employed labour - specificities for France, Germany, Italy and Spain:
......@@ -314,7 +316,7 @@ We pay special attention to France, Italy, Spain & Germany, and following the DG
labour_specificities <-
read_csv("s_labour.csv") %>%
select(country, period, corr_pit=total_pit, corr_leyrs=total_leyrs, corr_lees=total_lees, corr_prt=total_prt) %>%
filter(year(period)>=1995 & year(period)<2017)
filter(year(period)>=1995 & year(period)<yearmax)
```
##Step 3: personal income tax, part raised on labour income
......@@ -402,7 +404,7 @@ pit<-
ITR_lab_num2 <-
ITR_lab_num_raw %>%
transmute(country=geo,period,var=na_item,value) %>%
filter(year(period)>=1995 & year(period)<2017 & var=="D51A_C1") %>%
filter(year(period)>=1995 & year(period)<yearmax & var=="D51A_C1") %>%
left_join(labour_specificities, by=c("country","period"))%>%
left_join(pit,by=c("country","period"))
......@@ -426,7 +428,7 @@ filter <- paste0("A.CP_MNAC.","D1",".",url_country)
ITR_lab_den<-
rdb("Eurostat","nama_10_gdp", mask = filter) %>%
transmute(country=geo,period,value,var=na_item) %>%
filter(year(period)>=1995 & year(period)<2017)
filter(year(period)>=1995 & year(period)<yearmax)
ITR_labour_na <-
bind_rows(ITR_lab_num,ITR_lab_den) %>%
......@@ -470,7 +472,7 @@ filter <- paste0("A.MIO_NAC.S13_S212.",url_taxes,".",url_country)
ITR_lab_num_PT <-
rdb("Eurostat","gov_10a_taxag",mask = "A.MIO_NAC.S13_S212.D611.PT") %>%
select(country=geo,period, corr_PT_D611=value) %>%
filter(year(period)>=1995 & year(period)<2017)
filter(year(period)>=1995 & year(period)<yearmax)
ITR_labour_na <-
ITR_labour_na %>%
......@@ -583,7 +585,7 @@ ITR_corporate_income <-
read_csv("ITR_corporate_income.csv") %>%
gather(period,value,-country) %>%
transmute(country,period=ymd(period),value=value/100) %>%
filter(year(period)>=1995 & year(period)<2017)
filter(year(period)>=1995 & year(period)<yearmax)
ITR_corporate_income_EA <-
ITR_corporate_income %>%
......@@ -721,4 +723,4 @@ ggplot(comparison2,aes(period,value,colour=data_s))+
ggtitle(expression(atop("Labour tax", atop(italic("Comparison: European Commission vs. Updated Data"), ""))))
```
# References
\ No newline at end of file
# References
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment