Version initiale
Fichiers originaux Signed-off-by: FRancois Pelletier <francois@service.jevalide.ca>
This commit is contained in:
commit
2588b30960
2 changed files with 91 additions and 0 deletions
44
wicked-problems.csv
Normal file
44
wicked-problems.csv
Normal 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
|
|
47
wicked.qmd
Normal file
47
wicked.qmd
Normal 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")
|
||||
```
|
Loading…
Reference in a new issue