library(tidyverse)
library(readxl)
library(countries)
library(rnaturalearth)
library(rnaturalearthdata)
library(sf)
base <- read_excel("C:/Users/monrenike.agossou/OneDrive - Fondation PIERRE FABRE/Stage/Base_MAJ2.xlsx")
names(base)
## [1] "ID"
## [2] "WPML Language Code"
## [3] "Status"
## [4] "Title"
## [5] "Content"
## [6] "Name of the organisation responsible for the initiative"
## [7] "Business sector of the organisation"
## [8] "Presentation of the organisation"
## [9] "Country"
## [10] "Organisation website"
## [11] "Initiative name"
## [12] "Website"
## [13] "Initiatives mission / Overall objective"
## [14] "Detailed description of the initiative"
## [15] "Initiative field(s) of application"
## [16] "Other field(s) of application"
## [17] "What is (are) the healthcare theme(s) targeted by the initiative"
## [18] "Specify infectious diseases"
## [19] "Specify chronic diseases"
## [20] "Other healthcare theme(s)"
## [21] "Target audience(s) for your initiative"
## [22] "Other target audience(s)"
## [23] "What problem does the initiative address ?"
## [24] "How does the proposed solution add value to other available solutions ?"
## [25] "Initiative progress stage"
## [26] "Initiative start date"
## [27] "Initiative end date"
## [28] "What is the objective of the medical service(s) provided ?"
## [29] "Area where initiative is currently implemented / utilised"
## [30] "In what country(s) is the initiative currently being implemented / utilised ?"
## [31] "Materials used"
## [32] "Other materials used"
## [33] "Specify connected objects"
## [34] "Other materials used_1"
## [35] "Technologies used"
## [36] "Other technologies used"
## [37] "Is offline use possible ?"
## [38] "Is the developed service open source ?"
## [39] "Are the generated data available as open data ?"
## [40] "Has this initiative been evaluated ?"
## [41] "What is the total number of beneficiaries since the initiative was first implemented ?"
## [42] "How many people (full-time equivalents) are working on this initiative ?"
## [43] "Number of employee(s) working on this initiative"
## [44] "Number of volunteer(s) working on this initiative"
## [45] "Number of service provider(s) (company/ies) working on this initiative"
## [46] "Funding sources"
## [47] "Other funding source(s)"
## [48] "Economic model"
## [49] "Other economic models"
## [50] "Do you work with partners (organisations that agree to join forces to help achieve your goal, while remaining autonomous) ?"
## [51] "Partners_nom_de_la_structure_partenaire"
## [52] "Partners_secteur_de_la_structure_partenaire"
## [53] "laureats_0_laureat_mis_en_avant"
## [54] "laureats_0_devenue_laureat"
base1 <- base %>%
filter (Status == "publish" & `WPML Language Code` == "fr")
base1 <- base1 %>%
select (c(1,7,9, 11, 15, 16, 17, 18, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30, 37, 38, 39, 41, 46, 47, 48, 49, 53, 54 ))
base1 <- base1 %>%
mutate(business_org = str_sub(`Business sector of the organisation`,23,23)) %>%
mutate(country_org = str_sub(Country,1,2)) %>%
mutate(start_date=as.Date(base1$`Initiative start date`,format = "%d/%m/%Y" )) %>%
mutate(end_date=as.Date(base1$`Initiative end date`,format = "%d/%m/%Y" ))
base1 <- base1 %>%
rename(field = "Initiative field(s) of application",
field_other= "Other field(s) of application",
theme= "What is (are) the healthcare theme(s) targeted by the initiative",
theme_other= "Other healthcare theme(s)",
target="Target audience(s) for your initiative",
target_other="Other target audience(s)",
stage= "Initiative progress stage",
o_source= "Funding sources",
o_source_other= "Other funding source(s)",
f_source= "Economic model",
f_source_other= "Other economic models",
objective="What is the objective of the medical service(s) provided ?",
imp_area="Area where initiative is currently implemented / utilised",
imp_country= "In what country(s) is the initiative currently being implemented / utilised ?",
offline_use="Is offline use possible ?",
opensource="Is the developed service open source ?",
opendata="Are the generated data available as open data ?",
nb_benef="What is the total number of beneficiaries since the initiative was first implemented ?",
prix_date= "laureats_0_devenue_laureat")
base1 <- base1 %>%
select (-`Business sector of the organisation`,- Country, - `Initiative start date`, - `Initiative end date`)
base1 <- base1 %>%
mutate(statut_l = if_else(!is.na(prix_date),
"lauréat",
"non lauréat"))
base1 <- base1 %>%
mutate(
field = as.factor(field),
theme = as.factor(theme),
target = as.factor(target),
offline_use= as.factor(offline_use),
opensource= as.factor(opensource),
opendata= as.factor(opendata),
stage = as.factor(stage),
objective = as.factor(objective),
nb_benef = as.integer(nb_benef),
o_source = as.factor(o_source),
imp_country = as.factor (imp_country),
f_source = as.factor (f_source),
business_org = as.factor (business_org),
country_org = as.factor(country_org),
statut_l = as.factor(statut_l))
base1 <- base1 %>%
mutate(start_date = year (start_date)) %>%
mutate(end_date = year (end_date))
summary(base1)
## ID Initiative name field field_other
## Min. :13586 Length:206 3 : 17 Length:206
## 1st Qu.:14067 Class :character 1|3|4 : 16 Class :character
## Median :14600 Mode :character 3|4 : 16 Mode :character
## Mean :19684 4 : 13
## 3rd Qu.:15185 1 : 12
## Max. :55703 1|2 : 11
## (Other):121
## theme Specify infectious diseases Specify chronic diseases
## 18 : 9 Length:206 Length:206
## 12 : 7 Class :character Class :character
## 1 : 6 Mode :character Mode :character
## 2|18 : 4
## 4 : 4
## 5 : 4
## (Other):172
## theme_other target target_other stage
## Length:206 1 : 30 Length:206 1: 75
## Class :character 1|2 : 16 Class :character 2:131
## Mode :character 1|3 : 13 Mode :character
## 1|2|3|4|5|6|7|8: 7
## 2 : 6
## 1|2|5|6|7|8 : 5
## (Other) :129
## objective imp_area imp_country offline_use opensource opendata
## 1|2|3|4 :40 Min. :1.000 in : 10 1 :151 1 :101 1 : 56
## 4 :23 1st Qu.:1.000 ml : 10 NA's: 55 NA's:105 NA's:150
## 1|2|4 :22 Median :2.000 ng : 10
## 1|2|3|4|5:18 Mean :1.922 ci : 7
## 5 :12 3rd Qu.:2.000 sn : 7
## 1|2 : 8 Max. :4.000 bf : 6
## (Other) :83 (Other):156
## nb_benef o_source o_source_other f_source
## Min. : 1 2 :41 Length:206 7 : 24
## 1st Qu.: 1000 1 :20 Class :character 3 : 23
## Median : 8750 1|2 :20 Mode :character 6 : 23
## Mean : 1077991 6 :15 2 : 15
## 3rd Qu.: 100000 1|2|3|4|5:10 3|6 : 10
## Max. :50000000 (Other) :98 (Other):110
## NA's :6 NA's : 2 NA's : 1
## f_source_other laureats_0_laureat_mis_en_avant prix_date business_org
## Length:206 Min. :0.0000 Min. :2016 1:51
## Class :character 1st Qu.:0.0000 1st Qu.:2017 2:65
## Mode :character Median :0.0000 Median :2019 3:71
## Mean :0.3182 Mean :2020 4:19
## 3rd Qu.:1.0000 3rd Qu.:2022
## Max. :1.0000 Max. :2025
## NA's :162 NA's :159
## country_org start_date end_date statut_l
## fr : 18 Min. :1993 Min. :2016 lauréat : 47
## us : 15 1st Qu.:2014 1st Qu.:2020 non lauréat:159
## in : 14 Median :2016 Median :2022
## ng : 12 Mean :2016 Mean :2022
## ml : 9 3rd Qu.:2019 3rd Qu.:2024
## za : 9 Max. :2025 Max. :2028
## (Other):129 NA's :155
moda_f <- base1 %>%
pull(field) %>% # extraction de la colonne et création d'une liste de valeurs (vecteurs)
str_split("\\|") %>% # découpe toutes les cellules où il y a "|"
unlist() %>% # garde un vecteur
str_trim() %>% # enlève les avant/après
unique(); # garde les valeurs une seule fois
print(moda_f)
## [1] "1" "3" "2" "4" "6" "5"
base1 <- base1 %>%
mutate(
field_1 = if_else(str_detect(field, "1"), "Oui", "Non"),
field_2 = if_else(str_detect(field, "2"), "Oui", "Non"),
field_3 = if_else(str_detect(field, "3"), "Oui", "Non"),
field_4 = if_else(str_detect(field, "4"), "Oui", "Non"),
field_5 = if_else(str_detect(field, "5"), "Oui", "Non"),
field_6 = if_else(str_detect(field, "6"), "Oui", "Non")
) %>%
mutate(across(c(field_1, field_2, field_3, field_4, field_5, field_6), as.factor))
base1 <- base1 %>%
select(-field) %>%
relocate(field_other,.after = field_6)
tab_verif1 <- base1 %>%
filter(!is.na(field_other) & field_other != "" & field_6 == "Non") %>%
select(ID, `Initiative name`, field_6, field_other)
base1 <- base1 %>%
mutate(field_6 = if_else(
!is.na(field_other) & field_other != "" & field_6 != "Oui",
"Oui",
field_6))
tab_verif1_2 <- base1 %>%
select(field_1, field_2, field_3, field_4, field_5, field_6,field_other)
moda_t <- base1 %>%
pull(theme) %>%
str_split("\\|") %>%
unlist() %>%
str_trim() %>%
unique();
print(moda_t)
## [1] "1" "3" "6" "11" "2" "4" "7" "8" "9" "12" "13" "14" "15" "16" "10"
## [16] "17" "18" "5"
base1 <- base1 %>%
mutate(
theme_1 = if_else(str_detect(theme, "\\b1\\b"), "Oui", "Non"),
theme_2 = if_else(str_detect(theme, "\\b2\\b"), "Oui", "Non"),
theme_3 = if_else(str_detect(theme, "\\b3\\b"), "Oui", "Non"),
theme_4 = if_else(str_detect(theme, "\\b4\\b"), "Oui", "Non"),
theme_5 = if_else(str_detect(theme, "\\b5\\b"), "Oui", "Non"),
theme_6 = if_else(str_detect(theme, "\\b6\\b"), "Oui", "Non"),
theme_7 = if_else(str_detect(theme, "\\b7\\b"), "Oui", "Non"),
theme_8 = if_else(str_detect(theme, "\\b8\\b"), "Oui", "Non"),
theme_9 = if_else(str_detect(theme, "\\b9\\b"), "Oui", "Non"),
theme_10 = if_else(str_detect(theme, "\\b10\\b"), "Oui", "Non"),
theme_11 = if_else(str_detect(theme, "\\b11\\b"), "Oui", "Non"),
theme_12 = if_else(str_detect(theme, "\\b12\\b"), "Oui", "Non"),
theme_13 = if_else(str_detect(theme, "\\b13\\b"), "Oui", "Non"),
theme_14 = if_else(str_detect(theme, "\\b14\\b"), "Oui", "Non"),
theme_15 = if_else(str_detect(theme, "\\b15\\b"), "Oui", "Non"),
theme_16 = if_else(str_detect(theme, "\\b16\\b"), "Oui", "Non"),
theme_17 = if_else(str_detect(theme, "\\b17\\b"), "Oui", "Non"),
theme_18 = if_else(str_detect(theme, "\\b18\\b"), "Oui", "Non")) %>%
mutate(across(starts_with("theme_"), as.factor))
base1 <- base1 %>%
select(-theme) %>%
relocate(theme_other,.after = theme_18)
tab_verif2 <- base1 %>%
filter(!is.na(theme_other) & theme_other != "" & theme_18 == "Non") %>%
select(ID, `Initiative name`, theme_18, theme_other)
base1 <- base1 %>%
mutate(theme_18 = if_else(
!is.na(theme_other) & theme_other != "" & theme_18 == "Non",
"Oui",
theme_18))
tab_verif2_2 <- base1 %>%
select(`Initiative name`, theme_1, theme_2, theme_3, theme_4, theme_5, theme_6, theme_7, theme_8, theme_9, theme_10, theme_11, theme_12, theme_13, theme_14, theme_15, theme_16, theme_17, -theme_18,theme_other)
base1 <- base1 %>%
mutate (GBD1_NCD = if_else (theme_10 == "Oui" | theme_11 == "Oui" | theme_12 == "Oui" | theme_13 == "Oui" | theme_14 == "Oui" | theme_15 == "Oui", "Oui", "Non")) %>%
mutate (GBD1_CMNND = if_else (theme_1 == "Oui" | theme_3 == "Oui" | theme_4 == "Oui" | theme_5 == "Oui" | theme_7 == "Oui" | theme_9 == "Oui", "Oui", "Non")) %>%
mutate(GBD1_Trans = if_else (theme_2 == "Oui" | theme_8 == "Oui" & (theme_1 == "Non" & theme_3 == "Non" & theme_4 == "Non" & theme_5 == "Non" & theme_6 == "Non" & theme_7 == "Non" & theme_9 == "Non" & theme_10 == "Non" & theme_11 == "Non" & theme_12 == "Non" & theme_13 == "Non" & theme_14 == "Non" & theme_15 == "Non" ), "Oui", "Non")) %>%
mutate(GBD1_injuries = if_else( base1$`Initiative name`== "TraumaLink", "Oui", "Non")) %>%
mutate(GBD1_Autres = if_else(theme_6 == "Oui" | theme_16 == "Oui" | theme_17 == "Oui", "Oui", "Non"))
base_2 <- base1 %>%
relocate(GBD1_NCD, GBD1_CMNND, GBD1_Trans, GBD1_injuries, GBD1_Autres,.after = theme_15) %>%
select(ID,`Initiative name`, GBD1_NCD, GBD1_CMNND, GBD1_Trans, GBD1_injuries, GBD1_Autres)
moda_t2 <- base1 %>%
pull(target) %>%
str_split("\\|") %>%
unlist() %>%
str_trim() %>%
unique();
print(moda_t2)
## [1] "5" "7" "8" "1" "3" "2" "6" "9" "4"
base1 <- base1 %>%
mutate(
target_1 = if_else(str_detect(target, "1"), "Oui", "Non"),
target_2 = if_else(str_detect(target, "2"), "Oui", "Non"),
target_3 = if_else(str_detect(target, "3"), "Oui", "Non"),
target_4 = if_else(str_detect(target, "4"), "Oui", "Non"),
target_5 = if_else(str_detect(target, "5"), "Oui", "Non"),
target_6 = if_else(str_detect(target, "6"), "Oui", "Non"),
target_7 = if_else(str_detect(target, "7"), "Oui", "Non"),
target_8 = if_else(str_detect(target, "8"), "Oui", "Non"),
target_9 = if_else(str_detect(target, "9"), "Oui", "Non")) %>%
mutate(across(c(target_1, target_2, target_3, target_4, target_5, target_6, target_7, target_8, target_9), as.factor))
base1 <- base1 %>%
select(-target) %>%
relocate(target_other,.after = target_9)
tab_verif3 <- base1 %>%
filter(!is.na(target_other) & target_other != "" & target_9 == "Non") %>%
select(ID, `Initiative name`, target_9, target_other)
base1 <- base1 %>%
mutate(target_9 = if_else(
!is.na(target_other) & target_other != "" & target_9 == "Non",
"Oui",
target_9))
tab_verif3_2 <- base1 %>%
select(target_1, target_2, target_3, target_4, target_5, target_6, target_7, target_8, target_9,target_other )
moda_o <- base1 %>%
pull(o_source) %>%
str_split("\\|") %>%
unlist() %>%
str_trim() %>%
unique();
print(moda_o)
## [1] "1" "3" "4" "6" "2" "5" NA
base1 <- base1 %>%
mutate(
o_source_1 = if_else(str_detect(o_source, "1"), "Oui", "Non"),
o_source_2 = if_else(str_detect(o_source, "2"), "Oui", "Non"),
o_source_3 = if_else(str_detect(o_source, "3"), "Oui", "Non"),
o_source_4 = if_else(str_detect(o_source, "4"), "Oui", "Non"),
o_source_5 = if_else(str_detect(o_source, "5"), "Oui", "Non"),
o_source_6 = if_else(str_detect(o_source, "6"), "Oui", "Non")) %>%
mutate(across(c(o_source_1, o_source_2, o_source_3, o_source_4, o_source_5, o_source_6), as.factor))
base1 <- base1 %>%
select(-o_source) %>%
relocate(o_source_other,.after = o_source_6)
tab_verif4 <- base1 %>%
filter(!is.na(o_source_other) & o_source_other != "" & o_source_6 == "Non") %>%
select(ID, `Initiative name`, o_source_6, o_source_other)
base1 <- base1 %>%
mutate(o_source_6 = if_else(
!is.na(o_source_other) & o_source_other != "" & o_source_6 == "Non",
"Oui",
o_source_6))
tab_verif4_2 <- base1 %>%
select(o_source_1, o_source_2, o_source_3, o_source_4, o_source_5, o_source_6, o_source_other )
moda_o <- base1 %>%
pull(objective) %>%
str_split("\\|") %>%
unlist() %>%
str_trim() %>%
unique();
print(moda_o)
## [1] "5" "4" "1" "2" "3"
base1 <- base1 %>%
mutate(
objective_1 = if_else(str_detect(objective, "1"), "Oui", "Non"),
objective_2 = if_else(str_detect(objective, "2"), "Oui", "Non"),
objective_3 = if_else(str_detect(objective, "3"), "Oui", "Non"),
objective_4 = if_else(str_detect(objective, "4"), "Oui", "Non"),
objective_5 = if_else(str_detect(objective, "5"), "Oui", "Non")) %>%
mutate(across(c(objective_1,objective_2, objective_3, objective_4, objective_5 ), as.factor))
base1 <- base1 %>%
select(-objective)
tab_verif4 <- base1 %>%
select(objective_1,objective_2, objective_3, objective_4, objective_5)
moda_f <- base1 %>%
pull(f_source) %>%
str_split("\\|") %>%
unlist() %>%
str_trim() %>%
unique();
print(moda_f)
## [1] "3" "1" "5" "2" "6" "7" "4" NA
base1 <- base1 %>%
mutate(
f_source_1 = if_else(str_detect(f_source, "1"), "Oui", "Non"),
f_source_2 = if_else(str_detect(f_source, "2"), "Oui", "Non"),
f_source_3 = if_else(str_detect(f_source, "3"), "Oui", "Non"),
f_source_4 = if_else(str_detect(f_source, "4"), "Oui", "Non"),
f_source_5 = if_else(str_detect(f_source, "5"), "Oui", "Non"),
f_source_6 = if_else(str_detect(f_source, "6"), "Oui", "Non"),
f_source_7 = if_else(str_detect(f_source, "7"), "Oui", "Non")) %>%
mutate(across(c(f_source_1, f_source_2, f_source_3, f_source_4, f_source_5, f_source_6, f_source_7), as.factor))
base1 <- base1 %>%
select(-f_source) %>%
relocate(f_source_other,.after = f_source_7)
tab_verif5 <- base1 %>%
filter(!is.na(f_source_other) & f_source_other != "" & f_source_7 == "Non") %>%
select(ID, `Initiative name`, f_source_7, f_source_other)
base1 <- base1 %>%
mutate(f_source_7 = if_else(
!is.na(f_source_other) & f_source_other != "" & f_source_7 == "Non",
"Oui",
f_source_7))
tab_verif5_2 <- base1 %>%
select(f_source_1, f_source_2, f_source_3, f_source_4, f_source_5, f_source_6, f_source_7, f_source_other )
base1 <- base1 %>%
mutate (ECO1 = if_else(f_source_1 == "Oui" | f_source_2 == "Oui", "Oui", "Non")) %>%
mutate (ECO2 = if_else(f_source_3 == "Oui" | f_source_6 == "Oui", "Oui", "Non")) %>%
mutate (ECO3 = if_else(f_source_4 == "Oui", "Oui", "Non")) %>%
mutate (ECO4 = if_else( f_source_5 == "Oui", "Oui", "Non")) %>%
mutate (ECO5 = if_else(f_source_7 == "Oui", "Oui", "Non")) %>%
rename (ECO_other = f_source_other)
base_3 <- base1 %>%
relocate(ECO1, ECO2, ECO3, ECO4, ECO5, ECO_other,.after = f_source_7) %>%
select(ID,`Initiative name`,ECO1, ECO2, ECO3, ECO4, ECO5, ECO_other )
codes_pays <- base1 %>%
pull(imp_country) %>%
replace_na("") %>%
str_split("\\|") %>%
unlist() %>%
str_trim() %>%
str_to_upper() %>%
unique()
print(codes_pays)
## [1] "BF" "CI" "ML" "NE" "SN" "SL" "NG" "KH" "NP" "IN" "CM" "CA" "CD" "US" "GP"
## [16] "KE" "MQ" "SD" "TT" "FR" "LB" "MA" "TG" "TN" "MZ" "BD" "MM" "MY" "ID" "UG"
## [31] "ZA" "BW" "MW" "ZM" "ZW" "TZ" "CG" "GA" "LY" "SO" "BJ" "AF" "KG" "PK" "TJ"
## [46] "LK" "GN" "VN" "LA" "MG" "MU" "RW" "ET" "GT" "LS" "DZ" "AR" "PT" "DO" "SA"
## [61] "NA" "GB" "LR" "CN" "EG" "AE" "KW" "SG" "PH" "TH" "HT" "MR" "TD" "BI" "IT"
## [76] "GH" "MX" "MN" "DJ" "CV" "GM" "GW" "BH" "IR" "IQ" "JO" "PG" "SY" "UA" "YE"
## [91] "SS" "AO" "ER" "GQ" "CF" "ST" "BZ" "BE" "SZ" "BO" "LU" "DM"
noms_pays <- if_else(
is_country(codes_pays),
country_name(codes_pays, to = "name_fr", verbose = TRUE),
codes_pays)
##
## In total 102 unique country names were provided
## 102/102 have been matched with EXACT matching
## 0/102 have been matched with FUZZY matching
##
##
## The following country IDs do not have a match in one or more of the requested naming conventions, NA returned:
## (To avoid NAs, use - to = 'simple'- or set - na_fill = TRUE)
## - NA
noms_pays[codes_pays == "NA"] <- "Namibie"
pays_clean <- replace_na(base1$imp_country, "") %>%
str_to_upper()
for (i in seq_along(codes_pays)) {
base1[[noms_pays[i]]] <- if_else(
str_detect(pays_clean, fixed(codes_pays[i])),
"Oui", "Non") %>% as.factor()}
base1 <- base1 %>%
select(-imp_country)
base1 %>%
select(all_of(noms_pays)) %>%
head(10)
## # A tibble: 10 × 102
## `Burkina Faso` `Côte d'Ivoire` Mali Niger Sénégal `Sierra Leone` Nigeria
## <fct> <fct> <fct> <fct> <fct> <fct> <fct>
## 1 Oui Non Non Non Non Non Non
## 2 Non Oui Non Non Non Non Non
## 3 Non Non Oui Non Non Non Non
## 4 Non Non Non Oui Oui Non Non
## 5 Non Non Non Non Non Oui Non
## 6 Oui Non Non Non Non Non Non
## 7 Non Non Non Non Non Non Oui
## 8 Non Oui Non Non Non Non Non
## 9 Non Non Oui Non Non Non Non
## 10 Non Non Oui Non Non Non Non
## # ℹ 95 more variables: Cambodge <fct>, Népal <fct>, Inde <fct>, Cameroun <fct>,
## # Canada <fct>, `République démocratique du Congo` <fct>, `États-Unis` <fct>,
## # Guadeloupe <fct>, Kenya <fct>, Martinique <fct>, Soudan <fct>,
## # `Trinité-et-Tobago` <fct>, France <fct>, Liban <fct>, Maroc <fct>,
## # Togo <fct>, Tunisie <fct>, Mozambique <fct>, Bangladesh <fct>,
## # Birmanie <fct>, Malaisie <fct>, Indonésie <fct>, Ouganda <fct>,
## # `Afrique du Sud` <fct>, Botswana <fct>, Malawi <fct>, Zambie <fct>, …
moda_a <- base1 %>%
pull(imp_area) %>%
str_split("\\|") %>%
unlist() %>%
str_trim() %>%
unique();
print(moda_a)
## [1] "4" "2" "1" "3"
base1 <- base1 %>%
mutate(
imp_area_1 = if_else(str_detect(imp_area, "1"), "Oui", "Non"),
imp_area_2 = if_else(str_detect(imp_area, "2"), "Oui", "Non"),
imp_area_3 = if_else(str_detect(imp_area, "3"), "Oui", "Non"),
imp_area_4 = if_else(str_detect(imp_area, "4"), "Oui", "Non")) %>%
mutate(across(c(imp_area_1, imp_area_2, imp_area_3, imp_area_4), as.factor))
base1 <- base1 %>%
select(-imp_area)
tab_verif6 <- base1 %>%
select(imp_area_1, imp_area_2, imp_area_3, imp_area_4)
base1 <- base1 %>%
mutate(
nb_imp_area = rowSums(across(c(imp_area_1, imp_area_2, imp_area_3, imp_area_4), ~ . == "Oui"), na.rm = TRUE),
multi_area = ifelse(nb_imp_area > 1, "Oui", "Non"))
base1 %>%
filter(multi_area == "Oui") %>%
select(ID, `Initiative name`, imp_area_1, imp_area_2, imp_area_3, imp_area_4)
## # A tibble: 0 × 6
## # ℹ 6 variables: ID <dbl>, Initiative name <chr>, imp_area_1 <fct>,
## # imp_area_2 <fct>, imp_area_3 <fct>, imp_area_4 <fct>
base1 %>%
filter(str_detect(stage, "\\|")) %>%
select(ID, `Initiative name`, stage)
## # A tibble: 0 × 3
## # ℹ 3 variables: ID <dbl>, Initiative name <chr>, stage <fct>
base1 <- base1 %>%
mutate (end_stage = if_else(is.na(end_date), "non clôturé", "clôturé"))
base1 %>%
filter(is.na(start_date)) %>%
select(start_date, ID, `Initiative name`)
## # A tibble: 0 × 3
## # ℹ 3 variables: start_date <dbl>, ID <dbl>, Initiative name <chr>
verif_date <- base1 %>%
filter((end_date<start_date))
verif_date1 <- base1 %>%
filter((end_date==start_date))
base1 <- base1 %>%
filter(prix_date!= "2022" | is.na(prix_date))
ggplot(base1, aes(x = start_date)) +
geom_bar(fill = "mediumpurple") +
stat_count(geom = "text", aes(label = ..count..), vjust = -0.3) +
labs(title = "Répartition des projets par année de démarrage",
x = "Année de démarrage",
y = "Nombre de projets") +
theme_minimal()
nb_prj_an <- table(base1$start_date)
top3 <- sort(nb_prj_an, decreasing = TRUE)[1:3]
cat(paste0("Les plus grands nombres de projets démarrés s'observent respectivement en ", paste0(names(top3), " (", top3, ")", collapse = ", "), "."))
## Les plus grands nombres de projets démarrés s'observent respectivement en 2016 (30), 2015 (26), 2017 (23).
mean(table(base1$start_date))
## [1] 9.136364
sd(table(base1$start_date))
## [1] 8.860267
base1 <- base1 %>%
mutate(
start_date = as.numeric(start_date),
start_date2 = cut(
start_date,
breaks = c(1999, 2004, 2009, 2014, 2019, 2024, 2029),
labels = c("[2000-2004]", "[2005-2009]", "[2010-2014]", "[2015-2019]", "[2020-2024]", "[2025-2029]"),
right = TRUE,
include.lowest = TRUE))
ggplot(base1, aes(x = start_date2)) +
geom_bar(fill = "mediumpurple") +
stat_count(geom = "text", aes(label = ..count..), vjust = -0.3) +
labs(title = "Répartition des projets par année de démarrage",
x = "Année de démarrage",
y = "Nombre de projets") +
theme_minimal()
###### Le NA observé s’explique par le projet commencé en 1993.
nb_prj_5ans <- table(base1$start_date2)
top2 <- sort(nb_prj_5ans, decreasing = TRUE)[1:2]
cat(paste0("Les plus grands nombres de projets démarrés sont observés sur les périodes ",
paste0(names(top2), collapse = " et "),
", avec respectivement ",
paste0(top2, collapse = " et "),
" projets."))
## Les plus grands nombres de projets démarrés sont observés sur les périodes [2015-2019] et [2010-2014], avec respectivement 114 et 43 projets.
base1 <- base1 %>%
filter(start_date %in% 2007:2024)
ggplot(base1, aes(x = start_date)) +
geom_bar(fill = "mediumpurple") +
stat_count(geom = "text", aes(label = ..count..), vjust = -0.3) +
labs(title = "Répartition des projets par année de démarrage",
x = "Année de démarrage",
y = "Nombre de projets") +
theme_minimal()
nb_prj_an <- table(base1$start_date)
top3 <- sort(nb_prj_an, decreasing = TRUE)[1:3]
cat(paste0("Les plus grands nombres de projets démarrés s'observent respectivement en ", paste0(names(top3), " (", top3, ")", collapse = ", "), "."))
## Les plus grands nombres de projets démarrés s'observent respectivement en 2016 (30), 2015 (26), 2017 (23).
mean(table(base1$start_date))
## [1] 10.94444
sd(table(base1$start_date))
## [1] 8.828245
ggplot(base1, aes(x = start_date2)) +
geom_bar(fill = "mediumpurple") +
stat_count(geom = "text", aes(label = ..count..), vjust = -0.3) +
labs(title = "Répartition des projets par année de démarrage",
x = "Année de démarrage",
y = "Nombre de projets") +
theme_minimal()
nb_prj_5ans <- table(base1$start_date2)
top2 <- sort(nb_prj_5ans, decreasing = TRUE)[1:2]
cat(paste0("Les plus grands nombres de projets démarrés sont observés sur les périodes ",
paste0(names(top2), collapse = " et "),
", avec respectivement ",
paste0(top2, collapse = " et "),
" projets."))
## Les plus grands nombres de projets démarrés sont observés sur les périodes [2015-2019] et [2010-2014], avec respectivement 114 et 43 projets.
names(base1)
## [1] "ID" "Initiative name"
## [3] "Specify infectious diseases" "Specify chronic diseases"
## [5] "stage" "offline_use"
## [7] "opensource" "opendata"
## [9] "nb_benef" "laureats_0_laureat_mis_en_avant"
## [11] "prix_date" "business_org"
## [13] "country_org" "start_date"
## [15] "end_date" "statut_l"
## [17] "field_1" "field_2"
## [19] "field_3" "field_4"
## [21] "field_5" "field_6"
## [23] "field_other" "theme_1"
## [25] "theme_2" "theme_3"
## [27] "theme_4" "theme_5"
## [29] "theme_6" "theme_7"
## [31] "theme_8" "theme_9"
## [33] "theme_10" "theme_11"
## [35] "theme_12" "theme_13"
## [37] "theme_14" "theme_15"
## [39] "theme_16" "theme_17"
## [41] "theme_18" "theme_other"
## [43] "GBD1_NCD" "GBD1_CMNND"
## [45] "GBD1_Trans" "GBD1_injuries"
## [47] "GBD1_Autres" "target_1"
## [49] "target_2" "target_3"
## [51] "target_4" "target_5"
## [53] "target_6" "target_7"
## [55] "target_8" "target_9"
## [57] "target_other" "o_source_1"
## [59] "o_source_2" "o_source_3"
## [61] "o_source_4" "o_source_5"
## [63] "o_source_6" "o_source_other"
## [65] "objective_1" "objective_2"
## [67] "objective_3" "objective_4"
## [69] "objective_5" "f_source_1"
## [71] "f_source_2" "f_source_3"
## [73] "f_source_4" "f_source_5"
## [75] "f_source_6" "f_source_7"
## [77] "ECO_other" "ECO1"
## [79] "ECO2" "ECO3"
## [81] "ECO4" "ECO5"
## [83] "Burkina Faso" "Côte d'Ivoire"
## [85] "Mali" "Niger"
## [87] "Sénégal" "Sierra Leone"
## [89] "Nigeria" "Cambodge"
## [91] "Népal" "Inde"
## [93] "Cameroun" "Canada"
## [95] "République démocratique du Congo" "États-Unis"
## [97] "Guadeloupe" "Kenya"
## [99] "Martinique" "Soudan"
## [101] "Trinité-et-Tobago" "France"
## [103] "Liban" "Maroc"
## [105] "Togo" "Tunisie"
## [107] "Mozambique" "Bangladesh"
## [109] "Birmanie" "Malaisie"
## [111] "Indonésie" "Ouganda"
## [113] "Afrique du Sud" "Botswana"
## [115] "Malawi" "Zambie"
## [117] "Zimbabwe" "Tanzanie"
## [119] "République du Congo" "Gabon"
## [121] "Libye" "Somalie"
## [123] "Bénin" "Afghanistan"
## [125] "Kirghizistan" "Pakistan"
## [127] "Tadjikistan" "Sri Lanka"
## [129] "Guinée" "Viêt Nam"
## [131] "Laos" "Madagascar"
## [133] "Maurice (pays)" "Rwanda"
## [135] "Éthiopie" "Guatemala"
## [137] "Lesotho" "Algérie"
## [139] "Argentine" "Portugal"
## [141] "République dominicaine" "Arabie saoudite"
## [143] "Namibie" "Royaume-Uni"
## [145] "Liberia" "Chine"
## [147] "Égypte" "Émirats arabes unis"
## [149] "Koweït" "Singapour"
## [151] "Philippines" "Thaïlande"
## [153] "Haïti" "Mauritanie"
## [155] "Tchad" "Burundi"
## [157] "Italie" "Ghana"
## [159] "Mexique" "Mongolie"
## [161] "Djibouti" "Cap-Vert"
## [163] "Gambie" "Guinée-Bissau"
## [165] "Bahreïn" "Iran"
## [167] "Irak" "Jordanie"
## [169] "Papouasie-Nouvelle-Guinée" "Syrie"
## [171] "Ukraine" "Yémen"
## [173] "Soudan du Sud" "Angola"
## [175] "Érythrée" "Guinée équatoriale"
## [177] "République centrafricaine" "Sao Tomé-et-Principe"
## [179] "Belize" "Belgique"
## [181] "Eswatini" "Bolivie"
## [183] "Luxembourg (pays)" "Dominique"
## [185] "imp_area_1" "imp_area_2"
## [187] "imp_area_3" "imp_area_4"
## [189] "nb_imp_area" "multi_area"
## [191] "end_stage" "start_date2"
country <- base1 %>%
pivot_longer(cols = c(83:184),
names_to = "pays",
values_to = "presence") %>%
filter(presence == "Oui")
#Nombre de pays
country %>%
distinct(pays) %>%
nrow()
## [1] 98
count_country <- country %>%
group_by(pays) %>%
summarise(nb_projets = n())
world <- ne_countries(scale = "medium", returnclass = "sf")
world_sel <- world %>%
filter(continent %in% c("Africa", "Asia"))
map_data <- world_sel %>%
left_join(count_country, by = c("name_fr" = "pays"))
ggplot(map_data) +
geom_sf(aes(fill = nb_projets), color = "black") +
scale_fill_distiller(palette = "YlOrRd", direction = 1, na.value = "grey90") +
geom_sf_text(data = map_data %>% filter(!is.na(nb_projets)),
aes(label = name), size = 4.3, color = "black", fontface = "bold") +
labs(title = "Répartition des projets par pays",
fill = "Nombre de projets")
## Warning in st_point_on_surface.sfc(sf::st_zm(x)): st_point_on_surface may not
## give correct results for longitude/latitude data
nb_prj_pays <- table(country$pays)
top5 <- sort(nb_prj_pays, decreasing = TRUE)[1:5]
cat(paste0("Pour les projets renseignés, les pays dans lesquels on observe le plus de projets sont ",
paste0(names(top5), collapse = ", "),
", avec respectivement ",
paste0(top5, collapse = ", "),
" projets."))
## Pour les projets renseignés, les pays dans lesquels on observe le plus de projets sont Nigeria, Inde, Côte d'Ivoire, Mali, Sénégal, avec respectivement 25, 23, 22, 22, 20 projets.
GBD_col <- names(base1)[43:47]
top_gbd <- base1 %>%
pivot_longer(
cols = all_of(GBD_col),
names_to = "GBDS",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(GBDS) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
mutate(GBDS = case_when(
GBDS == "GBD1_NCD" ~ "Maladies non transmissibles",
GBDS == "GBD1_CMNND" ~ "Maladies transmissibles, maternelles, néonatales et nutritionnelles",
GBDS == "GBD1_Trans" ~ "Transversal",
GBDS == "GBD1_injuries" ~ "Blessures",
GBDS == "GBD1_Autres" ~ "Autres",
)) %>%
mutate(
pct = round(nb_oui / 197 * 100, 1),
rang = rank(-nb_oui, ties.method = "min")
) %>%
arrange(desc(nb_oui))
print(top_gbd)
## # A tibble: 5 × 4
## GBDS nb_oui pct rang
## <chr> <int> <dbl> <int>
## 1 Maladies transmissibles, maternelles, néonatales et nutrit… 139 70.6 1
## 2 Transversal 105 53.3 2
## 3 Autres 92 46.7 3
## 4 Maladies non transmissibles 84 42.6 4
## 5 Blessures 1 0.5 5
ggplot(top_gbd, aes(x = reorder(GBDS, nb_oui), y = nb_oui, fill = nb_oui)) +
geom_col() +
geom_text(aes(label = paste0(nb_oui, " (", round(nb_oui/197*100, 2), "%)")),
hjust = -0.1, size = 4) +
coord_flip() +
scale_y_continuous(expand = expansion(mult = c(0, 0.3))) +
scale_fill_gradient(high = "#D73027", low = "#FEE5D9", guide = "none") +
labs(
title = "Répartition des projets par thématique (GBD1)",
x = "Thématiques des projets",
y = "Nombre de projets"
) +
theme_minimal(base_size = 16) +
theme(plot.title = element_text(face = "bold"))
top3_gbd <- top_gbd %>% slice(1:3)
cat(paste0("Les thématiques les plus représentées sont respectivement: ", paste0(top3_gbd$GBDS, " (", top3_gbd$pct, "%)", collapse = ", "), "."))
## Les thématiques les plus représentées sont respectivement: Maladies transmissibles, maternelles, néonatales et nutritionnelles (70.6%), Transversal (53.3%), Autres (46.7%).
theme_res2 <- base1 %>%
pivot_longer(
cols = all_of(GBD_col),
names_to = "GBDS",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(start_date2,GBDS) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
group_by(start_date2) %>%
mutate(GBDS = case_when(
GBDS == "GBD1_NCD" ~ "Maladies non transmissibles",
GBDS == "GBD1_CMNND" ~ "Maladies transmissibles, maternelles, néonatales et nutritionnelles",
GBDS == "GBD1_Trans" ~ "Transversal",
GBDS == "GBD1_M" ~ "Maladies transmissibles, non transmissibles, maternelles, néonatales et nutritionnelles",
GBDS == "GBD1_injuries" ~ "Blessures",
GBDS == "GBD1_Autres" ~ "Autres",
)) %>%
mutate(
total_start_date2 = sum(nb_oui),
pct = round(nb_oui / total_start_date2 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
)
ggplot(theme_res2, aes(x = factor(start_date2), y = pct, fill = GBDS)) +
geom_col(position = "stack") +
geom_text(
aes(label = paste0(pct, "")),
position = position_stack(vjust = 0.5),
size = 5, color = "black", fontface = "bold"
) +
scale_fill_brewer(palette = "Reds", name = "Thématiques GBD1") +
labs(
title = "Répartition relative des thématiques par année de démarrage des projets",
x = "Année de démarrage des projets",
y = "Pourcentage relatif (en %)"
) +
theme_minimal(base_size = 18) +
theme(plot.title = element_text(face = "bold"))
field_col <- names(base1)[17:22]
top_fields <- base1 %>%
pivot_longer(
cols = all_of(field_col),
names_to = "Fields",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(Fields) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
mutate(Fields = recode(Fields,
"field_1" = "Formation des professionnels de santé",
"field_2" = "Télémédecine (diagnostic et consultations à distance)",
"field_3" = "Information, éducation et changement des comportements (IECC)",
"field_4" = "Suivi des patients et de santé",
"field_5" = "Accès financier au soin, micro-assurance",
"field_6" = "Autres"
)) %>%
mutate(
pct = round(nb_oui / 197 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
) %>%
arrange(desc(nb_oui))
print(top_fields)
## # A tibble: 6 × 4
## Fields nb_oui pct rang
## <chr> <int> <dbl> <int>
## 1 Suivi des patients et de santé 114 57.9 1
## 2 Information, éducation et changement des comportements (IE… 107 54.3 2
## 3 Formation des professionnels de santé 89 45.2 3
## 4 Télémédecine (diagnostic et consultations à distance) 79 40.1 4
## 5 Autres 36 18.3 5
## 6 Accès financier au soin, micro-assurance 17 8.63 6
ggplot(top_fields, aes(x = reorder(Fields, nb_oui), y = nb_oui, fill = nb_oui)) +
geom_col() +
geom_text(aes(label = paste0(nb_oui, " (", pct, "%)")),
hjust = -0.1, size = 4) +
coord_flip() +
scale_y_continuous(expand = expansion(mult = c(0, 0.3))) +
scale_fill_gradient(low = "#edf8b1", high = "#225ea8", guide = "none") +
labs(
title = "Répartition des projets par champs d'application",
x = "Champs d'application",
y = "Nombre de projets"
) +
theme_minimal(base_size = 16) +
theme(plot.title = element_text(face = "bold"))
top3_fields <- top_fields %>% slice(1:3)
cat(paste0("Les champs d'application qui ressortent le plus sont:", paste0(top3_fields$Fields, collapse = "; ")),"avec des proportions respectives de", paste0(top3_fields$pct, "%", collapse = ", "), ".")
## Les champs d'application qui ressortent le plus sont:Suivi des patients et de santé; Information, éducation et changement des comportements (IECC); Formation des professionnels de santé avec des proportions respectives de 57.87%, 54.31%, 45.18% .
f_res <- base1 %>%
pivot_longer(
cols = all_of(field_col),
names_to = "Fields",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(start_date2, Fields) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
group_by(start_date2) %>%
mutate(Fields = recode(Fields,
"field_1" = "Formation des professionnels de santé",
"field_2" = "Télémédecine (diagnostic et consultations à distance)",
"field_3" = "Information, éducation et changement des comportements (IECC)",
"field_4" = "Suivi des patients et des données de santé",
"field_5" = "Accès financier au soin, micro-assurance",
"field_6" = "Autres"
)) %>%
mutate(
total_start_date2 = sum(nb_oui),
pct = round(nb_oui / total_start_date2 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
)
ggplot(f_res, aes(x = factor(start_date2), y = pct, fill = Fields)) +
geom_col(position = "stack") +
geom_text(
aes(label = paste0(pct, "")),
position = position_stack(vjust = 0.5),
size = 5, color = "black", fontface = "bold"
) +
scale_fill_brewer(palette = "YlGnBu", name = "Champs d'application") +
labs(
title = "Répartition relative des champs d'application par année de démarrage des projets",
x = "Année de démarrage des projets",
y = "Pourcentage relatif (en %)"
) +
theme_minimal(base_size = 18) +
theme(plot.title = element_text(face = "bold"))
vue_autres_f <- base1 %>%
filter (field_6 == "Oui") %>%
filter (start_date %in% c("2020", "2021", "2022", "2023", "2024")) %>%
select(ID, `Initiative name`, field_6, field_4, field_other)
#Pour autres sur la période [2020,2024], nous avons: accès aux produits médicaux et paramédicaux, gestion des données de santé, surveillance épidémiologique, aide à la décision clinique
business_base <- base1 %>%
group_by(business_org) %>%
mutate(business_org = recode(business_org,
"1" = "Sanitaire (Professionnels et structures de santé)",
"2" = "Industriel (Start-ups, Entreprises, ...)",
"3" = "Organisationnel (Collectivités, ONG, Associations, Fondations, ...)",
"4" = "Académique (Universités, Laboratoires de recherche, ...)"
)) %>%
summarise(nb = n(), .groups = "drop") %>%
mutate(pct = round(nb / 197 * 100, 2))
ggplot(business_base, aes(x = reorder(business_org, nb), y = nb, fill = business_org)) +
geom_col() +
geom_text(aes(label = paste0(nb, " (", pct, "%)")),
hjust = -0.1, size = 4) +
coord_flip() +
scale_y_continuous(expand = expansion(mult = c(0, 0.2))) +
scale_fill_brewer(palette = "Set2", guide = "none") +
labs(
title = "Répartition des projets par secteur des porteurs",
x = "Secteurs des porteurs",
y = "Nombre de projets"
) +
theme_minimal(base_size = 13) +
theme(plot.title = element_text(face = "bold"))
top3_bb <- business_base %>% slice(1:3)
cat(paste0("Avec des proportions respectives de ", paste0(top3_bb$pct, "%", collapse = ", "),", ", "les 3 secteurs des porteurs qui se distinguent le plus sont ", paste0(top3_bb$business_org, collapse = "; ")), ".")
## Avec des proportions respectives de 24.37%, 32.49%, 34.01%, les 3 secteurs des porteurs qui se distinguent le plus sont Sanitaire (Professionnels et structures de santé); Industriel (Start-ups, Entreprises, ...); Organisationnel (Collectivités, ONG, Associations, Fondations, ...) .
business_col <- base1$business_org
business_res <- base1 %>%
group_by(start_date2, business_org) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
group_by(start_date2) %>%
mutate(
business_org = recode(business_org,
"1" = "Sanitaire (Professionnels et structures de santé)",
"2" = "Industriel (Start-ups, Entreprises, ...)",
"3" = "Organisationnel (Collectivités, ONG, Associations, Fondations, ...)",
"4" = "Académique (Universités, Laboratoires de recherche, ...)"
),
total_start_date2 = sum(nb_oui),
pct = round(nb_oui / total_start_date2 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
)
ggplot(business_res, aes(x = factor(start_date2), y = pct, fill = business_org)) +
geom_col(position = "stack") +
geom_text(aes(label = paste0(pct, "")),
position = position_stack(vjust = 0.5),
size = 5, color = "black", fontface = "bold") +
scale_fill_brewer(palette = "Set2") +
labs(
title = "Répartition des secteurs des porteurs par année de démarrage des projets",
x = "Année de démarrage des projets",
y = "Proportion des secteurs des porteurs des projets (en %)",
fill = "Secteurs des porteurs"
) +
theme_minimal(base_size = 18) +
theme(plot.title = element_text(face = "bold"),
axis.text.x = element_text(angle = 45, hjust = 1))
imp_area_col <- names(base1)[185:188]
top_imp_areas <- base1 %>%
pivot_longer(
cols = all_of(imp_area_col),
names_to = "imp_areas",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(imp_areas) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
mutate(imp_areas = recode(imp_areas,
"imp_area_1" = "Internationale (dans plusieurs pays)",
"imp_area_2" = "Nationale (dans un seul pays)",
"imp_area_3" = "Provinciale/Régionale (dans une région d'un seul pays)",
"imp_area_4" = "Locale (dans une seule ville/village/localité)"
)) %>%
mutate(
pct = round(nb_oui / 197 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
) %>%
arrange(desc(nb_oui))
print(top_imp_areas)
## # A tibble: 4 × 4
## imp_areas nb_oui pct rang
## <chr> <int> <dbl> <int>
## 1 Nationale (dans un seul pays) 92 46.7 1
## 2 Internationale (dans plusieurs pays) 65 33.0 2
## 3 Provinciale/Régionale (dans une région d'un seul pays) 29 14.7 3
## 4 Locale (dans une seule ville/village/localité) 11 5.58 4
ggplot(top_imp_areas, aes(x = reorder(imp_areas, nb_oui), y = nb_oui, fill = nb_oui)) +
geom_col() +
geom_text(aes(label = paste0(nb_oui, " (", pct, "%)")),
hjust = -0.1, size = 4) +
coord_flip() +
scale_y_continuous(expand = expansion(mult = c(0, 0.3))) +
scale_fill_gradient(low = "#EDF8E9", high = "#238B45", guide = "none") +
labs(
title = "Répartition des projets par échelle d'implémentation ",
x = "Echelles d'implémentation",
y = "Nombre de projets"
) +
theme_minimal(base_size = 16) +
theme(plot.title = element_text(face = "bold"))
top_ia <- top_imp_areas %>% slice(1:2)
cat(paste0( paste0(top_ia$imp_areas, collapse = " et "), " avec respectivement ", paste0(top_ia$pct, "%", collapse = ", "),", ", "sont les échelles d'implémentation les plus représentées."))
## Nationale (dans un seul pays) et Internationale (dans plusieurs pays) avec respectivement 46.7%, 32.99%, sont les échelles d'implémentation les plus représentées.
i_res <- base1 %>%
pivot_longer(
cols = all_of(imp_area_col),
names_to = "imp_areas",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(start_date2, imp_areas) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
group_by(start_date2) %>%
mutate(imp_areas = recode(imp_areas,
"imp_area_1" = "Internationale (dans plusieurs pays)",
"imp_area_2" = "Nationale (dans un seul pays)",
"imp_area_3" = "Provinciale/Régionale (dans une région d'un seul pays)",
"imp_area_4" = "Locale (dans une seule ville/village/localité)"
)) %>%
mutate(
total_start_date2 = sum(nb_oui),
pct = round(nb_oui / total_start_date2 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
)
ggplot(i_res, aes(x = start_date2, y = pct, fill = imp_areas)) +
geom_col(position = "stack") +
geom_text(aes(label = paste0(pct, "")),
position = position_stack(vjust = 0.5),
size = 5, color = "black", fontface = "bold") +
scale_fill_brewer(palette = "Greens") +
labs(
title = "Répartition relative des échelles d'implémentation par année de démarrage des projets",
x = "Année de démarrage des projets",
y = "Pourcentage relatif (en %)",
fill = "Echelles d'implémentation"
) +
theme_minimal(base_size = 18) +
theme(plot.title = element_text(face = "bold"),
axis.text.x = element_text(angle = 45, hjust = 1))
o_source_col <- names(base1)[58:63]
top_o_source <- base1 %>%
pivot_longer(
cols = all_of(o_source_col),
names_to = "O_source",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(O_source) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
mutate(O_source = recode(O_source,
"o_source_1" = "Public (Subvention, Appel à projets/Appel d'offre,...)",
"o_source_2" = "Privé (Investisseurs privés, Crowdfunding, Mécénat, ...)",
"o_source_3" = "ONG",
"o_source_4" = "Agence gouvernementale",
"o_source_5" = "Agence intergouvernementale/internationale",
"o_source_6" = " Autres"
)) %>%
mutate(
pct = round(nb_oui / 197 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
) %>%
arrange(desc(nb_oui))
print(top_o_source)
## # A tibble: 6 × 4
## O_source nb_oui pct rang
## <chr> <int> <dbl> <int>
## 1 "Privé (Investisseurs privés, Crowdfunding, Mécénat, ...)" 113 57.4 1
## 2 "Public (Subvention, Appel à projets/Appel d'offre,...)" 90 45.7 2
## 3 "Agence gouvernementale" 56 28.4 3
## 4 "ONG" 55 27.9 4
## 5 "Agence intergouvernementale/internationale" 40 20.3 5
## 6 " Autres" 36 18.3 6
ggplot(top_o_source, aes(x = reorder(O_source, nb_oui), y = nb_oui, fill = nb_oui)) +
geom_col() +
geom_text(aes(label = paste0(nb_oui, " (", pct, "%)")),
hjust = -0.1, size = 4) +
coord_flip() +
scale_y_continuous(expand = expansion(mult = c(0, 0.3))) +
scale_fill_gradient(low = "linen", high = "saddlebrown", guide = "none") +
labs(
title = "Répartition de l'ensemble des projets par origine des financements",
x = "Origines des financements",
y = "Nombre de projets"
) +
theme_minimal(base_size = 16) +
theme(plot.title = element_text(face = "bold"))
ECO_col <- names(base1)[78:82]
top_ECO <- base1 %>%
pivot_longer(
cols = all_of(ECO_col),
names_to = "ECOS",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(ECOS) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
mutate(ECOS = recode(ECOS,
"ECO1" = "Revenus générés par les utilisateurs",
"ECO2" = "Subventions et dons",
"ECO3" = "Publicités",
"ECO4" = "Vente d'analyse de données",
"ECO5" = "Autres"
)) %>%
mutate(
pct = round(nb_oui / 197 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
) %>%
arrange(desc(nb_oui))
print(top_ECO)
## # A tibble: 5 × 4
## ECOS nb_oui pct rang
## <chr> <int> <dbl> <int>
## 1 Subventions et dons 125 63.4 1
## 2 Revenus générés par les utilisateurs 93 47.2 2
## 3 Autres 65 33.0 3
## 4 Publicités 29 14.7 4
## 5 Vente d'analyse de données 23 11.7 5
ggplot(top_ECO, aes(x = reorder(ECOS, nb_oui), y = nb_oui, fill = nb_oui)) +
geom_col() +
geom_text(aes(label = paste0(nb_oui, " (", pct, "%)")),
hjust = -0.1, size = 4) +
coord_flip() +
scale_y_continuous(expand = expansion(mult = c(0, 0.3))) +
scale_fill_gradient(low = "lightyellow", high = "darkorange", guide = "none") +
labs(
title = "Répartition de l'ensemble des projets par source de financement",
x = "Sources de financement",
y = "Nombre de projets"
) +
theme_minimal(base_size = 16) +
theme(plot.title = element_text(face = "bold"))
base1 %>%
count(stage) %>%
mutate(stage = recode(stage,
"1" = "Projet pilote",
"2" = "Projet en routine / en exploitation"
)) %>%
mutate(pct = n / 197 * 100) %>%
ggplot(aes(x = "", y = pct, fill = stage)) +
geom_bar(stat = "identity", position = "stack") +
geom_text(aes(label = paste0(n, " (", round(pct), "%)"), fontface = "bold"),
position = position_stack(vjust = 0.5)) +
coord_polar("y") +
labs(title = "Répartition des projets par stade d'avancement",
fill = "Stades d'avancement") +
theme_void()+
theme(plot.title = element_text(face = "bold"))
top_stage <- round(prop.table(table(base1$stage))*100,0)
cat(paste0("Le stade routine/en exploitation représente ", unname(top_stage[2]),"%, contre ", unname(top_stage[1]), "% pour le stade pilote."))
## Le stade routine/en exploitation représente 63%, contre 37% pour le stade pilote.
base1 %>%
count(start_date2, stage) %>%
group_by(start_date2) %>%
mutate(stage = recode(stage,
"1" = "Projet pilote",
"2" = "Projet en routine / en exploitation"
)) %>%
mutate(pct = n / sum(n) * 100) %>%
ggplot(aes(x = factor(start_date2), y = pct, fill = stage)) +
geom_bar(stat = "identity", position = "stack") +
geom_text(aes(label = paste0(round(pct), ""),fontface = "bold"),
position = position_stack(vjust = 0.5)) +
labs(title = "Répartition des stades d'avancement par année de démarrage des projets",
x = "Année de démarrage des projets", y = "Pourcentage (en %)", fill = "Stades d'avancement") +
theme_minimal()+
theme(plot.title = element_text(face = "bold"))
base1 %>%
count(end_stage) %>%
mutate(pct = n / 197 * 100) %>%
ggplot(aes(x = "", y = pct, fill = end_stage)) +
geom_bar(stat = "identity", position = "stack") +
geom_text(aes(label = paste0(n, " (", round(pct), "%)"),
fontface = "bold"),
position = position_stack(vjust = 0.5)) +
coord_polar("y") +
scale_fill_manual(values = c("clôturé" = "#7C3AED", "non clôturé" = "#F9A8D4")) +
labs(title = "Répartition des projets selon leur satut de clôture",
fill = "Stade des projets") +
theme_void() +
theme(plot.title = element_text(face = "bold"))
top_end_stage <- round(prop.table(table(base1$end_stage))*100,0)
cat(paste0("A ce jour, les projets clôturés représentent ", unname(top_end_stage[1]),"%, contre ", unname(top_end_stage[2]), "% pour les projets non clôturés."))
## A ce jour, les projets clôturés représentent 25%, contre 75% pour les projets non clôturés.
ECO_bus <- base1 %>%
select(business_org, ECO1, ECO2, ECO3, ECO4, ECO5) %>%
mutate(business_org = recode(business_org,
"1" = "Sanitaire",
"2" = "Industriel",
"3" = "Organisationnel",
"4" = "Académique"
)) %>%
pivot_longer(cols = starts_with("ECO"),
names_to = "ECOS",
values_to = "valeur") %>%
filter(valeur == "Oui") %>%
mutate(ECOS = recode(ECOS,
"ECO1" = "Revenus générés par les utilisateurs",
"ECO2" = "Subventions et dons",
"ECO3" = "Publicités",
"ECO4" = "Vente d'analyse de données",
"ECO5" = " Autres"
)) %>%
group_by(business_org, ECOS) %>%
summarise(nb = n(), .groups = "drop") %>%
group_by(business_org) %>%
mutate(
total = sum(nb),
pct = round(nb / total * 100, 1)
)
ggplot(ECO_bus, aes(x = business_org, y = nb, fill = ECOS)) +
geom_col(position = "fill") +
geom_text(aes(label = paste0(pct, "")),
position = position_fill(vjust = 0.5),
size = 2.5, fontface = "bold") +
scale_y_continuous(labels = scales::percent) +
scale_fill_brewer(palette = "Set2") +
labs(
title = "Répartition de sources de financement en fonction du secteur des porteurs",
x = "Secteurs des porteurs",
y = "Proportion (en %)",
fill = "Sources de financement"
) +
theme_minimal(base_size = 12) +
theme(
plot.title = element_text(face = "bold"),
axis.text.x = element_text(angle = 45, hjust = 1)
)
vue_autres_eco <- base1 %>%
filter(ECO5== "Oui") %>%
select(ID, `Initiative name`, ECO2, ECO5, ECO_other )
o_source_bus <- base1 %>%
select(business_org, o_source_1, o_source_2, o_source_3, o_source_5, o_source_6) %>%
mutate(business_org = recode(business_org,
"1" = "Sanitaire (Professionnels et structures de santé)",
"2" = "Industriel (Start-ups, Entreprises, ...)",
"3" = "Organisationnel (Collectivités, ONG, Associations, Fondations, ...)",
"4" = "Académique (Universités, Laboratoires de recherche, ...)"
)) %>%
pivot_longer(cols = starts_with("o_source_"),
names_to = "O_source",
values_to = "valeur") %>%
filter(valeur == "Oui") %>%
mutate(O_source = recode(O_source,
"o_source_1" = "Public (Subvention, Appel à projets/Appel d'offre,...)",
"o_source_2" = "Privé (Investisseurs privés, Crowdfunding, Mécénat, ...)",
"o_source_3" = "ONG",
"o_source_4" = "Agence gouvernementale",
"o_source_5" = "Agence intergouvernementale/internationale",
"o_source_6" = "Autres"
)) %>%
group_by(business_org, O_source) %>%
summarise(nb = n(), .groups = "drop") %>%
group_by(business_org) %>%
mutate(
total = sum(nb),
pct = round(nb / total * 100, 1)
)
ggplot(o_source_bus, aes(x = business_org, y = nb, fill = O_source)) +
geom_col(position = "fill") +
geom_text(aes(label = paste0(pct, "")),
position = position_fill(vjust = 0.5),
size = 3.5, fontface = "bold") +
scale_y_continuous(labels = scales::percent) +
scale_fill_brewer(palette = "Set2") +
labs(
title = "Répartition des origines des financements en fonction du secteur des porteurs",
x = "Secteurs des porteurs",
y = "Proportion (en %)",
fill = "Origines des financements"
) +
theme_minimal(base_size = 14) +
theme(
plot.title = element_text(face = "bold"),
axis.text.x = element_text(angle = 45, hjust = 1)
)
theme_bus <- base1 %>%
select(GBD1_NCD, GBD1_CMNND, GBD1_Trans, GBD1_injuries, GBD1_injuries, GBD1_Autres, business_org) %>%
mutate(business_org = recode(business_org,
"1" = "Sanitaire (Professionnels et structures de santé)",
"2" = "Industriel (Start-ups, Entreprises, ...)",
"3" = "Organisationnel (Collectivités, ONG, Associations, Fondations, ...)",
"4" = "Académique (Universités, Laboratoires de recherche, ...)"
)) %>%
pivot_longer(cols = starts_with("GBD1_"),
names_to = "GBDS",
values_to = "valeur" ) %>%
filter(valeur == "Oui") %>%
mutate(GBDS = case_when(
GBDS == "GBD1_NCD" ~ "Maladies non transmissibles",
GBDS == "GBD1_CMNND" ~ "Maladies transmissibles, maternelles, néonatales et nutritionnelles",
GBDS == "GBD1_Trans" ~ "Transversal",
GBDS == "GBD1_injuries" ~ "Blessures",
GBDS == "GBD1_Autres" ~ "Autres")) %>%
group_by(business_org, GBDS) %>%
summarise(nb = n(), .groups = "drop") %>%
group_by(business_org) %>%
mutate(
total = sum(nb),
pct = round(nb / total * 100, 1))
ggplot(theme_bus, aes(x = business_org, y = nb, fill = GBDS)) +
geom_col(position = "fill") +
geom_text(aes(label = paste0(pct, "")),
position = position_fill(vjust = 0.5),
size = 3.5, fontface = "bold") +
scale_y_continuous(labels = scales::percent) +
scale_fill_brewer(palette = "Set2") +
labs(
title = "Répartition des thématiques en fonction du secteur des porteurs",
x = "Secteurs des porteurs",
y = "Proportion (en %)",
fill = "Thématiques"
) +
theme_minimal(base_size = 14) +
theme(
plot.title = element_text(face = "bold"),
axis.text.x = element_text(angle = 45, hjust = 1)
)
field_theme <- base1 %>%
select(GBD1_NCD, GBD1_CMNND, GBD1_Trans, GBD1_injuries, GBD1_Autres, field_1, field_2, field_3, field_4, field_5, field_6 ) %>%
pivot_longer(cols = starts_with("field_"),
names_to = "Fields",
values_to = "valeur" ) %>%
filter(valeur == "Oui") %>%
mutate(Fields = recode(Fields,
"field_1" = "Formation des professionnels de santé",
"field_2" = "Télémédecine (diagnostic et consultations à distance)",
"field_3" = "Information, éducation et changement des comportements (IECC)",
"field_4" = "Suivi des patients et des données de santé",
"field_5" = "Accès financier au soin, micro-assurance",
"field_6" = "Autres")) %>%
pivot_longer(cols = starts_with("GBD1_"),
names_to = "GBDS",
values_to = "presence" ) %>%
filter(presence == "Oui") %>%
mutate(GBDS = case_when(
GBDS == "GBD1_NCD" ~ "Maladies non transmissibles",
GBDS == "GBD1_CMNND" ~ "Maladies transmissibles, maternelles, néonatales et nutritionnelles",
GBDS == "GBD1_Trans" ~ "Transversal",
GBDS == "GBD1_injuries" ~ "Blessures",
GBDS == "GBD1_Autres" ~ "Autres")) %>%
group_by(Fields, GBDS) %>%
summarise(nb = n(), .groups = "drop") %>%
group_by(GBDS) %>%
mutate(
total = sum(nb),
pct = round(nb / total * 100, 1))
ggplot(field_theme, aes(x = GBDS, y = nb, fill = Fields)) +
geom_col(position = "fill") +
geom_text(aes(label = paste0(pct, "")),
position = position_fill(vjust = 0.5),
size = 3.5, fontface = "bold") +
scale_y_continuous(labels = scales::percent) +
scale_fill_brewer(palette = "Set2") +
labs(
title = "Répartition des champs d'application en fonction des thématiques",
x = "Thématiques",
y = "Proportion (en %)",
fill = "Champs d'application"
) +
theme_minimal(base_size = 14) +
theme(
plot.title = element_text(face = "bold"),
axis.text.x = element_text(angle = 45, hjust = 1))
matrice <- read_excel("C:/Users/monrenike.agossou/OneDrive - Fondation PIERRE FABRE/Stage/Copie de Matrice de correspondance pays.xlsx")
## New names:
## • `Verif WB/Pays` -> `Verif WB/Pays...10`
## • `Verif WB/Pays` -> `Verif WB/Pays...11`
base_country <- base1 %>%
pivot_longer(cols = c(80:176),
names_to = "country",
values_to = "valeur") %>%
filter(valeur == "Oui")
base_country <- base1 %>%
pivot_longer(cols = c(80:176),
names_to = "country_fr",
values_to = "valeur") %>%
filter(valeur == "Oui") %>%
mutate(iso2 = codes_pays[match(country_fr, noms_pays)])
base1_matrice <- merge(base_country, matrice , by.x = "iso2", by.y = "Code ISO 2", all.x= TRUE)
WB <- base1_matrice %>%
filter(! is.na(Continent)) %>% # je n'ai donc sélectionné que les pays africains et asiatiques
select(`Initiative name`,Zone_WB, GBD1_NCD, GBD1_CMNND, GBD1_Trans, GBD1_injuries, GBD1_Autres, LangueFR) %>%
pivot_longer(cols = starts_with("GBD1_"),
names_to = "GBDS",
values_to = "valeur"
) %>%
filter(valeur == "Oui") %>%
mutate(GBDS = case_when(
GBDS == "GBD1_NCD" ~ "Maladies non transmissibles",
GBDS == "GBD1_CMNND" ~ "Maladies transmissibles, maternelles, néonatales et nutritionnelles",
GBDS == "GBD1_Trans" ~ "Transversal",
GBDS == "GBD1_injuries" ~ "Blessures",
GBDS == "GBD1_Autres" ~ "Autres",
)) %>%
mutate(Zone_WB = recode(Zone_WB,
"East Asia & Pacific" = "Asie de l'Est et Pacifique",
"Sub-Saharan Africa" = "Afrique subsaharienne",
"South Asia" = "Asie du Sud",
"Middle East & North Africa" = "Moyen-Orient et Afrique du Nord",
"Europe & Central Asia" ="Asie Centrale et Europe"
)) %>%
group_by(GBDS, Zone_WB) %>%
summarise(nb = n(), .groups = "drop") %>%
group_by(Zone_WB) %>%
mutate(
total = sum(nb),
pct = round(nb / total * 100, 1)
)
ggplot(WB, aes(x = Zone_WB, y = nb, fill = GBDS)) +
geom_col(position = "fill") +
geom_text(aes(label = ifelse(pct > 5, paste0(pct, ""), "")),
position = position_fill(vjust = 0.5),
size = 3.5, fontface = "bold") +
scale_y_continuous(labels = scales::percent) +
scale_fill_brewer(palette = "Set2") +
labs(
title = "Répartition des thématiques des projets en fonction des régions de la Banque mondiale",
x = "Régions de la Banque mondiale",
y = "Proportion (en %)",
fill = "Thématiques des projets"
) +
theme_minimal(base_size = 14) +
theme(
plot.title = element_text(face = "bold"),
axis.text.x = element_text(angle = 45, hjust = 1)
)
WB2 <- base1_matrice %>%
filter(Zone_WB== "Sub-Saharan Africa") %>%
select(Zone_WB, GBD1_NCD, GBD1_CMNND, GBD1_Trans, GBD1_injuries, GBD1_Autres, LangueFR, iso2) %>%
pivot_longer(cols = starts_with("GBD1_"),
names_to = "GBDS",
values_to = "valeur"
) %>%
filter(valeur == "Oui") %>%
mutate(GBDS = case_when(
GBDS == "GBD1_NCD" ~ "Maladies non transmissibles",
GBDS == "GBD1_CMNND" ~ "Maladies transmissibles, maternelles, néonatales et nutritionnelles",
GBDS == "GBD1_Trans" ~ "Transversal",
GBDS == "GBD1_injuries" ~ "Blessures",
GBDS == "GBD1_Autres" ~ "Autres",
)) %>%
mutate(Sub_Afro = case_when (
iso2 %in% c("BJ", "BF", "BI", "CM", "CF", "TD", "KM", "CG", "CD", "CI",
"DJ", "GA", "GN", "MG", "ML", "MR", "NE", "RW", "SN", "TG") ~ "Afrique subsaharienne francophone",
iso2 %in% c("BW", "ER", "SZ", "GM", "GH", "KE", "LS", "LR", "MW", "NA", "NG", "SC", "SL", "SO", "ZA", "SS", "SD", "TZ", "UG", "ZM", "ZW", "ET", "MU") ~ "Afrique subsaharienne anglophone",
iso2 %in% c("AO", "CV", "GW", "MZ", "ST") ~ "Afrique subsaharienne lusophone",
iso2 == "GQ" ~ "Afrique subsaharienne Hispanophone"
)) %>%
group_by(GBDS, Sub_Afro) %>%
summarise(nb = n(), .groups = "drop") %>%
group_by(Sub_Afro) %>%
mutate(
total = sum(nb),
pct = round(nb / total * 100, 1)
)
ggplot(WB2, aes(x = Sub_Afro, y = nb, fill = GBDS)) +
geom_col(position = "fill") +
geom_text(aes(label = paste0(pct, "")),
position = position_fill(vjust = 0.5),
size = 4, fontface = "bold") +
scale_y_continuous(labels = scales::percent) +
scale_fill_brewer(palette = "Set2") +
labs(
title = "Répartition des thématiques des projets en fonction des régions de l'Afrique subsaharienne",
x = "Régions de l'Afrique subsaharienne",
y = "Proportion (en %)",
fill = "Thématiques des projets"
) +
theme_minimal(base_size = 14) +
theme(
plot.title = element_text(face = "bold"),
axis.text.x = element_text(angle = 45, hjust = 1)
)
base2 <- base1 %>%
filter(statut_l=="lauréat")
base2 <- base2 %>%
filter(start_date %in% 2010:2024)
ggplot(base2, aes(x = start_date)) +
geom_bar(fill = "mediumpurple") +
stat_count(geom = "text", aes(label = ..count..), vjust = -0.3) +
labs(title = "Répartition des projets lauréats par année de démarrage",
x = "Année de démarrage",
y = "Nombre de projets") +
theme_minimal()
nb2_prj_an <- table(base2$start_date)
top3 <- sort(nb2_prj_an, decreasing = TRUE)[1:3]
cat(paste0("Les plus grands nombres de projets lauréats démarrés s'observent respectivement en ", paste0(names(top3), " (", top3, ")", collapse = ", "), "."))
## Les plus grands nombres de projets lauréats démarrés s'observent respectivement en 2013 (7), 2016 (5), 2014 (4).
base2 <- base2 %>%
mutate(
start_date = as.numeric(start_date),
start_date2 = cut(
start_date,
breaks = c(1999, 2004, 2009, 2014, 2019, 2024, 2029),
labels = c("[2000-2004]", "[2005-2009]", "[2010-2014]", "[2015-2019]", "[2020-2024]", "[2025-2029]"),
right = TRUE,
include.lowest = TRUE))
ggplot(base2, aes(x = start_date2)) +
geom_bar(fill = "mediumpurple") +
stat_count(geom = "text", aes(label = ..count..), vjust = -0.3) +
labs(title = "Répartition des projets lauréats par année de démarrage",
x = "Année de démarrage",
y = "Nombre de projets") +
theme_minimal()
nb2_prj_5ans <- table(base2$start_date2)
top2 <- sort(nb2_prj_5ans, decreasing = TRUE)[1:2]
cat(paste0("Les plus grands nombres de projets lauréats démarrés sont observés sur les périodes ",
paste0(names(top2), collapse = " et "),
", avec respectivement ",
paste0(top2, collapse = " et "),
" projets."))
## Les plus grands nombres de projets lauréats démarrés sont observés sur les périodes [2015-2019] et [2010-2014], avec respectivement 17 et 15 projets.
mean(table(base2$start_date))
## [1] 3.153846
sd(table(base2$start_date))
## [1] 1.724633
country2 <- base2 %>%
pivot_longer(cols = c(83:184),
names_to = "pays",
values_to = "presence") %>%
filter(presence == "Oui")
#Nombre de pays
country2 %>%
distinct(pays) %>%
nrow()
## [1] 58
count_country2 <- country2 %>%
group_by(pays) %>%
summarise(nb_projets2 = n())
world2 <- ne_countries(scale = "medium", returnclass = "sf")
world_sel2 <- world2 %>%
filter(continent %in% c("Africa", "Asia"))
map_data2 <- world_sel2 %>%
left_join(count_country2, by = c("name_fr" = "pays"))
ggplot(map_data2) +
geom_sf(aes(fill = nb_projets2), color = "black") +
scale_fill_distiller(palette = "YlOrRd", direction = 1, na.value = "grey90") +
geom_sf_text(data = map_data2 %>% filter(!is.na(nb_projets2)),
aes(label = name), size = 4.3, color = "black", fontface = "bold") +
labs(title = "Répartition des projets par pays",
fill = "Nombre de projets")
## Warning in st_point_on_surface.sfc(sf::st_zm(x)): st_point_on_surface may not
## give correct results for longitude/latitude data
nb2_prj_pays <- table(country2$pays)
top5 <- sort(nb2_prj_pays, decreasing = TRUE)[1:5]
cat(paste0("Les pays dans lesquels on observe le plus de projets lauréats sont ",
paste0(names(top5), collapse = ", "),
", avec respectivement ",
paste0(top5, collapse = ", "),
" projets."))
## Les pays dans lesquels on observe le plus de projets lauréats sont Inde, Sénégal, Éthiopie, Ghana, Afrique du Sud, avec respectivement 10, 6, 5, 5, 4 projets.
top_gbd2 <- base2 %>%
pivot_longer(
cols = all_of(GBD_col),
names_to = "GBDS",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(GBDS) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
mutate(GBDS = case_when(
GBDS == "GBD1_NCD" ~ "Maladies non transmissibles",
GBDS == "GBD1_CMNND" ~ "Maladies transmissibles, maternelles, néonatales et nutritionnelles",
GBDS == "GBD1_Trans" ~ "Transversal",
GBDS == "GBD1_injuries" ~ "Blessures",
GBDS == "GBD1_Autres" ~ "Autres",
)) %>%
mutate(
pct = round(nb_oui / 41 * 100, 1),
rang = rank(-nb_oui, ties.method = "min")
) %>%
arrange(desc(nb_oui))
print(top_gbd2)
## # A tibble: 5 × 4
## GBDS nb_oui pct rang
## <chr> <int> <dbl> <int>
## 1 Maladies transmissibles, maternelles, néonatales et nutrit… 31 75.6 1
## 2 Autres 21 51.2 2
## 3 Transversal 17 41.5 3
## 4 Maladies non transmissibles 15 36.6 4
## 5 Blessures 1 2.4 5
ggplot(top_gbd2, aes(x = reorder(GBDS, nb_oui), y = nb_oui, fill = nb_oui)) +
geom_col() +
geom_text(aes(label = paste0(nb_oui, " (", round(nb_oui/41*100, 2), "%)")),
hjust = -0.1, size = 4) +
coord_flip() +
scale_y_continuous(expand = expansion(mult = c(0, 0.3))) +
scale_fill_gradient(high = "#D73027", low = "#FEE5D9", guide = "none") +
labs(
title = "Répartition des projets lauréats par thématique (GBD1)",
x = "Thématiques des projets",
y = "Nombre de projets"
) +
theme_minimal(base_size = 16) +
theme(plot.title = element_text(face = "bold"))
top3_gbd2 <- top_gbd2 %>% slice(1:3)
cat(paste0("Les thématiques les plus représentées sont respectivement: ", paste0(top3_gbd2$GBDS, " (", top3_gbd2$pct, "%)", collapse = ", "), "."))
## Les thématiques les plus représentées sont respectivement: Maladies transmissibles, maternelles, néonatales et nutritionnelles (75.6%), Autres (51.2%), Transversal (41.5%).
theme_res2 <- base2 %>%
pivot_longer(
cols = all_of(GBD_col),
names_to = "GBDS",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(start_date2,GBDS) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
group_by(start_date2) %>%
mutate(GBDS = case_when(
GBDS == "GBD1_NCD" ~ "Maladies non transmissibles",
GBDS == "GBD1_CMNND" ~ "Maladies transmissibles, maternelles, néonatales et nutritionnelles",
GBDS == "GBD1_Trans" ~ "Transversal",
GBDS == "GBD1_M" ~ "Maladies transmissibles, non transmissibles, maternelles, néonatales et nutritionnelles",
GBDS == "GBD1_injuries" ~ "Blessures",
GBDS == "GBD1_Autres" ~ "Autres",
)) %>%
mutate(
total_start_date2 = sum(nb_oui),
pct = round(nb_oui / total_start_date2 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
)
ggplot(theme_res2, aes(x = factor(start_date2), y = pct, fill = GBDS)) +
geom_col(position = "stack") +
geom_text(
aes(label = paste0(pct, "")),
position = position_stack(vjust = 0.5),
size = 5, color = "black", fontface = "bold"
) +
scale_fill_brewer(palette = "Reds", name = "Thématiques GBD1") +
labs(
title = "Répartition relative des thématiques par année de démarrage des projets",
x = "Année de démarrage des projets",
y = "Pourcentage relatif (en %)"
) +
theme_minimal(base_size = 18) +
theme(plot.title = element_text(face = "bold"))
field_col2 <- names(base2)[17:22]
top_fields2 <- base2 %>%
pivot_longer(
cols = all_of(field_col2),
names_to = "Fields",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(Fields) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
mutate(Fields = recode(Fields,
"field_1" = "Formation des professionnels de santé",
"field_2" = "Télémédecine (diagnostic et consultations à distance)",
"field_3" = "Information, éducation et changement des comportements (IECC)",
"field_4" = "Suivi des patients et des données de santé",
"field_5" = "Accès financier au soin, micro-assurance",
"field_6" = "Autres"
)) %>%
mutate(
pct = round(nb_oui / 41 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
) %>%
arrange(desc(nb_oui))
print(top_fields2)
## # A tibble: 6 × 4
## Fields nb_oui pct rang
## <chr> <int> <dbl> <int>
## 1 Suivi des patients et des données de santé 27 65.8 1
## 2 Information, éducation et changement des comportements (IE… 26 63.4 2
## 3 Formation des professionnels de santé 18 43.9 3
## 4 Télémédecine (diagnostic et consultations à distance) 11 26.8 4
## 5 Autres 9 22.0 5
## 6 Accès financier au soin, micro-assurance 5 12.2 6
ggplot(top_fields2, aes(x = reorder(Fields, nb_oui), y = nb_oui, fill = nb_oui)) +
geom_col() +
geom_text(aes(label = paste0(nb_oui, " (", pct, "%)")),
hjust = -0.1, size = 4) +
coord_flip() +
scale_y_continuous(expand = expansion(mult = c(0, 0.3))) +
scale_fill_gradient(low = "#C6DBEF", high = "#2171B5", guide = "none") +
labs(
title = "Répartition des projets lauréats par champ d'application",
x = "Champs d'application",
y = "Nombre de projets"
) +
theme_minimal(base_size = 16) +
theme(plot.title = element_text(face = "bold"))
top3_fields2 <- top_fields2 %>% slice(1:3)
cat(paste0("Les champs d'application qui ressortent le plus pour les projets lauréats sont: ", paste0(top3_fields2$Fields, collapse = "; ")),"avec des proportions respectives de", paste0(top3_fields2$pct, "%", collapse = ", "), ".")
## Les champs d'application qui ressortent le plus pour les projets lauréats sont: Suivi des patients et des données de santé; Information, éducation et changement des comportements (IECC); Formation des professionnels de santé avec des proportions respectives de 65.85%, 63.41%, 43.9% .
f_res2 <- base2 %>%
pivot_longer(
cols = all_of(field_col2),
names_to = "Fields",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(start_date2, Fields) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
group_by(start_date2) %>%
mutate(Fields = recode(Fields,
"field_1" = "Formation des professionnels de santé",
"field_2" = "Télémédecine (diagnostic et consultations à distance)",
"field_3" = "Information, éducation et changement des comportements (IECC)",
"field_4" = "Suivi des patients et des données de santé",
"field_5" = "Accès financier au soin, micro-assurance",
"field_6" = "Autres"
)) %>%
mutate(
total_start_date2 = sum(nb_oui),
pct = round(nb_oui / total_start_date2 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
)
ggplot(f_res2, aes(x = factor(start_date2), y = pct, fill = Fields)) +
geom_col(position = "stack") +
geom_text(
aes(label = paste0(pct, "")),
position = position_stack(vjust = 0.5),
size = 5, color = "black", fontface = "bold"
) +
scale_fill_brewer(palette = "YlGnBu", name = "Champs d'application") +
labs(
title = "Répartition relative des champs d'application par année de démarrage des projets",
x = "Année de démarrage des projets lauréats",
y = "Pourcentage relatif (en %)"
) +
theme_minimal(base_size = 18) +
theme(plot.title = element_text(face = "bold"))
vue_autres_f2 <- base2 %>%
filter (field_6 == "Oui") %>%
filter (start_date %in% c("2020", "2021", "2022", "2023", "2024")) %>%
select(ID, `Initiative name`, field_6, field_4, field_other)
#Pour autres sur la période [2020,2024], nous avons: gestion des données de santé, surveillance épidémiologique
business_base2 <- base2 %>%
group_by(business_org) %>%
mutate(business_org = recode(business_org,
"1" = "Sanitaire (Professionnels et structures de santé)",
"2" = "Industriel (Start-ups, Entreprises, ...)",
"3" = "Organisationnel (Collectivités, ONG, Associations, Fondations, ...)",
"4" = "Académique (Universités, Laboratoires de recherche, ...)"
)) %>%
summarise(nb = n(), .groups = "drop") %>%
mutate(pct = round(nb / 41 * 100, 2))
ggplot(business_base2, aes(x = reorder(business_org, nb), y = nb, fill = business_org)) +
geom_col() +
geom_text(aes(label = paste0(nb, " (", pct, "%)")),
hjust = -0.1, size = 4) +
coord_flip() +
scale_y_continuous(expand = expansion(mult = c(0, 0.2))) +
scale_fill_brewer(palette = "Set2", guide = "none") +
labs(
title = "Répartition des projets lauréats par secteur des porteurs",
x = "Secteurs des porteurs",
y = "Nombre de projets"
) +
theme_minimal(base_size = 13) +
theme(plot.title = element_text(face = "bold"))
top_bb <- business_base2 %>% slice(1:3)
cat(paste0("Avec des proportions respectives de ", paste0(top_bb$pct, "%", collapse = ", "),", ", "les 3 secteurs des porteurs qui ressortent le plus pour les projets lauréats sont ", paste0(top_bb$business_org, collapse = "; ")), ".")
## Avec des proportions respectives de 12.2%, 41.46%, 31.71%, les 3 secteurs des porteurs qui ressortent le plus pour les projets lauréats sont Sanitaire (Professionnels et structures de santé); Industriel (Start-ups, Entreprises, ...); Organisationnel (Collectivités, ONG, Associations, Fondations, ...) .
business_res2 <- base2 %>%
group_by(start_date2, business_org) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
group_by(start_date2) %>%
mutate(
business_org = recode(business_org,
"1" = "Sanitaire (Professionnels et structures de santé)",
"2" = "Industriel (Start-ups, Entreprises, ...)",
"3" = "Organisationnel (Collectivités, ONG, Associations, Fondations, ...)",
"4" = "Académique (Universités, Laboratoires de recherche, ...)"
),
total_start_date2 = sum(nb_oui),
pct = round(nb_oui / total_start_date2 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
)
ggplot(business_res2, aes(x = start_date2, y = pct, fill = business_org)) +
geom_col(position = "stack") +
geom_text(aes(label = ifelse(pct > 5, paste0(pct, ""), "")),
position = position_stack(vjust = 0.5),
size = 5, color = "black", fontface = "bold") +
scale_fill_brewer(palette = "Set2") +
labs(
title = "Répartition des secteurs des porteurs par année de démarrage des projets",
x = "Année de démarrage des projets",
y = "Proportion des secteurs des porteurs des projets",
fill = "Secteurs des porteurs"
) +
theme_minimal(base_size = 18) +
theme(plot.title = element_text(face = "bold"),
axis.text.x = element_text(angle = 45, hjust = 1))
imp_area_col2 <- names(base2)[185:188]
top_imp_areas2 <- base2 %>%
pivot_longer(
cols = all_of(imp_area_col2),
names_to = "imp_areas",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(imp_areas) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
mutate(imp_areas = recode(imp_areas,
"imp_area_1" = "Internationale (dans plusieurs pays)",
"imp_area_2" = "Nationale (dans un seul pays)",
"imp_area_3" = "Provinciale/Régionale (dans une région d'un seul pays)",
"imp_area_4" = "Locale (dans une seule ville/village/localité)"
)) %>%
mutate(
pct = round(nb_oui / 41 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
) %>%
arrange(desc(nb_oui))
print(top_imp_areas2)
## # A tibble: 4 × 4
## imp_areas nb_oui pct rang
## <chr> <int> <dbl> <int>
## 1 Nationale (dans un seul pays) 17 41.5 1
## 2 Internationale (dans plusieurs pays) 16 39.0 2
## 3 Provinciale/Régionale (dans une région d'un seul pays) 6 14.6 3
## 4 Locale (dans une seule ville/village/localité) 2 4.88 4
ggplot(top_imp_areas2, aes(x = reorder(imp_areas, nb_oui), y = nb_oui, fill = nb_oui)) +
geom_col() +
geom_text(aes(label = paste0(nb_oui, " (", pct, "%)")),
hjust = -0.1, size = 4) +
coord_flip() +
scale_y_continuous(expand = expansion(mult = c(0, 0.3))) +
scale_fill_gradient(low = "#EDF8E9", high = "#238B45", guide = "none") +
labs(
title = "Répartition des projets lauréats par échelle d'implémentation ",
x = "Echelles d'implémentation",
y = "Nombre de projets"
) +
theme_minimal(base_size = 16) +
theme(plot.title = element_text(face = "bold"))
top2_ia <- top_imp_areas2 %>% slice(1:2)
cat(paste0( paste0(top2_ia$imp_areas, collapse = " et "), " avec respectivement ", paste0(top2_ia$pct, "%", collapse = ", "),", ", "sont les échelles d'implémentation les plus représentées pour les projets lauréats."))
## Nationale (dans un seul pays) et Internationale (dans plusieurs pays) avec respectivement 41.46%, 39.02%, sont les échelles d'implémentation les plus représentées pour les projets lauréats.
i_res2 <- base2 %>%
pivot_longer(
cols = all_of(imp_area_col),
names_to = "imp_areas",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(start_date2, imp_areas) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
group_by(start_date2) %>%
mutate(imp_areas = recode(imp_areas,
"imp_area_1" = "Internationale (dans plusieurs pays)",
"imp_area_2" = "Nationale (dans un seul pays)",
"imp_area_3" = "Provinciale/Régionale (dans une région d'un seul pays)",
"imp_area_4" = "Locale (dans une seule ville/village/localité)"
)) %>%
mutate(
total_start_date2 = sum(nb_oui),
pct = round(nb_oui / total_start_date2 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
)
ggplot(i_res2, aes(x = start_date2, y = pct, fill = imp_areas)) +
geom_col(position = "stack") +
geom_text(aes(label = ifelse(pct > 5, paste0(pct, ""), "")),
position = position_stack(vjust = 0.5),
size = 5, color = "black", fontface = "bold") +
scale_fill_brewer(palette = "Greens") +
labs(
title = "Répartition relative des échelles d'implémentation par année de démarrage des projets",
x = "Année de démarrage des projets",
y = "Pourcentage relatif (en %)",
fill = "Echelles d'implémentation"
) +
theme_minimal(base_size = 18) +
theme(plot.title = element_text(face = "bold"),
axis.text.x = element_text(angle = 45, hjust = 1))
base2 %>%
count(stage) %>%
mutate(stage = recode(stage,
"1" = "Projet pilote",
"2" = "Projet en routine / en exploitation"
)) %>%
mutate(pct = n / 41 * 100) %>%
ggplot(aes(x = "", y = pct, fill = stage)) +
geom_bar(stat = "identity", position = "stack") +
geom_text(aes(label = paste0(n, " (", round(pct), "%)"), fontface = "bold"),
position = position_stack(vjust = 0.5)) +
coord_polar("y") +
labs(title = "Répartition des projets lauréats par stade d'avancement",
fill = "Stades d'avancement") +
theme_void()+
theme(plot.title = element_text(face = "bold"))
top2_stage <- round(prop.table(table(base2$stage))*100,0)
cat(paste0(unname(top2_stage[2]),"% ", "des projets lauréats étaient au stade routine/en exploitation",", contre ", unname(top2_stage[1]), "% pour le stade pilote."))
## 78% des projets lauréats étaient au stade routine/en exploitation, contre 22% pour le stade pilote.
base2 %>%
count(start_date2, stage) %>%
group_by(start_date2) %>%
mutate(stage = recode(stage,
"1" = "Projet pilote",
"2" = "Projet en routine / en exploitation"
)) %>%
mutate(pct = n / sum(n) * 100) %>%
ggplot(aes(x = factor(start_date2), y = pct, fill = stage)) +
geom_bar(stat = "identity", position = "stack") +
geom_text(aes(label = paste0(round(pct), ""),fontface = "bold"),
position = position_stack(vjust = 0.5)) +
labs(title = "Répartition des stades d'avancement par année de démarrage des projets lauréats",
x = "Année de démarrage des projets", y = "Pourcentage (en %)", fill = "Stades d'avancement") +
theme_minimal(base_size = 8)+
theme(plot.title = element_text(face = "bold"))
base2 %>%
count(end_stage) %>%
mutate(pct = n / 41 * 100) %>%
ggplot(aes(x = "", y = pct, fill = end_stage)) +
geom_bar(stat = "identity", position = "stack") +
geom_text(aes(label = paste0(n, " (", round(pct), "%)"),
fontface = "bold"),
position = position_stack(vjust = 0.5)) +
coord_polar("y") +
scale_fill_manual(values = c("clôturé" = "#7C3AED", "non clôturé" = "#F9A8D4")) +
labs(title = "Répartition des projets lauréats selon leur satut de clôture",
fill = "Statut des projets") +
theme_void() +
theme(plot.title = element_text(face = "bold"))
top2_end_stage <- round(prop.table(table(base2$end_stage))*100,0)
cat(paste0("Les projets lauréats clôturés représentent ", unname(top2_end_stage[1]),"%, contre ", unname(top2_end_stage[2]), "% pour les projets lauréats non clôturés."))
## Les projets lauréats clôturés représentent 22%, contre 78% pour les projets lauréats non clôturés.
o_source_col2 <- names(base2)[58:63]
top_o_source2 <- base2 %>%
pivot_longer(
cols = all_of(o_source_col2),
names_to = "O_source",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(O_source) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
mutate(O_source = recode(O_source,
"o_source_1" = "Public (Subvention, Appel à projets/Appel d'offre,...)",
"o_source_2" = "Privé (Investisseurs privés, Crowdfunding, Mécénat, ...)",
"o_source_3" = "ONG",
"o_source_4" = "Agence gouvernementale",
"o_source_5" = "Agence intergouvernementale/internationale",
"o_source_6" = " Autres"
)) %>%
mutate(
pct = round(nb_oui / 41 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
) %>%
arrange(desc(nb_oui))
print(top_o_source2)
## # A tibble: 6 × 4
## O_source nb_oui pct rang
## <chr> <int> <dbl> <int>
## 1 "Privé (Investisseurs privés, Crowdfunding, Mécénat, ...)" 29 70.7 1
## 2 "Public (Subvention, Appel à projets/Appel d'offre,...)" 27 65.8 2
## 3 "Agence gouvernementale" 19 46.3 3
## 4 "ONG" 18 43.9 4
## 5 "Agence intergouvernementale/internationale" 14 34.2 5
## 6 " Autres" 6 14.6 6
ggplot(top_o_source2, aes(x = reorder(O_source, nb_oui), y = nb_oui, fill = nb_oui)) +
geom_col() +
geom_text(aes(label = paste0(nb_oui, " (", pct, "%)")),
hjust = -0.1, size = 4) +
coord_flip() +
scale_y_continuous(expand = expansion(mult = c(0, 0.3))) +
scale_fill_gradient(low = "linen", high = "saddlebrown", guide = "none") +
labs(
title = "Répartition des projets lauréats par origine des financements",
x = "Origines des financements",
y = "Nombre de projets"
) +
theme_minimal(base_size = 16) +
theme(plot.title = element_text(face = "bold"))
ECO_col2 <- names(base2)[78:82]
top_ECO2 <- base2 %>%
pivot_longer(
cols = all_of(ECO_col2),
names_to = "ECOS",
values_to = "modalite"
) %>%
filter(modalite == "Oui") %>%
group_by(ECOS) %>%
summarise(nb_oui = n(), .groups = "drop") %>%
mutate(ECOS = recode(ECOS,
"ECO1" = "Revenus générés par les utilisateurs",
"ECO2" = "Subventions et dons",
"ECO3" = "Publicités",
"ECO4" = "Vente d'analyse de données",
"ECO5" = "Autres"
)) %>%
mutate(
pct = round(nb_oui / 41 * 100, 2),
rang = rank(-nb_oui, ties.method = "min")
) %>%
arrange(desc(nb_oui))
print(top_ECO2)
## # A tibble: 5 × 4
## ECOS nb_oui pct rang
## <chr> <int> <dbl> <int>
## 1 Subventions et dons 31 75.6 1
## 2 Revenus générés par les utilisateurs 19 46.3 2
## 3 Autres 17 41.5 3
## 4 Publicités 10 24.4 4
## 5 Vente d'analyse de données 8 19.5 5
ggplot(top_ECO2, aes(x = reorder(ECOS, nb_oui), y = nb_oui, fill = nb_oui)) +
geom_col() +
geom_text(aes(label = paste0(nb_oui, " (", pct, "%)")),
hjust = -0.1, size = 4) +
coord_flip() +
scale_y_continuous(expand = expansion(mult = c(0, 0.3))) +
scale_fill_gradient(low = "lightyellow", high = "darkorange", guide = "none") +
labs(
title = "Répartition des projets lauréats par source de financement",
x = "Sources de financement",
y = "Nombre de projets"
) +
theme_minimal(base_size = 16) +
theme(plot.title = element_text(face = "bold"))
vue_user <- base2 %>%
filter (ECO1=="Oui") %>%
select (ID,`Initiative name`, ECO1, f_source_1, f_source_2)
#Ceux qui ont coché revenus générés par les bénéficiaires n'ont pas forcément coché les revenus générés par les professionnels/structures de santé et vice versa.
###Répartition des projets par année de démarrage (agrégés)
base1$type <- "Tous les projets"
base2$type <- "Projets lauréats"
base_combined <- bind_rows(base1, base2)
ggplot(base_combined, aes(x = start_date2, fill = type)) +
geom_bar(position = "dodge") +
stat_count(
aes(label = ..count..),
geom = "text",
position = position_dodge(width = 0.9),
vjust = -0.3
) +
labs(
title = "Répartition des projets par année de démarrage",
x = "Année de démarrage",
y = "Nombre de projets",
fill = "Type de projet"
) +
scale_fill_manual(values = c("mediumpurple", "skyblue")) +
theme_minimal()