-
Notifications
You must be signed in to change notification settings - Fork 1
/
0_entete_data.qmd
55 lines (46 loc) · 2.37 KB
/
0_entete_data.qmd
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
<!-- Mettre ici le code permettant le prétraitement de données en vue de graphes au sein du rapport (R, Python) -->
```{r preliminaires-settings, include = FALSE, echo = FALSE, message=FALSE, warning=FALSE, results='hide'}
knitr::opts_chunk$set(message = FALSE, warning = FALSE)
library(dplyr)
library(kableExtra)
miaps_palette <-
function(n) {
palette <- colorRampPalette(c("#7DC142", "#00AEAA"))(n)
class(palette) <- "palette"
attr(palette, "name") <- "mia-ps"
palette
}
```
```{r preliminaires-rh, include = FALSE, echo = FALSE, message=FALSE, warning=FALSE, results='hide', eval = FALSE}
library(tidyverse)
library(scales)
library(viridis)
theme_set(theme_bw())
baseRH_miaps <- read_tsv("data/Bilan_RH_MIA-PS_0518_2018-2024.tsv") %>%
unite(nom, nom, prénom) %>%
mutate(
statut =
fct_relevel(statut,
"Doctorant.e / Post-doc.", "Chercheur.e", "Enseignant.e - Chercheur.e", "Ingénieur.e", "Informaticien.ne proximité", "Gestionnaire", "Personnels occasionnels"
),
corps = fct_relevel(corps,
"TR", "SA", "AI", "IE", "IR", "IPEF", "CR", "CPJ", "DR", "MC", "MCC", "PR", "Doc", "Post-doc"
),
bourse = case_when(financement %in% c("EDF", "Orange", "Deezer", "Danone", "Sanofi", "ATOS", "Pasteur") ~ 'contrat privé',
financement %in% c("IGN", "ANDRA", "CEA", "Ifremer") ~ 'EPIC/EPA',
financement %in% c("PEPR", "CLAND", "H2020", "ANR", "FUI") ~ 'contrat public',
financement %in% c("Mathnum-EDMH", "DGA", "Digitbio-EDMH", "Mathnum-ANR", "IDEX", "IPEF", "Santé public France", "Paris-Saclay", "SCAC", "DIM", "CNRS", "Ministère", "LMH", "ABIES", "EDMH", "Télécom", "Mathnum-EDMH") ~ 'fonds publics',
.default = NA)
) %>%
mutate(
type_contrat = case_when(bourse %in% c("contrat privé", "EPIC/EPA") ~ 'privé',
bourse %in% c("contrat public", "fonds publics") ~ 'public', .default = NA),
bourse = fct_relevel(bourse, c("contrat privé", "EPIC/EPA", "contrat public", "fonds publics")),
statut = fct_recode(statut, "Doctorant.e, Postdoc" = "Doctorant.e / Post-doc.")
)
membres <- baseRH_miaps %>% select(-matricule, -naissance, -ancienneté) %>%
mutate(
statut = fct_collapse(statut,
`Appui` = c("Gestionnaire", "Informaticien.ne proximité", "Personnels occasionnels")
))
```