More info in this video: https://channel9.msdn.com/Events/useR-international-R-User-c...
How to Generate FiveThirtyEight Graphs in Python
31–40 of 56 posts
Re: How to Generate FiveThirtyEight Graphs in Python
#32Why go through all this trouble? You can accomplish the same plot in less than 10 lines of code in R, which includes a 538 theme.
Re: How to Generate FiveThirtyEight Graphs in Python
#33Why go through all this trouble? You can accomplish the same plot in less than 10 lines of code in R, which includes a 538 theme.
I'd love to see those 10 lines!
Re: How to Generate FiveThirtyEight Graphs in Python
#34Or learn JavaScript and just use D3. It does this out of the box given the dataset.
D3 looks really nice, but half the time I try to use it for something that doesn't closely match a Bostock example, I end up giving up and just coding it myself with SVG primitives. I don't understand the motivation behind D3's complex API.
This sounds trite, but it's enormously powerful and it's what makes D3 worth learning.
Re: How to Generate FiveThirtyEight Graphs in Python
#35Earlier quoted context omitted.
I agree – it's interesting how one is initially drawn to, yet eventually tires of these sorts of plot styles. While Seaborn strikes a good balance, clear and simple monochrome plots never go out of fashion. This is just as much the case when building fancy interactive plots using Shiny/Plotly etc.
Interesting, @bede @v3gas I would love to hear your thoughts on my plots -- http://abhirag.in/articles/price_data_present.html Too fancy? Too plain? Kinda ok? Kinda new to matplotlib, so your feedback would help :)
Just one idea, on your vegetable chart, you have onions as a red line and tomatoes as yellow. I would swap them around, as I automatically associate tomatoes with red.
Re: How to Generate FiveThirtyEight Graphs in Python
#36Re: How to Generate FiveThirtyEight Graphs in Python
#37Earlier quoted context omitted.
I'd love to see those 10 lines!
I have a R/ggplot2 data visualization tutorial which gets a similar style in about 10 lines: http://minimaxir.com/2017/08/ggplot2-web/
Your example is potentially misleading in this discussion for anyone who won't bother to go through that article you linked to.
I'm not saying you can't do the graphs in under 10 lines of code, I'm just saying that your example totally misses the point.
Re: How to Generate FiveThirtyEight Graphs in Python
#38Why go through all this trouble? You can accomplish the same plot in less than 10 lines of code in R, which includes a 538 theme.
R doesn't include a 538 theme, even though ggplot2's theme_minimal() is close.
Re: How to Generate FiveThirtyEight Graphs in Python
#39Earlier quoted context omitted.
I have a R/ggplot2 data visualization tutorial which gets a similar style in about 10 lines: http://minimaxir.com/2017/08/ggplot2-web/
You're not adding a title, a subtitle, a signature bar. You're not bolding the line at y = 0, you're using block-style legends instead of adding customized labels. All these will require extra code. Your example is potentially misleading in this discussion for anyone who won't bother to go through that article you linked to. I'm not saying you can't do the graphs in under 10 lines of code, I'm just saying that your e…
Re: How to Generate FiveThirtyEight Graphs in Python
#40Earlier quoted context omitted.
It really depends on why you're generating the graphs for. If you needed a visualization for a storytelling article, I really doubt you'd prefer matplotlib's bland standard style. If you just want to visualize some data fast for yourself, then, yeah, the standard style is really great - it's readable and saves you time.
> I really doubt you'd prefer matplotlib's bland standard style (MBSS) To be fair, MBSS got much better in the recent version 2.x Before (version 1.x), I always had to use seaborn and/or modify parameters, but now the default style is good enough for most of my use cases.