https://github.com/nrennie/2024-plotnine-contest
Code for the 2024 plotnine contest.
https://github.com/nrennie/2024-plotnine-contest
data-visualisation plotnine python
Last synced: 6 months ago
JSON representation
Code for the 2024 plotnine contest.
- Host: GitHub
- URL: https://github.com/nrennie/2024-plotnine-contest
- Owner: nrennie
- Created: 2024-05-24T09:25:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-15T13:54:44.000Z (over 1 year ago)
- Last Synced: 2025-06-22T00:05:02.801Z (6 months ago)
- Topics: data-visualisation, plotnine, python
- Language: Python
- Homepage: https://nrennie.github.io/2024-plotnine-contest
- Size: 3.79 MB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 2024 `plotnine` contest
This repository contains code for my entry in the [2024 Plotnine Contest](https://posit.co/blog/announcing-the-2024-plotnine-contest/).

## Data
The data is available from [github.com/rfordatascience/tidytuesday/blob/master/data/2024/2024-05-21/readme.md](https://github.com/rfordatascience/tidytuesday/blob/master/data/2024/2024-05-21/readme.md). The original data can be downloaded from [carbonmajors.org/Downloads](https://carbonmajors.org/Downloads). The Carbon Majors dataset is available for download and for non-commercial use, subject to InfluenceMap's [Terms and Conditions](https://influencemap.org/terms). The version used in this plot was downloaded in May 2024.
## Code
The code to reproduce the figure can be found in `plot.py`, and the source code for a more detailed tutorial can be found in the `index.qmd` file which is deployed at [nrennie.github.io/2024-plotnine-contest](https://nrennie.github.io/2024-plotnine-contest). This site is deployed with GitHub Actions, demonstrating that the plot is fully reproducible.
This entry for the `plotnine` contest was inspired by a visualisation I previously created using `{ggplot2}` in R for [#TidyTuesday](https://github.com/rfordatascience/tidytuesday/blob/master/data/2024/2024-05-21/readme.md). You can see the original R version at [github.com/nrennie/tidytuesday/tree/main/2024/2024-05-21](https://github.com/nrennie/tidytuesday/tree/main/2024/2024-05-21).
## Fonts
This plot uses `"Arial"` font. The code checks if 'Arial' is available on your operating system, and if it is not will use the default `sans` font instead. Alternatively, you change the variable `body_font` to the name of a font that you do have installed.