Reproducing Rise of AI over 8 decades plot {plotnine} vs {ggplot2} #827
Gchism94
announced in
2024 Plotnine Contest
Replies: 4 comments
-
Ahoy @Gchism94 , |
Beta Was this translation helpful? Give feedback.
0 replies
-
@EconomiCurtis, sounds great, thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Gchism94, The winning submission has been announced here. Thank you for taking part in the contest. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Authors
Greg Chism
Links
github, website, linkedin
Full description
Project link: https://gchism.quarto.pub/plotnineriseofai/
This project uses {plotnine} to reproduce my {ggplot2} version of The rise of artificial intelligence over the last 8 decades (Roser 2022) plot by Our World in Data. The plot has some slight differences based on the data used in my version vs the original.
Overall, I found that {plotnine} is not a perfect facsimile of {ggplot2} due to it being built upon the {matplotlib} framework, but its pretty close:
Most of the functionality from my {ggplot2} version was translatable, with some exceptions (see challenges section).
The "heart" of {ggplot2} seems to be in {plotnine}, making it a good way for R users to get into plotting through Python.
All-in-all, I think the plot I produced was pretty similar, so clearly the {plotnine} developers did a great job with the package.
This all being said, I found that working with {plotnine} felt like I was going to break it with every new line. The package feels a little fragile due to this. Some of this however is from my lack of experience in Python.
Disclosure
The original plot is licensed under CC-BY by the authors Charlie Giattino, Edouard Mathieu, and Max Roser. This project is licensed under the same.
The data is taken from (Sevilla et al. 2022) – Compute Trends Across Three eras of Machine Learning. Published in arXiv on March 9, 2022. The data are freely available to the public. Note that the available data to the public continues to be updated.
The original plot has fewer data points, likely due to additions by the data authors after the original article’s release.
Code repository
GitHub Repo: https://github.com/Gchism94/riseOfAIPlot/tree/main
Quarto Doc: https://github.com/Gchism94/riseOfAIPlot/blob/main/plotnineRiseOfAI.qmd
Note: My original version is also in the GitHub repo, which only uses {ggplot2}, please disregard (named
riseOfAIPlot.qmd
)Beta Was this translation helpful? Give feedback.
All reactions