Pie charts, with a salty twist.
The purpose of this repository is to create a fun data visualization project to show our pizza preferences during pizza days at work. Data and the following summary stats refer to the pizza days at Polo Territoriale di Lecco, Politecnico di Milano.
While the data and summary stats are specific to our team, the core plotting function (pizza_chart.plot) and example notebooks are designed for anyone to use, adapt, and enjoy for their own pizza events or data visualization needs. See the rest of this README for more info.
More stats are available on GitHub Pages.
- Clone the repo
git clone https://github.com/Luca-Pozzi/pizza_chart.git
- Install the requirements (:warning: if you are working in a virtual environment, activate it first!)
cd <path_to_pizza_chart>
pip install -r requirements.txt
Important
pizza_chart comes with built-in images included, which can be freely used for non-commercial purposes (see license).
In using pizza_chart, the user can also use contents from any source, including third-party images. It is the user's responsibility to give proper attribution to the authors of said contents.
-
pizza_chart.ipynb
Demonstrates how to use thepizza_chart.plotfunction to visualize pizza orders as a custom pie chart. Shows how to specify your order and customize the chart’s appearance. -
pizza_maker.ipynb
Lets you create new pizza images by combining base pizzas and toppings. Useful for generating assets for new pizza types, with interactive controls for customizing your pizza.
To add a new pizza to the assets, you have two main options:
- Upload a picture. Take a top-view picture of your pizza, ensuring that it is entirely visible.
Follow the tips in
assets/README.mdto process it to the desired format, size and resolution. - Make a pizza with
pizza_maker.ipynb. See Examples section.
Users can add toppings to the assets by either:
- cropping a pizza from the images in
assets/pizza - getting ingredients images from third-party sources (Flaticon.com is a great place to look, if you are down with a cartoonish style).
Note
Adding new orders is reserved for collaborators who have write access to this repo.
Data collected during pizza days at Politecnico di Milano - Polo Territoriale di Lecco are available in data.xlsx Excel file.
The pizza_report.py gathers data from the Excel file to generate summary charts regarding our pizza days.
The updated summary is displayed at the top of this README. Individual charts are available in assets/charts.
If you are a collaborator who wants to append new data:
- update the
input/data.csvfile - add new pizza images (with background removed, see
assets/README.md) ininput/assets/pizzas(if any) - push your changes
- manually trigger the Add new order worflow from the Actions tab on GitHub
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
You are free to share and adapt the material for non-commercial purposes, as long as you provide appropriate credit. You can attribute this project as
[Pizza chart](https://github.com/Luca-Pozzi/pizza_chart)
- Luca ✉️ [email protected]
