Live data from Hacker News

How to Generate FiveThirtyEight Graphs in Python

dataquest.io

11–20 of 56 posts

Re: How to Generate FiveThirtyEight Graphs in Python

#11
post #9

Just make a completely wild and inaccurate prediction loosely based on fake polling data, and then graph it. Like they did when they predicted Trump had only a 1% chance of becoming president.

In the weeks leading up to the election, they were putting Trump's odds at 1/4, and pretty roundly mocking/cautioning against others who were putting him at 1%. On mobile, so I can't check by hovering, but I don't think they ever put his chances below 1/10: https://projects.fivethirtyeight.com/2016-election-forecast/

> they were putting Trump's odds at 1/4, and pretty roundly mocking/cautioning against others who were putting him at 1%.

Yeah, of all the groups making predictions they gave Trump the highest odds of winning [0].

[0] https://www.buzzfeed.com/jsvine/2016-election-forecast-grade...

Re: How to Generate FiveThirtyEight Graphs in Python

#12

Just make a completely wild and inaccurate prediction loosely based on fake polling data, and then graph it. Like they did when they predicted Trump had only a 1% chance of becoming president.

Haha, you're hilarious and exceedingly smart. That being said, you're lying. 538 gave 28% chance of a Trump win: https://projects.fivethirtyeight.com/2016-election-forecast/

Re: How to Generate FiveThirtyEight Graphs in Python

#13
post #5

Pretty cool, but I actually prefer the standard style in matplotlib.

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.

Re: How to Generate FiveThirtyEight Graphs in Python

#14
post #7
post #5

Pretty cool, but I actually prefer the standard style in matplotlib.

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

Re: How to Generate FiveThirtyEight Graphs in Python

#15
post #14
post #7

Earlier 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 :)

I like them. :)

Re: How to Generate FiveThirtyEight Graphs in Python

#16
post #14
post #7

Earlier 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 :)

The plots are pretty nice. The serif font for the axes captions and the monospaced font for the axis labels are jarring.

Re: How to Generate FiveThirtyEight Graphs in Python

#17
post #5

Pretty cool, but I actually prefer the standard style in matplotlib.

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.

As someone who's moderately colorblind the color change is really helpful, so even for bland data visualizations it's actually better.

Re: How to Generate FiveThirtyEight Graphs in Python

#19
post #14

Earlier quoted context omitted.

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

I like them. :)

Thanks :)

Re: How to Generate FiveThirtyEight Graphs in Python

#20

Or learn JavaScript and just use D3. It does this out of the box given the dataset.

D3 has an extremely steep learning curve, especially for people who are not familiar with JavaScript.

There are easier ways to make these kinds of plots.

Post reply on HN