Spaces:
Running
Running
Bring over changes
Browse files
README.md
CHANGED
@@ -8,7 +8,8 @@ pinned: false
|
|
8 |
license: apache-2.0
|
9 |
short_description: Vizro - Visual vocabulary
|
10 |
---
|
11 |
-
|
|
|
12 |
|
13 |
### Welcome to our visual vocabulary dashboard! π¨
|
14 |
|
@@ -38,84 +39,86 @@ Inspired by:
|
|
38 |
|
39 |
Credits and sources:
|
40 |
|
41 |
-
- Charting library: [Plotly](https://
|
42 |
-
|
43 |
- Data visualization best practices: [Guide to data chart mastery](https://www.atlassian.com/data/charts)
|
44 |
|
45 |
## Chart types
|
46 |
|
47 |
The dashboard is still in development. Below is an overview of the chart types for which a completed page is available.
|
48 |
|
49 |
-
| Chart Type | Status | Category |
|
50 |
-
| --------------------- | ------ | ------------------------ |
|
51 |
-
| Arc | β | Part-to-whole |
|
52 |
-
| Area | β
| Time |
|
53 |
-
| Bar | β
| Magnitude |
|
54 |
-
| Barcode | β | Distribution |
|
55 |
-
| Beeswarm | β | Distribution |
|
56 |
-
| Boxplot | β
| Distribution |
|
57 |
-
| Bubble | β
| Correlation |
|
58 |
-
| Bubble map | β
| Spatial |
|
59 |
-
| Bubble timeline | β | Time |
|
60 |
-
| Bullet | β | Magnitude |
|
61 |
-
| Bump | β | Ranking |
|
62 |
-
| Butterfly | β
| Deviation, Distribution |
|
63 |
-
| Chord | β | Flow |
|
64 |
-
| Choropleth | β
| Spatial |
|
65 |
-
| Column | β
| Magnitude, Time |
|
66 |
-
| Column and line | β
| Correlation, Time |
|
67 |
-
| Connected scatter | β
| Correlation, Time |
|
68 |
-
| Cumulative curve | β | Distribution |
|
69 |
-
| Diverging bar | β | Deviation |
|
70 |
-
| Diverging stacked bar | β | Deviation |
|
71 |
-
| Donut | β
| Part-to-whole |
|
72 |
-
| Dot map | β
| Spatial |
|
73 |
-
| Dot plot | β | Distribution |
|
74 |
-
| Fan | β | Time |
|
75 |
-
| Flow map | β | Spatial |
|
76 |
-
| Funnel | β
| Part-to-whole |
|
77 |
-
| Gantt | β | Time |
|
78 |
-
| Gridplot | β | Part-to-whole |
|
79 |
-
| Heatmap | β
| Time |
|
80 |
-
|
|
81 |
-
| Histogram | β
| Distribution |
|
82 |
-
| Line | β
| Time |
|
83 |
-
| Lollipop | β | Ranking, Magnitude |
|
84 |
-
| Marimekko | β | Magnitude, Part-to-whole |
|
85 |
-
| Network | β | Flow |
|
86 |
-
| Ordered bar | β
| Ranking |
|
87 |
-
| Ordered bubble | β | Ranking |
|
88 |
-
| Ordered column | β
| Ranking |
|
89 |
-
| Paired bar | β
| Magnitude |
|
90 |
-
| Paired column | β
| Magnitude |
|
91 |
-
| Parallel coordinates | β
| Magnitude |
|
92 |
-
| Pictogram | β | Magnitude |
|
93 |
-
| Pie | β
| Part-to-whole |
|
94 |
-
| Radar | β | Magnitude |
|
95 |
-
| Radial | β | Magnitude |
|
96 |
-
| Sankey | β
| Flow |
|
97 |
-
| Scatter | β
| Correlation |
|
98 |
-
| Scatter matrix | β
| Correlation |
|
99 |
-
| Slope | β | Ranking, Time |
|
100 |
-
| Sparkline | β | Time |
|
101 |
-
| Stacked bar | β
| Part-to-whole |
|
102 |
-
| Stacked column | β
| Part-to-whole |
|
103 |
-
| Stepped line | β
| Time |
|
104 |
-
| Surplus deficit line | β | Deviation |
|
105 |
-
| Treemap | β
| Part-to-whole |
|
106 |
-
| Venn | β | Part-to-whole |
|
107 |
-
| Violin | β
| Distribution |
|
108 |
-
| Waterfall | β | Part-to-whole, Flow |
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
|
|
114 |
3. Create a new page for the chart type and add it to the relevant category `.py` file such as `correlation.py`,
|
115 |
-
`deviation.py`, `distribution.py`, etc.
|
116 |
-
4. Add a `.py` file containing a code example of the chart type in the `pages/examples` folder, for instance, `area.py
|
117 |
5. Remove the `IncompletePage(..)` entry for that chart type in `chart_groups.py`.
|
118 |
-
6. Update this `README.md` with the new chart type.
|
119 |
|
120 |
## How to run the example locally
|
121 |
|
|
|
8 |
license: apache-2.0
|
9 |
short_description: Vizro - Visual vocabulary
|
10 |
---
|
11 |
+
|
12 |
+
# Vizro - Visual vocabulary
|
13 |
|
14 |
### Welcome to our visual vocabulary dashboard! π¨
|
15 |
|
|
|
39 |
|
40 |
Credits and sources:
|
41 |
|
42 |
+
- Charting library: [Plotly](https://github.com/plotly/plotly.py)
|
43 |
+
- Plotly Express chart examples: [Plotly Express](https://plotly.com/python/plotly-express/)
|
44 |
- Data visualization best practices: [Guide to data chart mastery](https://www.atlassian.com/data/charts)
|
45 |
|
46 |
## Chart types
|
47 |
|
48 |
The dashboard is still in development. Below is an overview of the chart types for which a completed page is available.
|
49 |
|
50 |
+
| Chart Type | Status | Category | Credits & sources | API |
|
51 |
+
| --------------------- | ------ | ------------------------ | ------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
52 |
+
| Arc | β | Part-to-whole | | |
|
53 |
+
| Area | β
| Time | [Filled area plot with px](https://plotly.com/python/filled-area-plots/) | [px.area](https://plotly.com/python-api-reference/generated/plotly.express.area) |
|
54 |
+
| Bar | β
| Magnitude | [Bar chart with px](https://plotly.com/python/bar-charts/) | [px.bar](https://plotly.com/python-api-reference/generated/plotly.express.bar) |
|
55 |
+
| Barcode | β | Distribution | | |
|
56 |
+
| Beeswarm | β | Distribution | | |
|
57 |
+
| Boxplot | β
| Distribution | [Box plot with px](https://plotly.com/python/box-plots/) | [px.box](https://plotly.github.io/plotly.py-docs/generated/plotly.express.box) |
|
58 |
+
| Bubble | β
| Correlation | [Scatter plot with px](https://plotly.com/python/line-and-scatter/) | [px.scatter](https://plotly.com/python-api-reference/generated/plotly.express.scatter) |
|
59 |
+
| Bubble map | β
| Spatial | [Bubble map in px](https://plotly.com/python/bubble-maps/) | [px.scatter_map](https://plotly.github.io/plotly.py-docs/generated/plotly.express.scatter_map) |
|
60 |
+
| Bubble timeline | β | Time | | |
|
61 |
+
| Bullet | β | Magnitude | | |
|
62 |
+
| Bump | β | Ranking | | |
|
63 |
+
| Butterfly | β
| Deviation, Distribution | [Pyramid charts in Plotly](https://plotly.com/python/v3/population-pyramid-charts/) | [go.Bar](https://plotly.com/python-api-reference/generated/plotly.graph_objects.Bar.html) |
|
64 |
+
| Chord | β | Flow | | |
|
65 |
+
| Choropleth | β
| Spatial | [Choropleth map with px](https://plotly.com/python/choropleth-maps/) | [px.choropleth](https://plotly.github.io/plotly.py-docs/generated/plotly.express.choropleth.html) |
|
66 |
+
| Column | β
| Magnitude, Time | [Bar chart with px](https://plotly.com/python/bar-charts/) | [px.bar](https://plotly.com/python-api-reference/generated/plotly.express.bar.html) |
|
67 |
+
| Column and line | β
| Correlation, Time | [Multiple chart types in Plotly](https://plotly.com/python/graphing-multiple-chart-types/) | [go.Bar](https://plotly.com/python-api-reference/generated/plotly.graph_objects.Bar.html) and [go.Scatter](https://plotly.com/python-api-reference/generated/plotly.graph_objects.Scatter.html) |
|
68 |
+
| Connected scatter | β
| Correlation, Time | [Line plot with px](https://plotly.com/python/line-charts/) | [px.line](https://plotly.com/python-api-reference/generated/plotly.express.line) |
|
69 |
+
| Cumulative curve | β | Distribution | | |
|
70 |
+
| Diverging bar | β | Deviation | | |
|
71 |
+
| Diverging stacked bar | β | Deviation | | |
|
72 |
+
| Donut | β
| Part-to-whole | [Pie chart with px](https://plotly.com/python/pie-charts/) | [px.pie](https://plotly.com/python-api-reference/generated/plotly.express.pie) |
|
73 |
+
| Dot map | β
| Spatial | [Bubble map in px](https://plotly.com/python/bubble-maps/) | [px.scatter_map](https://plotly.github.io/plotly.py-docs/generated/plotly.express.scatter_map) |
|
74 |
+
| Dot plot | β | Distribution | | |
|
75 |
+
| Fan | β | Time | | |
|
76 |
+
| Flow map | β | Spatial | | |
|
77 |
+
| Funnel | β
| Part-to-whole | [Funnel plot with px](https://plotly.com/python/funnel-charts/) | [px.funnel](https://plotly.com/python/funnel-charts/) |
|
78 |
+
| Gantt | β | Time | | |
|
79 |
+
| Gridplot | β | Part-to-whole | | |
|
80 |
+
| Heatmap | β
| Time | [Heatmaps with px](https://plotly.com/python/heatmaps/) | [px.density_heatmap](https://plotly.com/python-api-reference/generated/plotly.express.density_heatmap.html) |
|
81 |
+
| Correlation matrix | β | Correlation | | |
|
82 |
+
| Histogram | β
| Distribution | [Histograms with px](https://plotly.com/python/histograms/) | [px.histogram](https://plotly.github.io/plotly.py-docs/generated/plotly.express.histogram) |
|
83 |
+
| Line | β
| Time | [Line plot with px](https://plotly.com/python/line-charts/) | [px.line](https://plotly.com/python-api-reference/generated/plotly.express.line) |
|
84 |
+
| Lollipop | β | Ranking, Magnitude | | |
|
85 |
+
| Marimekko | β | Magnitude, Part-to-whole | | |
|
86 |
+
| Network | β | Flow | | |
|
87 |
+
| Ordered bar | β
| Ranking | [Bar chart with px](https://plotly.com/python/bar-charts/) | [px.bar](https://plotly.com/python-api-reference/generated/plotly.express.bar.html) |
|
88 |
+
| Ordered bubble | β | Ranking | | |
|
89 |
+
| Ordered column | β
| Ranking | [Bar chart with px](https://plotly.com/python/bar-charts/) | [px.bar](https://plotly.com/python-api-reference/generated/plotly.express.bar.html) |
|
90 |
+
| Paired bar | β
| Magnitude | [Histograms with px](https://plotly.com/python/histograms/) | [px.histogram](https://plotly.github.io/plotly.py-docs/generated/plotly.express.histogram) |
|
91 |
+
| Paired column | β
| Magnitude | [Histograms with px](https://plotly.com/python/histograms/) | [px.histogram](https://plotly.github.io/plotly.py-docs/generated/plotly.express.histogram) |
|
92 |
+
| Parallel coordinates | β
| Magnitude | [Parallel coordinates plot with px](https://plotly.com/python/parallel-coordinates-plot/) | [px.parallel_coordinates](https://plotly.com/python-api-reference/generated/plotly.express.parallel_coordinates.html) |
|
93 |
+
| Pictogram | β | Magnitude | | |
|
94 |
+
| Pie | β
| Part-to-whole | [Pie chart with px](https://plotly.com/python/pie-charts/) | [px.pie](https://plotly.com/python-api-reference/generated/plotly.express.pie) |
|
95 |
+
| Radar | β | Magnitude | | |
|
96 |
+
| Radial | β | Magnitude | | |
|
97 |
+
| Sankey | β
| Flow | [Sankey diagram in Plotly](https://plotly.com/python/sankey-diagram/) | [go.Sankey](https://plotly.github.io/plotly.py-docs/generated/plotly.graph_objects.Sankey.html) |
|
98 |
+
| Scatter | β
| Correlation | [Scatter plot with px](https://plotly.com/python/line-and-scatter/) | [px.scatter](https://plotly.com/python-api-reference/generated/plotly.express.scatter) |
|
99 |
+
| Scatter matrix | β
| Correlation | [Scatter matrix with px](https://plotly.com/python/splom/) | [px.scatter_matrix](https://plotly.github.io/plotly.py-docs/generated/plotly.express.scatter_matrix.html) |
|
100 |
+
| Slope | β | Ranking, Time | | |
|
101 |
+
| Sparkline | β | Time | | |
|
102 |
+
| Stacked bar | β
| Part-to-whole | [Histograms with px](https://plotly.com/python/histograms/) | [px.histogram](https://plotly.github.io/plotly.py-docs/generated/plotly.express.histogram) |
|
103 |
+
| Stacked column | β
| Part-to-whole | [Histograms with px](https://plotly.com/python/histograms/) | [px.histogram](https://plotly.github.io/plotly.py-docs/generated/plotly.express.histogram) |
|
104 |
+
| Stepped line | β
| Time | [Line plot with px](https://plotly.com/python/line-charts/) | [px.line](https://plotly.com/python-api-reference/generated/plotly.express.line) |
|
105 |
+
| Surplus deficit line | β | Deviation | | |
|
106 |
+
| Treemap | β
| Part-to-whole | [Treemap with px](https://plotly.com/python/treemaps/) | [px.treemap](https://plotly.com/python-api-reference/generated/plotly.express.treemap.html) |
|
107 |
+
| Venn | β | Part-to-whole | | |
|
108 |
+
| Violin | β
| Distribution | [Violin plot with px](https://plotly.com/python/violin/) | [px.violin](https://plotly.com/python-api-reference/generated/plotly.express.violin.html) |
|
109 |
+
| Waterfall | β | Part-to-whole, Flow | | |
|
110 |
+
|
111 |
+
## How to contribute
|
112 |
+
|
113 |
+
Contributions are welcome! To contribute a chart, follow the steps below:
|
114 |
+
|
115 |
+
1. Check that a `svg` file named after the chart type is contained in the [assets](https://github.com/mckinsey/vizro/tree/main/vizro-core/examples/_visual-vocabulary/assets/images/charts) folder. If not, [raise an issue](https://github.com/mckinsey/vizro/issues) in the repository.
|
116 |
+
2. Add the data set to `_pages_utils.py` if it doesn't already exist. Use existing data sets preferably or any other data set that is publicly available e.g. [plotlx.express.data](https://plotly.com/python-api-reference/generated/plotly.express.data.html)
|
117 |
3. Create a new page for the chart type and add it to the relevant category `.py` file such as `correlation.py`,
|
118 |
+
`deviation.py`, `distribution.py`, etc. Ensure you add the page to the list of `pages` at the end of the `.py` file.
|
119 |
+
4. Add a `.py` file containing a code example of the chart type in the `pages/examples` folder, for instance, `area.py`. Take a look at existing examples.
|
120 |
5. Remove the `IncompletePage(..)` entry for that chart type in `chart_groups.py`.
|
121 |
+
6. Update this `README.md` with the new chart type, its status, category, and API links.
|
122 |
|
123 |
## How to run the example locally
|
124 |
|
assets/images/charts/{heatmap-matrix.svg β correlation-matrix.svg}
RENAMED
File without changes
|
requirements.in
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
# This file is only used if you don't have hatch installed.
|
2 |
-
# It should be fully generated and used when the demo moves to huggingface.
|
3 |
black==24.4.2
|
4 |
plotly>=5.24.0
|
5 |
vizro==0.1.22
|
|
|
1 |
# This file is only used if you don't have hatch installed.
|
|
|
2 |
black==24.4.2
|
3 |
plotly>=5.24.0
|
4 |
vizro==0.1.22
|