Version initiale

Fichiers originaux

Signed-off-by: FRancois Pelletier <francois@service.jevalide.ca>
This commit is contained in:
Francois Pelletier 2024-02-03 21:59:49 +00:00
commit 2588b30960
2 changed files with 91 additions and 0 deletions

44
wicked-problems.csv Normal file
View file

@ -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
1 Identifiant Couleur Texte Vers
2 INH Noir Inherited wealth INV;INC
3 WAR Noir War REF
4 REF Noir Refugees EXT
5 EXT Noir Extremism SOC;WAR;RAC
6 INC Noir Income inequality SOC;EXT;POV
7 RAC Noir Racism REF
8 EXC Noir Excessive CEO pay INH;INC;LOB;CAM
9 CRI Noir Crime EXT;FOR
10 PRO Noir Profit maximization EXC;STO;COS;LOW;UNE;ROB;OUT;LOB
11 CLI Noir Climate events ENV;REF
12 ENV Noir Environmental degradation EXP;EXT;REF;CLI;DIS;MIG
13 POV Noir Poverty EXP;ENV;MIG;LAC
14 OUT Noir Outsourced jobs JOB
15 LOB Noir Lobbying OUT;UNI;PRI;TAX
16 PRI Noir Privatization POV;RIS;UIF
17 DIS Noir Disease ENV
18 TAX Noir Tax avoidance RIS
19 LAC Noir Lack of education POV
20 TBT Noir "Too big to fail" oligopolies BIG
21 CUT Noir Cuts in government spending UIF;LAC;PUB;DER;POL
22 DER Noir Deregulation UNS;WEL;POL
23 POL Noir Pollution DIS;ENV;CLI
24 INV Blanc Investments in destructive industries WAR
25 SOC Blanc Social unrest WAR
26 FOR Blanc For-profit prison industry EXT
27 STO Blanc Stock buybacks INC;EXC
28 COS Blanc Cost cutting INC
29 LOW Blanc Low wages INC
30 UNE Blanc Unequal pay INC
31 ROB Blanc Robot labor JOB
32 JOB Blanc Job loss POV
33 EXP Blanc Exploitation INC
34 UNI Blanc Union busting JOB
35 MIG Blanc Migration ENV
36 HEA Blanc Cuts in public health POV;DIS
37 CAM Blanc Campaign contributions TAX;TBT
38 UIF Blanc Unsafe infrastructure POV
39 INA Blanc Inadequate housing DIS
40 RIS Blanc Rising debt CUT
41 UNS Blanc Unsafe water DIS
42 WEL Blanc Cuts to social welfare DIS
43 PUB Blanc Underinvestment in public services LAC;INA;HEA;UNS;DER
44 BIG Blanc Big Corp TAX

47
wicked.qmd Normal file
View file

@ -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: <https://lrouviere.github.io/TUTO_GRAPHES/manip-graphes.html#graphes-dynamiques-avec-visnetwork>
```{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")
```