HNHacker News
TopNewBestAskShowJobs

mircealex

141 karma · joined September 9, 2017

submissionscomments
mircealex··on How to Generate FiveThirtyEight Graphs in Python
Agree, the default style looks much better in 2.x. It's good enough for most use cases, but it's still quite far from publication level, IMO.
mircealex··on How to Generate FiveThirtyEight Graphs in Python
Apologies, I only examined the first couple of graphs after the first "FiveThirtyEight" keyword, for which you don't have titles, subtitles etc.

The graphs on your article look really nice, but they are quite far from resembling FTE's, IMO.

mircealex··on How to Generate FiveThirtyEight Graphs in Python
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 example totally misses the point.

mircealex··on How to Generate FiveThirtyEight Graphs in Python
Simply because we're interested to see if we can do in Python whatever we can do in other programming languages / software. We don't really want to learn a new programming language for every thing we can't do in Python yet.

Also, it took 17 lines of code to generate the graph in the tutorial, among which 6 lines were to add labels (excluding from the total the lines of code for reading in the data or importing modules). The teaching approach makes it look that long.

You could also write some functions if you coded this kind of graphs regularly, and make the whole process a breeze.

mircealex··on How to Generate FiveThirtyEight Graphs in Python
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.