Spaces:
Running
Running
File size: 5,859 Bytes
487a9ac 42ee455 487a9ac 42ee455 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# Vizro - Visual vocabulary
This dashboard shows a gallery of charts. It includes guidance on when to use each chart type and sample Python code
to create them using [Plotly](https://plotly.com/python/) and [Vizro](https://github.com/mckinsey/vizro).
**Created by:**
- [Huong Li Nguyen](https://github.com/huong-li-nguyen) and [Antony Milne](https://github.com/antonymilne)
- Images created by QuantumBlack
**Inspired by:**
- [The FT Visual Vocabulary](https://github.com/Financial-Times/chart-doctor/blob/main/visual-vocabulary/README.md): Alan Smith, Chris Campbell, Ian Bott, Liz Faunce, Graham Parrish, Billy Ehrenberg, Paul McCallum,
Martin Stabe.
- [The Graphic Continuum](https://www.informationisbeautifulawards.com/showcase/611-the-graphic-continuum): Jon Swabish and Severino Ribecca
**Credits, tutorials and resources:**
- [Plotly](https://plotly.com/python/plotly-express/)
- [Guide to data chart mastery](https://www.atlassian.com/data/charts)
## Chart types
The dashboard is still in development. Below is an overview of the chart types for which a completed page is available.
| Chart Type | Status | Category |
| --------------------- | ------ | ------------------------ |
| Arc | β | Part-to-whole |
| Area | β
| Time |
| Bar | β
| Magnitude |
| Barcode | β | Distribution |
| Beeswarm | β | Distribution |
| Boxplot | β
| Distribution |
| Bubble | β
| Correlation |
| Bubble map | β | Spatial |
| Bubble timeline | β | Time |
| Bullet | β | Magnitude |
| Bump | β | Ranking |
| Butterfly | β
| Deviation, Distribution |
| Chord | β | Flow |
| Choropleth | β
| Spatial |
| Column | β
| Magnitude, Time |
| Column and line | β
| Correlation, Time |
| Connected scatter | β
| Correlation, Time |
| Cumulative curve | β | Distribution |
| Diverging bar | β | Deviation |
| Diverging stacked bar | β | Deviation |
| Donut | β
| Part-to-whole |
| Dot map | β | Spatial |
| Dot plot | β | Distribution |
| Fan | β | Time |
| Flow map | β | Spatial |
| Funnel | β
| Part-to-whole |
| Gantt | β | Time |
| Gridplot | β | Part-to-whole |
| Heatmap | β
| Time |
| Heatmap matrix | β | Correlation |
| Histogram | β
| Distribution |
| Line | β
| Time |
| Lollipop | β | Ranking, Magnitude |
| Marimekko | β | Magnitude, Part-to-whole |
| Network | β | Flow |
| Ordered bar | β
| Ranking |
| Ordered bubble | β | Ranking |
| Ordered column | β
| Ranking |
| Paired bar | β
| Magnitude |
| Paired column | β
| Magnitude |
| Parallel coordinates | β
| Magnitude |
| Pictogram | β | Magnitude |
| Pie | β
| Part-to-whole |
| Radar | β | Magnitude |
| Radial | β | Magnitude |
| Sankey | β
| Flow |
| Scatter | β
| Correlation |
| Scatter matrix | β
| Correlation |
| Slope | β | Ranking, Time |
| Sparkline | β | Time |
| Stacked bar | β
| Part-to-whole |
| Stacked column | β
| Part-to-whole |
| Stepped line | β
| Time |
| Surplus deficit line | β | Deviation |
| Treemap | β
| Part-to-whole |
| Venn | β | Part-to-whole |
| Violin | β
| Distribution |
| Waterfall | β | Part-to-whole, Flow |
To contribute a chart, follow the steps below:
1. Place an `svg` file named after the chart type in the `assets` folder if it doesn't already exist.
2. Add the data set to `_pages_utils.py` if it doesn't already exist.
3. Create a new page for the chart type and add it to the relevant category `.py` file such as `correlation.py`,
`deviation.py`, `distribution.py`, etc.
4. Add a `.py` file containing a code example of the chart type in the `pages/examples` folder, for instance, `area.py`
5. Remove the `IncompletePage(..)` entry for that chart type in `chart_groups.py`.
6. Update this `README.md` with the new chart type.
## How to run the example locally
1. If you have `hatch` set up, run the example with the command `hatch run example _visual-vocabulary`.
Otherwise, with a virtual Python environment activated, run `pip install -r requirements.txt` and then `python app.py`.
2. You should now be able to access the app locally via http://127.0.0.1:8050/.
|