The main purpose of this document is to have an idea of how collective agreements work in Spain.
The libraries that I will need:
library(dplyr)
library(ggplot2)
library(statsr)
library(readxl)
library(expss)
library(stringr)
library(zoo)
mytheme <- theme_gray
theme_update(
plot.title = element_text(
family = 'serif',
face = 'bold.italic',
colour = 'grey25',
size = '18'
),
axis.title = element_text(
family = 'serif',
face = 'bold',
colour = 'grey25',
size = '12'
),
axis.text = element_text(
family = 'serif',
colour = 'grey35',
size = '10'
),
legend.title = element_text(
family = 'serif',
colour = 'grey25',
face = 'bold',
size = '12'
),
legend.text = element_text(
family = 'serif',
colour = 'grey35',
size = '10'
)
)
dell <- 0
if (dell == 1) {
computer <- "C:/Users/jj22684/"
} else {
computer <- "C:/Users/lenovo/"
}
setwd(paste0(computer,"Dropbox/WORK/data/REGCON/Codes/FIRM/3.descr"))
Main_path <- paste(computer, "Dropbox/WORK/data/REGCON", sep = "")
raw_path <- paste(computer, "Dropbox/WORK/data/REGCON/RAW files", sep = "")
load(paste(Main_path, "/Files/FIRM/built/regconfirm_built.R", sep = ""))
The firs table shows the number of repeated CBA, usually they are duplicated because they are renegotiated (new text).
The second table shows the number of CBA that a firm has signed, it may be the case that it has signed CBA’s in different provinces, towns or establishments.
## # A tibble: 8 × 3
## ndups n_codca excess
## <int> <int> <dbl>
## 1 1 4812 0
## 2 2 1748 1748
## 3 3 651 1302
## 4 4 180 540
## 5 5 52 208
## 6 6 23 115
## 7 7 6 36
## 8 8 6 42
## # A tibble: 33 × 3
## ndups n_firms excess
## <int> <int> <dbl>
## 1 1 3678 0
## 2 2 1408 1408
## 3 3 549 1098
## 4 4 189 567
## 5 5 92 368
## 6 6 56 280
## 7 7 23 138
## 8 8 19 133
## 9 9 9 72
## 10 10 6 54
## 11 11 4 40
## 12 12 4 44
## 13 13 2 24
## 14 14 3 39
## 15 15 1 14
## 16 16 1 15
## 17 17 2 32
## 18 18 3 51
## 19 19 1 18
## 20 20 2 38
## 21 23 1 22
## 22 24 1 23
## 23 25 1 24
## 24 27 2 52
## 25 29 1 28
## 26 32 1 31
## 27 33 1 32
## 28 35 2 68
## 29 36 1 35
## 30 88 1 87
## 31 100 1 99
## 32 209 1 208
## 33 261 1 260
The firs table shows the number of firms by province, eco act at 4 digit level and firms size in bins
The second table shows the number of firms by province, eco act at 2 digit level and firms size in bins
The graph below shows how many CAs have been negotiated, depending on:
Looking at the first graphs, many agreements are brand new agreements.
The second graph divides the type of procedure into the agreement nature.
Most CA apply to the entire firm
## # A tibble: 4 × 2
## funcscope n
## <chr> <int>
## 1 "Band Agreements" 397
## 2 "Enterprise Group/Linked Enterprises" 305
## 3 "Firm or all the Establishments of\nthe Firm" 7979
## 4 "One or Several Firm Establishments" 2788
## Warning: The `trans` argument of `continuous_scale()` is deprecated as of ggplot2 3.5.0.
## ℹ Please use the `transform` argument instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## `summarise()` has grouped output by 'dtpublim'. You can override using the
## `.groups` argument.
In the first graph we see the distribution of firm size up to 500 employees, otherwise the histograme would be too distorted.
In the second graph, it is the same but for up to 100 employees to advert the spike at 6.
## The following objects are masked from REGCON_FIRM2 (pos = 5):
##
## codca, firmid, idca
## Warning: Removed 490 rows containing non-finite outside the scale range (`stat_bin()`).
## Removed 490 rows containing non-finite outside the scale range (`stat_bin()`).
## Warning: Removed 2 rows containing missing values or values outside the scale range
## (`geom_bar()`).
## Removed 2 rows containing missing values or values outside the scale range
## (`geom_bar()`).
## Warning: Removed 2307 rows containing non-finite outside the scale range (`stat_bin()`).
## Removed 2 rows containing missing values or values outside the scale range
## (`geom_bar()`).
## # A tibble: 1 × 6
## `mean(size)` `var(size)` `min(size)` `median(size)` `max(size)` `sum(size)`
## <dbl> <dbl> <int> <dbl> <int> <int>
## 1 231. 1930977. 1 49 73838 1728081
## # A tibble: 863 × 2
## size n
## <labelled> <int>
## 1 1 11
## 2 2 9
## 3 3 12
## 4 4 14
## 5 5 32
## 6 6 142
## 7 7 110
## 8 8 115
## 9 9 98
## 10 10 151
## # ℹ 853 more rows
## The following objects are masked from REGCON_FIRM2 (pos = 3):
##
## codca, firmid, idca, size, sizem, sizew
## The following objects are masked from REGCON_FIRM2 (pos = 6):
##
## codca, firmid, idca
## Warning: A numeric `legend.position` argument in `theme()` was deprecated in ggplot2
## 3.5.0.
## ℹ Please use the `legend.position.inside` argument of `theme()` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Warning: The dot-dot notation (`..density..`) was deprecated in ggplot2 3.4.0.
## ℹ Please use `after_stat(density)` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Warning: Removed 490 rows containing non-finite outside the scale range
## (`stat_bin()`).
## Warning: Removed 4 rows containing missing values or values outside the scale range
## (`geom_bar()`).
## Warning: Removed 2307 rows containing non-finite outside the scale range (`stat_bin()`).
## Removed 4 rows containing missing values or values outside the scale range
## (`geom_bar()`).
## # A tibble: 2 × 6
## proctype `mean(size)` `var(size)` `median(size)` `max(size)` `sum(size)`
## <fct> <dbl> <dbl> <dbl> <int> <int>
## 1 New Agreement 151. 1785511. 34 73838 603328
## 2 New Text 323. 2082533. 79 34793 1124753
## The following objects are masked from REGCON_FIRM2 (pos = 3):
##
## codca, firmid, idca, proctype, size, sizem, sizew
## The following objects are masked from REGCON_FIRM2 (pos = 4):
##
## codca, firmid, idca, size, sizem, sizew
## The following objects are masked from REGCON_FIRM2 (pos = 7):
##
## codca, firmid, idca
## Warning: Removed 490 rows containing non-finite outside the scale range
## (`stat_bin()`).
## Warning: Removed 4 rows containing missing values or values outside the scale range
## (`geom_bar()`).
## Warning: Removed 2307 rows containing non-finite outside the scale range (`stat_bin()`).
## Removed 4 rows containing missing values or values outside the scale range
## (`geom_bar()`).
## # A tibble: 2 × 6
## proctype `mean(size)` `var(size)` `median(size)` `max(size)` `sum(size)`
## <fct> <dbl> <dbl> <dbl> <int> <int>
## 1 New Agreement 151. 1785511. 34 73838 603328
## 2 New Text 323. 2082533. 79 34793 1124753