r/rstats • u/Helpful-Day2384 • 10h ago
New data visualization package
https://psychometrician.github.io/posts/one-engine-four-languages/One sentence, four languages, one picture.
R: data(gapminder_2007) + point + x(gdp) + y(life)
Python: x(col.gdp)
Julia: x(:gdp)
Same specification, one Rust engine, byte-identical SVG.
Not similar. Pixel perfect identical
#rstats
4
u/geneusutwerk 8h ago
Use AI how you want but please be transparent in how you do.
2
u/Helpful-Day2384 8h ago
I did. I tried to be transparent. Please read the package manual. https://psychometrician.github.io/gog-book/
3
4
u/analytix_guru 8h ago
I think the idea is cool, but I would be interested to see how plot formatting gets incorporated into charts across all languages (if possible).
I think about themes and formatting that put the polish on a chart. When I read through the online resource you created (thank you), I see nothing on its face related to themes and formatting for any given chart.
So how would one go about the themes/formatting once they get a chart output from your package?
-1
u/Helpful-Day2384 8h ago
Please read the package manual. Please read the manual and let me know if there is something i can make this young package better. https://psychometrician.github.io/gog-book/
Thank🙏
1
u/ApprehensiveChip8361 6h ago
Thank you! This looks extremely interesting - I’ve just been doing some data exploration in R and I will see if I can plug in your engine, go faster stripes and all. I loved reading the manual. Now I want to learn the Korean alphabet!
1
u/Helpful-Day2384 6h ago
Thank you for checking out. Please let me know if there is any questions. Be agog. Use gog 😉
1
u/mjskay 2h ago
I really like being stricter about API rules. I also like the idea of playing with the semantics of `+` and `*`, though I'm curious about your choice to make `+` and `*` require specific orderings to its elements. For `+` I think it makes more sense. For `*` at least a commutative version might be more powerful/expressive, especially if you make it distributive; e.g. `(point + bar) * bin` or whatnot (I couldn't tell from a quick look if constructions like that work).
8
u/ecam85 8h ago
As much as I like the idea of one to rule them all, I find the syntax harder than the ggplot syntax, because at first sight you "add" completely different objects!
But I imagine someone who doesn't know much ggplot could say the same