Teaching Pandas and Jupyter to Northwestern journalism students
californiacivicdata.org
Teaching Pandas and Jupyter to Northwestern journalism students
1–10 of 47 posts
Re: Teaching Pandas and Jupyter to Northwestern journalism students
#2I know everyone loves the reproducibility Notebooks supposedly bring to the table, but without a doubt my favorite part is the ability to export super-unattractive matplotlib charts as PDF, clean them up in Illustrator, and suddenly find yourself with publication-quality graphics. Knowing you're producing something more than just some numbers to toss in a story can be a strong sell to a lot of folks.
Re: Teaching Pandas and Jupyter to Northwestern journalism students
#3Re: Teaching Pandas and Jupyter to Northwestern journalism students
#4It has the basics of a Jupyter notebook - filter, sum, average, plot. So far it's attracted a pretty interesting audience including journalists, but also lawyers and consultants.
www.CSVExplorer.com
Re: Teaching Pandas and Jupyter to Northwestern journalism students
#5 But pandas’ magical simplicity makes things like computed columns immediately intuitive:
> data['% of total'] = data.amount / data.amount.sum()
Is that immediately intuitive? I'm staring at this trying to understand what it's doing. Is the / operator overloaded? data.amount is one particular amount, and data.amount.sum() is the sum of all amounts? Why does the "computed column" property goes on the same data object as the actual data? Maybe it's immediately intuitive if you've used pandas.Re: Teaching Pandas and Jupyter to Northwestern journalism students
#6Re: Teaching Pandas and Jupyter to Northwestern journalism students
#7But pandas’ magical simplicity makes things like computed columns immediately intuitive: > data['% of total'] = data.amount / data.amount.sum() Is that immediately intuitive? I'm staring at this trying to understand what it's doing. Is the / operator overloaded? data.amount is one particular amount, and data.amount.sum() is the sum of all amounts? Why does the "computed column" property goes on the same data object a…
When you see amount / sum, you think of how a list can be divided by what appears to a scalar.
When they see it, they parse it out for what they naturally understand a percentage to mean. And all is well.
Re: Teaching Pandas and Jupyter to Northwestern journalism students
#8I really like Jupyter, but somehow I'm not in love with it. Like, every time I fire it up to use it for quick data analysis, I seem to inevitably end up back in sublime + bash, sending plots to disk. Am I the odd one out?
Re: Teaching Pandas and Jupyter to Northwestern journalism students
#9I really like Jupyter, but somehow I'm not in love with it. Like, every time I fire it up to use it for quick data analysis, I seem to inevitably end up back in sublime + bash, sending plots to disk. Am I the odd one out?
If you know what kind of short analysis you want to do, the benefits of Jupyter are not obvious. If you have to do a lot of exploration, and do longer analyses then it becomes indispensable.
Re: Teaching Pandas and Jupyter to Northwestern journalism students
#10But pandas’ magical simplicity makes things like computed columns immediately intuitive: > data['% of total'] = data.amount / data.amount.sum() Is that immediately intuitive? I'm staring at this trying to understand what it's doing. Is the / operator overloaded? data.amount is one particular amount, and data.amount.sum() is the sum of all amounts? Why does the "computed column" property goes on the same data object a…
OTOH I think it's immediately intuitive if you are not a programmer. :) When you see amount / sum, you think of how a list can be divided by what appears to a scalar. When they see it, they parse it out for what they naturally understand a percentage to mean. And all is well.
Given I had ten weeks to cram a lot of material in but did want to show them some amount of programming, this worked pretty nicely.