-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
274 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,227 @@ | ||
export type TreeNode = { | ||
type: 'node'; | ||
value: number; | ||
name: string; | ||
children: Tree[]; | ||
}; | ||
export type TreeLeaf = { | ||
type: 'leaf'; | ||
name: string; | ||
value: number; | ||
}; | ||
export const rawData = { | ||
"Motifs de déplacement": { | ||
"Etudes": { | ||
"Déplacements": "7.6%", | ||
"Temps": "6.3%", | ||
"Distances": "2.8%", | ||
"Emissions directes": "1.8%", | ||
"Emissions avec Amt/traînées": "1.6%" | ||
}, | ||
"Professionnel": { | ||
"Déplacements": "21%", | ||
"Temps": "25%", | ||
"Distances": "24%", | ||
"Emissions directes": "33%", | ||
"Emissions avec Amt/traînées": "30%" | ||
}, | ||
"Achats": { | ||
"Déplacements": "21%", | ||
"Temps": "14%", | ||
"Distances": "8%", | ||
"Emissions directes": "9.4%", | ||
"Emissions avec Amt/traînées": "8.2%" | ||
}, | ||
"Soin-Admin.": { | ||
"Déplacements": "5.5%", | ||
"Temps": "4.9%", | ||
"Distances": "3.3%", | ||
"Emissions directes": "4.2%", | ||
"Emissions avec Amt/traînées": "3.7%" | ||
}, | ||
"Accompagn.": { | ||
"Déplacements": "10%", | ||
"Temps": "6.3%", | ||
"Distances": "4.9%", | ||
"Emissions directes": "5.1%", | ||
"Emissions avec Amt/traînées": "4.5%" | ||
}, | ||
"Visite": { | ||
"Déplacements": "11%", | ||
"Temps": "14%", | ||
"Distances": "18%", | ||
"Emissions directes": "15%", | ||
"Emissions avec Amt/traînées": "15%" | ||
}, | ||
"Sport": { | ||
"Déplacements": "13%", | ||
"Temps": "14%", | ||
"Distances": "6.7%", | ||
"Emissions directes": "5.8%", | ||
"Emissions avec Amt/traînées": "5.2%" | ||
}, | ||
"Loisirs": { | ||
"Déplacements": "9%", | ||
"Temps": "8.7%", | ||
"Distances": "7.6%", | ||
"Emissions directes": "6.1%", | ||
"Emissions avec Amt/traînées": "5.8%" | ||
}, | ||
"Vacances": { | ||
"Déplacements": "0.5%", | ||
"Temps": "5.9%", | ||
"Distances": "22%", | ||
"Emissions directes": "18%", | ||
"Emissions avec Amt/traînées": "23%" | ||
}, | ||
"Autre": { | ||
"Déplacements": "0.9%", | ||
"Temps": "1.2%", | ||
"Distances": "2.2%", | ||
"Emissions directes": "1.9%", | ||
"Emissions avec Amt/traînées": "2.1%" | ||
} | ||
}, | ||
"Modes de transport": { | ||
"Marche": { | ||
"Déplacements": "23.6%", | ||
"Temps": "15.3%", | ||
"Distances": "1.5%", | ||
"Emissions directes": "0%", | ||
"Emissions avec Amt/traînées": "0%" | ||
}, | ||
"Vélo": { | ||
"Déplacements": "2.5%", | ||
"Temps": "2%", | ||
"Distances": "0.5%", | ||
"Emissions directes": "0%", | ||
"Emissions avec Amt/traînées": "0%" | ||
}, | ||
"2RM": { | ||
"Déplacements": "1%", | ||
"Temps": "1%", | ||
"Distances": "0.8%", | ||
"Emissions directes": "0.7%", | ||
"Emissions avec Amt/traînées": "0.6%" | ||
}, | ||
"Voiture": { | ||
"Déplacements": "64%", | ||
"Temps": "62.2%", | ||
"Distances": "65.2%", | ||
"Emissions directes": "79.4%", | ||
"Emissions avec Amt/traînées": "69.1%" | ||
}, | ||
"Bus et car": { | ||
"Déplacements": "3.6%", | ||
"Temps": "5.8%", | ||
"Distances": "2.7%", | ||
"Emissions directes": "1.6%", | ||
"Emissions avec Amt/traînées": "1.4%" | ||
}, | ||
"Ferroviaire": { | ||
"Déplacements": "4.7%", | ||
"Temps": "10.9%", | ||
"Distances": "8.6%", | ||
"Emissions directes": "0.2%", | ||
"Emissions avec Amt/traînées": "0.5%" | ||
}, | ||
"Avion": { | ||
"Déplacements": "0.1%", | ||
"Temps": "2.2%", | ||
"Distances": "19.5%", | ||
"Emissions directes": "16.8%", | ||
"Emissions avec Amt/traînées": "27.2%" | ||
}, | ||
"Autres": { | ||
"Déplacements": "0.4%", | ||
"Temps": "0.7%", | ||
"Distances": "1.1%", | ||
"Emissions directes": "1.3%", | ||
"Emissions avec Amt/traînées": "1.2%" | ||
} | ||
}, | ||
"Gammes de distances": { | ||
"0-1 km": { | ||
"Déplacements": "17.3%", | ||
"Temps": "5.5%", | ||
"Distances": "0.5%", | ||
"Emissions directes": "0.2%", | ||
"Emissions avec Amt/traînées": "0.1%" | ||
}, | ||
"1-10 km": { | ||
"Déplacements": "53.7%", | ||
"Temps": "36.7%", | ||
"Distances": "12.2%", | ||
"Emissions directes": "14.6%", | ||
"Emissions avec Amt/traînées": "12.8%" | ||
}, | ||
"10-100 km": { | ||
"Déplacements": "27.5%", | ||
"Temps": "42%", | ||
"Distances": "40.6%", | ||
"Emissions directes": "48.4%", | ||
"Emissions avec Amt/traînées": "42.4%" | ||
}, | ||
"100-1000 km": { | ||
"Déplacements": "1.4%", | ||
"Temps": "13.2%", | ||
"Distances": "25.4%", | ||
"Emissions directes": "19.1%", | ||
"Emissions avec Amt/traînées": "18.6%" | ||
}, | ||
"1000 km+": { | ||
"Déplacements": "0.1%", | ||
"Temps": "2.6%", | ||
"Distances": "21.3%", | ||
"Emissions directes": "17.7%", | ||
"Emissions avec Amt/traînées": "26.1%" | ||
} | ||
}, | ||
"Quartiles de revenus": { | ||
"Q1": { | ||
"Déplacements": "23.2%", | ||
"Temps": "21.6%", | ||
"Distances": "16%", | ||
"Emissions directes": "14.6%", | ||
"Emissions avec Amt/traînées": "14.3%" | ||
}, | ||
"Q2": { | ||
"Déplacements": "24.5%", | ||
"Temps": "22.9%", | ||
"Distances": "20.4%", | ||
"Emissions directes": "20.8%", | ||
"Emissions avec Amt/traînées": "19.8%" | ||
}, | ||
"Q3": { | ||
"Déplacements": "26.2%", | ||
"Temps": "26.4%", | ||
"Distances": "27.7%", | ||
"Emissions directes": "29.1%", | ||
"Emissions avec Amt/traînées": "28.7%" | ||
}, | ||
"Q4": { | ||
"Déplacements": "26.1%", | ||
"Temps": "29.1%", | ||
"Distances": "35.9%", | ||
"Emissions directes": "35.5%", | ||
"Emissions avec Amt/traînées": "37.2%" | ||
} | ||
}, | ||
"Densité de commune de résidence": { | ||
"Rural": { | ||
"Déplacements": "33%", | ||
"Temps": "31.6%", | ||
"Distances": "37.3%", | ||
"Emissions directes": "41.8%", | ||
"Emissions avec Amt/traînées": "39.8%" | ||
}, | ||
"Intermédiaire": { | ||
"Déplacements": "28%", | ||
"Temps": "25.5%", | ||
"Distances": "26.2%", | ||
"Emissions directes": "27.3%", | ||
"Emissions avec Amt/traînées": "26.7%" | ||
}, | ||
"Dense": { | ||
"Déplacements": "39%", | ||
"Temps": "42.9%", | ||
"Distances": "36.6%", | ||
"Emissions directes": "30.9%", | ||
"Emissions avec Amt/traînées": "33.5%" | ||
} | ||
} | ||
} | ||
|
||
|
||
|
||
export type Tree = TreeNode | TreeLeaf; | ||
|
||
|
||
export const data: Tree = { | ||
type: "node", | ||
name: "boss", | ||
value: 0, | ||
children: [ | ||
{ | ||
type: "node", | ||
name: "Team Dataviz", | ||
value: 0, | ||
children: [ | ||
{ type: "leaf", name: "Mark", value: 90 }, | ||
{ type: "leaf", name: "Robert", value: 12 }, | ||
{ type: "leaf", name: "Emily", value: 34 }, | ||
{ type: "leaf", name: "Marion", value: 53 }, | ||
], | ||
}, | ||
{ | ||
type: "node", | ||
name: "Team DevOps", | ||
value: 0, | ||
children: [ | ||
{ type: "leaf", name: "Nicolas", value: 98 }, | ||
{ type: "leaf", name: "Malki", value: 22 }, | ||
{ type: "leaf", name: "Djé", value: 12 }, | ||
], | ||
}, | ||
{ | ||
type: "node", | ||
name: "Team Sales", | ||
value: 0, | ||
children: [ | ||
{ type: "leaf", name: "Mélanie", value: 45 }, | ||
{ type: "leaf", name: "Einstein", value: 76 }, | ||
], | ||
}, | ||
], | ||
}; |