From 2588b30960e61a3deea3b4f800c2863048580938 Mon Sep 17 00:00:00 2001 From: FRancois Pelletier Date: Sat, 3 Feb 2024 21:59:49 +0000 Subject: [PATCH] Version initiale Fichiers originaux Signed-off-by: FRancois Pelletier --- wicked-problems.csv | 44 ++++++++++++++++++++++++++++++++++++++++++ wicked.qmd | 47 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 wicked-problems.csv create mode 100644 wicked.qmd diff --git a/wicked-problems.csv b/wicked-problems.csv new file mode 100644 index 0000000..1cc1fac --- /dev/null +++ b/wicked-problems.csv @@ -0,0 +1,44 @@ +Identifiant,Couleur,Texte,Vers +INH,Noir,Inherited wealth,INV;INC +WAR,Noir,War,REF +REF,Noir,Refugees,EXT +EXT,Noir,Extremism,SOC;WAR;RAC +INC,Noir,Income inequality,SOC;EXT;POV +RAC,Noir,Racism,REF +EXC,Noir,Excessive CEO pay,INH;INC;LOB;CAM +CRI,Noir,Crime,EXT;FOR +PRO,Noir,Profit maximization,EXC;STO;COS;LOW;UNE;ROB;OUT;LOB +CLI,Noir,Climate events,ENV;REF +ENV,Noir,Environmental degradation,EXP;EXT;REF;CLI;DIS;MIG +POV,Noir,Poverty,EXP;ENV;MIG;LAC +OUT,Noir,Outsourced jobs,JOB +LOB,Noir,Lobbying,OUT;UNI;PRI;TAX +PRI,Noir,Privatization,POV;RIS;UIF +DIS,Noir,Disease,ENV +TAX,Noir,Tax avoidance,RIS +LAC,Noir,Lack of education,POV +TBT,Noir,"""Too big to fail"" oligopolies",BIG +CUT,Noir,Cuts in government spending,UIF;LAC;PUB;DER;POL +DER,Noir,Deregulation,UNS;WEL;POL +POL,Noir,Pollution,DIS;ENV;CLI +INV,Blanc,Investments in destructive industries,WAR +SOC,Blanc,Social unrest,WAR +FOR,Blanc,For-profit prison industry,EXT +STO,Blanc,Stock buybacks,INC;EXC +COS,Blanc,Cost cutting,INC +LOW,Blanc,Low wages,INC +UNE,Blanc,Unequal pay,INC +ROB,Blanc,Robot labor,JOB +JOB,Blanc,Job loss,POV +EXP,Blanc,Exploitation,INC +UNI,Blanc,Union busting,JOB +MIG,Blanc,Migration,ENV +HEA,Blanc,Cuts in public health,POV;DIS +CAM,Blanc,Campaign contributions,TAX;TBT +UIF,Blanc,Unsafe infrastructure,POV +INA,Blanc,Inadequate housing,DIS +RIS,Blanc,Rising debt,CUT +UNS,Blanc,Unsafe water,DIS +WEL,Blanc,Cuts to social welfare,DIS +PUB,Blanc,Underinvestment in public services,LAC;INA;HEA;UNS;DER +BIG,Blanc,Big Corp,TAX diff --git a/wicked.qmd b/wicked.qmd new file mode 100644 index 0000000..ca2420e --- /dev/null +++ b/wicked.qmd @@ -0,0 +1,47 @@ +--- +title: "Wicked Problems" +format: html +server: shiny +--- + +```{r} +library(readr) +library(visNetwork) +library(dplyr) +library(tidyr) +``` + +```{r} +wicked <- read_csv("wicked-problems.csv") +``` + +Source de l'exemple: + +```{r} +nodes <- wicked %>% + transmute(id=Identifiant, label=Texte, group=Couleur) +``` + +```{r} +edges <- wicked %>% select(Identifiant,Vers) %>% + rename(from=Identifiant) %>% + mutate(to = strsplit(Vers,";"), + arrows="to") %>% + unnest(to) %>% select(-Vers) %>% distinct() +``` + +```{r} +vsn <- visNetwork(nodes,edges, + main="Wicked Problems", + footer="Christian Sarkar & Philip Kotler shorturl.at/fjoqC", + width = 800, + height = 800) +``` + +```{r} +vsn +``` + +```{r} +visSave(vsn, file = "wicked_problems_standalone.html") +```