Skip to content

Luca-Pozzi/pizza_chart

Repository files navigation

Pizza chart

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.


Summary charts of pizza days at WE-COBOT in either dark or light mode adapting to selected color scheme

More stats are available on GitHub Pages.


Table of contents

How to install

  1. Clone the repo
git clone https://github.com/Luca-Pozzi/pizza_chart.git
  1. 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

How to use

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.

Examples

  • pizza_chart.ipynb
    Demonstrates how to use the pizza_chart.plot function 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.

Contribute

Add a pizza image 🍕

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.md to process it to the desired format, size and resolution.
  • Make a pizza with pizza_maker.ipynb. See Examples section.

Add a topping image 🍅

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).

Add an order 📋

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.csv file
  • add new pizza images (with background removed, see assets/README.md) in input/assets/pizzas (if any)
  • push your changes
  • manually trigger the Add new order worflow from the Actions tab on GitHub

License

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)

Author

About

Pie charts with a salty twist.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages