This year, 2018, is the year that the number of data scientists doing Python
equals, maybe even exceeds, the number of web developers doing Python.
That's why I've invited Jonathan Morgan to join me to count down the top 10 stories
in the data science space.
You'll find many accessible and interesting stories mixed in with a bunch of laughs.
We hope you enjoyed it as much as we did.
This is Talk Python to Me, recorded November 25th, 2018.
Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the
ecosystem, and the personalities.
This is your host, Michael Kennedy.
Follow me on Twitter, where I'm @mkennedy.
Keep up with the show and listen to past episodes at talkpython.fm.
And follow the show on Twitter via at Talk Python.
Jonathan, welcome back to Talk Python.
Hey, Michael.
Thank you so much.
It's super awesome to be back.
And it is great to have you back.
Where have you been?
I've been like a thousand places.
I have not been podcasting.
I feel a little bit guilty about it.
Very much miss the partially derivative audience.
Very much miss being on the show.
I don't think we did this last year, so I'm super pumped to be doing this again.
But it's because I've been doing two things.
I have a company, New Knowledge.
We're focused on disinformation defense, so a lot of data science.
Ultimately, we like to think that we're protecting public discourse, improving democracy, big
things like that.
Not at all pretentious.
That is a really awesome goal.
And I suspect you've probably been busy, right?
I'm just saying.
It's a lot.
I mean, we've perhaps bitten off more than we can chew.
It's like every month we expect that to be fading from public consciousness.
Like, all right, this is the month when people are going to get tired of talking about
online manipulation and Facebook and Twitter and everything.
And then every month, it's like it gets worse, which is, you know, it's like it's a thing.
But it's great.
And then there's also Data for Democracy, which is the nonprofit that I work on as well.
And that's a community of about now 4,000 technologists and data scientists who are working
on social impact projects.
So also kind of mission aligned.
You know, democracy is cool.
But yeah, between those two things, I haven't had as much time to podcast as I would have
liked.
But I'm glad, you know, back on the saddle.
Well, I'll say if you're going to hang up your headphones and your microphone, you've hung
them up for pretty good reasons.
Like, those are pretty awesome projects.
Thanks, man.
Thanks.
Yeah, it's exciting times.
Lots of lots of good stuff to work on.
Yeah.
Well, you know what else is exciting?
I would say data science is as popular as ever, wouldn't you?
I agree.
I feel like data science is coming into its own a little bit.
It's actually it's been interesting to see some of the transition towards just some more
like established workflow driven team based data science, like a lot of things that I
think software engineers are probably super familiar with and comfortable with that were
still pretty nascent the last time that we talked even a couple of years ago.
So, yeah, it seems it might be here to stay.
I don't know.
I'm not going to call it, but I think it's possible that it will be here for a while.
I definitely think it's a thing.
You know, it's starting to show up as like full on courses at Berkeley and things like that,
which is pretty awesome.
We'll come back to that.
But I found a cool definition of a data scientist, an individual who does data science.
And I thought I'd throw that out there and just see what you thought in light of what
we're about to talk to.
So this guy named Josh Wills, I don't know him, but Twitter knows him.
And he said a data scientist is defined.
He is.
At least this tweet is.
He said that a data scientist is defined as a person who is better at statistics than
any software engineer and better at software engineering than any statistician.
What would you say?
Just like burn left and right.
I think those are both good.
I think it's a positive representation of a data scientist.
I think that that's actually true.
I don't think that Josh is trying to demean anybody with that tweet, although it kind of
sounds like it, you know, like take that statisticians.
My software engineering skills totally blow yours out of the water.
But I think that's right, because it is like this weird hybrid where the you're producing
software.
Ultimately, I think software engineers might disagree with that.
The data scientists are producing software.
And that's fair.
That's fair.
You can debate whether a notebook is a piece of software.
I think it's a very interesting debate.
That's a good point.
And actually, it's interesting how much people are trying to like turn notebooks into runtime,
like actual production execution environments.
But that's probably a whole we could go down that rabbit hole all day.
But it's true.
I think that's actually that really captures it.
It gets that blend right in the middle of the Venn diagram between stats and software engineering.
Yeah, it's cool.
Yeah.
So with that, that very precise definition, what we have done is, is mostly you, Jonathan,
have gathered up a bunch of topics that represent some of the bigger pieces of news from 2018.
And we're going to go through them for all the data science fans out there.
Yes.
I mean, it was a joint effort.
It was a collaboration.
I feel like we've touched on some important things here in our list.
I don't know if you were thinking along these lines, but I had a little bit of a theme with
a lot of the stories that I was choosing.
There's kind of a AI may be coming to kill us all or save us all.
It's like, it's one of the right now.
It's like, it's like dark times for machine learning.
It's very interesting.
It might accidentally kill us while trying to save us.
Right.
It's like really well intentioned.
Like, oh, I can see what you're trying to do there.
I mean, I'm dead, but I can, I can see.
You know, you had my best interest in mind.
All right.
Thanks for thinking of me, man.
Right.
Good try.
A forever.
That's right.
So would you say that the AIs need a babysitter or maybe the other way around?
Whoa, look at that.
That was like smooth like butter.
Speaking of babysitters, I'm not sure how many people have seen this.
It was kind of an odd little story, but I wanted to, it's like perfectly encapsulates
well intentioned, but perhaps unforeseen consequences, air quotes AI.
So a software company called Predictum thought to themselves, you know, it's really tough
to find a babysitter.
And it's true.
You know, you're a parent.
I'm a parent.
When you're trying to find somebody to watch your kids, you're like, well, maybe my friends
use somebody who worked out or maybe I use some online service and they do background checks
or whatever.
But it's tough to feel comfortable and confident that the person who's going to come into your
home and be responsible for your child is a good person, or at least not somebody who
will put them in danger.
Like somewhere in that like sweet spot.
Especially when the baby, when it's a baby, when the baby doesn't speak, it can't report
to you.
Yeah.
The babysitter beat me or the boyfriend came.
Like it's, you know, you don't even write.
It's just a baby.
It doesn't know.
Exactly.
It can't, it can't say.
Right.
So how do you know?
Well, the old fashioned way is to, is to use some of the social signals that I mentioned
before.
But the new AI way is to use social signals from social media.
So this gets into kind of creepy territory, I think.
So, but basically parents have started to turn to this application.
And, and what, what the system does is that it crawls the social media history of potential
babysitters and it ranks them on like a risk scale.
It gives them a risk rating.
And so it risks them on all sorts of, or it rates them on all sorts of things like
drug abuse, bullying, harassment, disrespectful, bad attitude, all sorts of things that I guess
you could get from social media.
Although I think for most of us, like we would get a five for all of those things because like
that's just how social media works.
Like that's what we want out of it, you know?
But nevertheless, like relatively speaking, I guess you get some kind of rating.
So it's caused a little bit of controversy for reasons that you might expect.
Like how would you classify?
So I, I should take a step back and say, I'm not sure if most of your listeners will
be familiar with how an AI system might even go about determining these things.
So how would I read your social media content and make a judgment that you were at risk of
bullying or harassment or disrespectful, but there's no way of knowing because the system
doesn't explain.
So it might be something really simple.
Like it just looks for quote unquote bullying words, like some keywords that they pulled out
of a dictionary that are related to bullying.
So really simple.
Or it might be that it's trained a machine learning classifier that it's somehow got a hold of
a bunch of example, bullying tweets or bullying Facebook posts or whatever it is.
And it said, Oh, I can now recognize bullying content versus non bullying content.
And it's trying to use that as a rating system.
Who knows?
Nobody knows.
But the same, the idea basically is that it's scoring any potential babysitters and it's
giving these to parents on a scale of one to five.
So somehow there's a difference between a risk assessment of one on the bullying scale, a risk assessment
of two on the bullying scale.
And so as parents, we'll have to decide in this kind of like arbitrary scale, am I comfortable
with a disrespectful score of three, but a bad attitude score of one?
I'm not really sure.
What are you teaching my child?
What kind of disrespect are you teaching my child?
But AI system has warned me that based on your social medias that maybe, you know, you're not
like a voice god or whatever it is.
So in any case, it's like it kind of gets at this idea that like, I think there's this
dream that we can look at people's digital exhaust on the internet, what they say on social media,
how they spend their money, where the places that they've been and get some kind of picture
about who they are as a person.
So that's the big leap.
Like you could probably make a guess about how people will behave on social media based
on how they behave on social media.
Or you could probably get a sense of what people are likely to buy in the future based on what
they purchased in the past.
But that like leap to say, now I know something about you as a person, like how you'll behave
in other environments where I've never observed you before.
That's what this application is doing.
And I think it's like a generally a trend in AI.
And I'm not sure anybody believes that's actually possible, which is where it's kind of tricky.
Like, should we use these types of tools and hiring and recruiting and other types of assessments
that we're making about really, you know, delicate, sensitive things like babysitters or maybe
less delicate and sensitive things?
Like, should you be my tax accountant if you get a four out of five for bullying on social
media?
Like, I don't know.
Maybe it's a good thing.
Maybe you want an aggressive tax account.
I don't know.
Exactly.
But what is a four, relatively speaking, to a three for bullying?
Like, I don't know.
Could you give me something on like a, you know, who's the most harassing person on social
media?
And we'll just call them a five.
And then everybody else is ranked on that person's scale.
I'm like, I'm trying not to call out anybody in particular.
Like, I'm really, really trying not to call out anybody in particular.
But I mean, I don't know.
So anyway, that's the debate that it's that this is stirred.
So like, predict them.
I'm sure.
Well-intentioned.
I'd love, you know, to know more about it.
It sounds so like Orwellian and creepy.
But let me read you just the quote from one of the founders of people that works there.
Because it sounds so like something you would want.
It says, if you search, this is like one of the people from Predict I'm speaking.
It says, if you search for abusive babysitters on Google, you'll see hundreds of results right
now.
There are people out there who either have mental illness or just born evil.
Our goal is to do anything we can to stop them.
And when you think of that description and your brand new baby alone, like, you really
don't want to put them together.
So it sounds so good.
But it's also got this really dark side, right?
It does.
Yeah, I agree.
Like, I think that the Predictum folks are pretty well-intentioned.
But it does highlight what is the unintended consequences of maybe giving too much weight to the output
of a data science model.
Like, just because we can package it in a data science workflow, just because it kind
of walks and talks like something that is algorithmically decided and therefore objective, like, it's
not necessarily objective at all.
Like, it's just as easy for me to encode my subjective bias into a machine learning model
as it is for me to act on that bias in real life.
So it's difficult for people who aren't familiar with data science to, I think, recognize that.
And it has these really strange implications.
What about all those babies?
Not the babysitters who are actually abusive.
Like, for sure, let's get rid of those.
But like, but what about the, you know, what about the people who have, who are otherwise excellent
babysitters, but at one point, you know, said something mean about a TV show they didn't like on social media, and their
bullying ranking went through the roof.
And so now they can't get jobs as a babysitter anymore.
Like, what are we, I think we need to think about how we're being transparent about the algorithms that we're using to make these sorts of choices.
And, and of course, that's a difficult thing for those developing those algorithms, because you want to, you know, it's your, it's your, it's your sort of
special sauce, your, you know, your secret sauce for your product.
So there's a real tension there.
And I'm not sure we're getting it right just yet.
Yeah, it's, it's pretty crazy.
I guess a few parting thoughts is like, okay, for babysitters, right?
That's usually a part time small thing for most folks.
It's not right.
If you're babysitting career goes a little sideways, you could do something else.
But a lot of this is applied to all sorts of jobs.
Like they talked about a company called Fama that uses AI to police all of the workers at like these companies or how Amazon actually canceled what became a clearly biased algorithm for hiring across all of Amazon.
Then it becomes a sort of have more serious social effects, right?
Yeah.
And I think this is coming at a moment when it's like a reckoning for Silicon Valley and technology and machine learning in general.
We've been, I think, almost naively assuming that everybody who uses our technology will use it with the best intentions or the intentions that we had when we developed it.
And I think the theme of 2018 is like actually not.
It's actually possible for things to go horribly wrong in ways that you didn't intend.
And I think it's good.
I think it's a good time to have this debate about how close are we actually to encoding our real life values into our digital technologies.
Like maybe, maybe we're just not that good at it yet.
Yeah.
It's, we're definitely new on it.
Yeah.
And I feel like the goodwill tours.
Exactly.
I feel like a lot of the goodwill has kind of left that, that space a little bit.
So we've got to be careful.
Something that is not new was invented in the 1600s and the Renaissance, right?
Like we're talking the scientific paper.
What?
You know, Kepler's orbiting of the planets and all those things, right?
Written up.
So actually the scientific paper turned out to be a big invention.
It was, it used to be you have to write books or you just wouldn't write it down your, your inventions.
Or they'd be like private papers, like Einstein wrote to Niels Bohr or something like, we just have to run across those papers, right?
But it turns out that the scientific paper has been around and basically unchanged for like 400 years.
I would say science has changed and certainly the dependence upon computing has changed, right?
Yeah, absolutely.
I mean, I'm, I'm not in most of the like quote unquote hard sciences and even in social science.
I think almost the majority of the work is, I have no basis of that.
That's probably fake news, but, but it does, you know, a lot of it is data driven.
It requires some type of computation for sure.
And difficult to reproduce papers without having access to that data and computation.
Right.
And a lot of times the computations were not published, just the results.
But I think that's starting to give way.
And one of the articles, this was published in the Atlantic and it's, it's a serious research project really.
It's called the scientific paper is obsolete.
Okay.
That's a big statement.
That is a big statement, right?
And the, the graphic is super intense, right?
On that homepage.
Yes.
So it's, it's this sort of traditional scientific paper with lots of, there's probably 15 authors and all sorts of, you know, stuff on there.
And it's literally on fire.
And it turns out to be a really interesting historical analysis, like sort of a storytelling of how do we go from scientific paper to closed source software with egomaniac sort of folks leading it like Mathematica to Python and open source and Jupyter and all that.
Right.
Yeah.
And I mean, I think it's interesting to see even the shift away from the traditional publishing model for anybody who's gotten into any type of research before that.
It used to be that research only happened primarily at academic institutions and everything goes through peer reviewed journals.
But almost like in the tradition of open source.
And I think it's like, yeah.
Yeah.
So it's like, yeah.
Yeah.
So it's like, yeah.
It's like a lot of people posting on something called archive.
So they'll write like in the style of a peer reviewed paper, but before it's peer reviewed, because partially because the technology changes so quickly, but also because they want to be open and transparent about their work.
They are uploading basically to this website called archive where you can search academic papers prior to them being published in some type of peer reviewed journal or in a conference or whatever, which is super interesting.
And I think it gives people a lot more access to a lot more techniques.
It feels kind of like posting your code to GitHub.
And this is anecdotal, but at least what I find is that the code that sits behind some of these papers is usually available on GitHub.
Like the same types of authors who post to archive, I find are the ones that also say, oh, by the way, here's the GitHub repository so you can go run it yourself.
And like, here's the sample data set that I used, which is like really gets at this idea, which really gets at this idea that there's something to be said about reproducing these findings for these, especially for these like complicated.
And I mean, I'm thinking mostly from the perspective of new machine learning developments, but these like these complicated new modeling techniques have to be replicable to be usable.
And in the same way that like your open source project is kind of only as good as it is usable.
So you might have the best new like JavaScript NBC framework.
Those probably aren't cool anymore.
But like when I was a software developer, everybody, blah, blah, blah.
But like, whatever, you might have the coolest new like JavaScript app.
But like if nobody uses it, it doesn't really matter how good it is.
Like the ones that ultimately the community rallies around are the ones that are the most usable, the most accessible, the most transparent.
And I think it's interesting to see that creeping into research as well.
So, I mean, I really dig the idea that perhaps it's a model that just model that needs to change.
Yeah.
And they talk a lot of this is a pretty deep research piece here.
It's quite the article.
It's not just a few pages.
And it really digs into the history of Mathematica, how it became really important for computation
and research.
But it just didn't really get accepted.
And then along comes Perez and Granger and those folks with their IPython and their open source and their not centralized way of doing things.
And it's just really interesting how that's become embraced by science and data science.
And I think how it's actually influencing science.
Like I hear all these scientists who I speak to talking about embracing open source principles and styles and more engineering.
And I think all of that is being brought to them from this.
Oh, yeah.
And I think it's even being embedded in the way that students are educated now, which is totally different.
I mean, I think in the article they talk about one of the authors of one of the open source projects, open source Python projects, like has a faculty appointment in the stats department at Berkeley now.
And I know that Brian Granger's work and his team focused on Jupyter Notebook is I think they're also based at Berkeley or not at Stanford.
But I mean, they're embedded inside a university department and they do some teaching as well.
And they're starting to teach courses that are entirely based around this like open source, like open source science, open science workflow.
So like Python as a programming language and then Jupyter Notebooks, which is if you're not familiar with Jupyter Notebooks, it's basically a way to like execute snippets of code sequentially, but in a web based environment.
So, you know, you can write a little bit of code, you can run it, you can see what the output is, and then you can build on that.
And then you can share your notebooks as you go.
So in the same way that like it basically captures the rough draft process of finding your way towards a data science solution or really any type of programming solution.
But often they're used by data scientists.
And these sorts of tools, I think, have made it possible to share like your entire thought process, which is a really important part, like kind of like showing your work to getting to the results that you need to, which I think is maybe more specific to data science and machine learning than it is to most types of software engineering.
Because like in software engineering, it works or it doesn't.
And it works fast enough.
Then like, all right, dope.
Like, let's move on.
Like, check that box and move on to the next task.
Push the button.
It did the thing.
We're good.
All right.
Fantastic.
I'm going to close that Jira ticket and march right along.
That is true to a certain extent in data science.
Like, you know, your code runs or it doesn't.
But often we're trying to evaluate like what's the quality of the findings or like what's the quality of the predictions that you're making and what tradeoffs is your model making.
And like all these like more like fine grained decisions.
It really matters like what's behind the curtain with most of the data science work and most of these like most of these research papers.
And so I think that's why these tools have basically like figured out how to capture all of that in a way that makes it really useful.
Like really usable, really easy to share, really open and transparent, which is why I think they've caught on.
Like they've caught on because they're usable and they have this great byproduct, like this great knock on effect that they make all of our work more transparent.
I see a lot of promise and I definitely see things going this way.
I think it's really good.
One of the things is you were describing that to me that really resonates is I feel like a lot of science is dull and boring to people who are not super into it because it's been massively sterilized down to its essence.
All right.
Here's the formula.
You plug this in and you get the volume of gas by temperature or whatever.
Right.
You're like, well, who cares about that?
That's so boring.
Right.
But if the story is like embedded with it and the thinking process that led up to it's so interesting, like one of the most interesting classes I ever had was this combination of sort of the history of mathematics and something called real analysis for the math people out there where we basically recreate calculus.
But from like the thinking about the building blocks and it was just so interesting because it had all the history of the people who created it in there.
Whereas if you just learn the formulas, you're like, well, this is boring.
Forget this.
This has the possibility of keeping more of the thinking and the exploration in the paper and in the reporting.
Oh, yeah, absolutely.
Which I agree is like is fascinating because it is an investigation at the end of the day.
And, you know, one of the authors of the Jupyter, like one of the leads of the Jupyter team, it's kind of meta because like his development of Jupyter is now part of this like upper level data science course at Berkeley in which all the students use Jupyter for all of the data science work that they're doing.
Like it's cool.
It's like, you know, it's it's it's notebooks all the way down.
Yeah.
Although I didn't know.
I mean, I know that you like pulled this out of the article, which I thought was is really spot on that the name Jupyter is actually in honor of Galileo.
So like going back to an early scientist, like going going way back into history.
So it's like we haven't forgotten where we came from, like the scientific method and how that gets encapsulated in these this structure that we've all accepted as, you know, research papers that we're standing on the shoulders of giants.
We're just moving forward into this new like kind of rapidly iterative, open source, more transparent era, which is cool.
Like why shouldn't research be democratized with all other types of information?
Like thank you, Internet.
And we're not forgetting where we came from, which I think is really important.
Like we don't want to throw the baby out with the backwater.
Yeah, absolutely.
There's so many interesting parallels between sort of early scientific discovery and open source versus closed source.
We'll come back to this actually.
But like part of his quote that you were pointing out is like Galloway couldn't go anywhere and buy a telescope.
So he had to build his own.
It's sort of like, you know, we just put it on GitHub and we had to just make it.
It wasn't there.
It's awesome.
You got to scratch your own itch.
You know, if you're fine, I'll build it myself.
I was going to take the weekend off.
But, you know, whatever world.
Come on, we're doing this.
This portion of Talk Python to Me is brought to you by us.
Have you heard that Python is not good for concurrent programming problems?
Whoever told you that is living in the past because it's prime time for Python's asynchronous features.
With the widespread adoption of async methods and the async and await keywords,
Python's ecosystem has a ton of new and exciting frameworks based on async and await.
That's why we created a course for anyone who wants to learn all of Python's async capabilities,
async techniques and examples in Python.
Just visit talkpython.fm/async and watch the intro video to see if this course is for you.
It's only $49 and you own it forever.
No subscriptions.
And there are discounts for teams as well.
So this next one, we were speaking about advanced machine learning and AI and analyzing social media sentiment analysis.
This next one is more about algorithms and less about AI.
It probably could be implemented with if statements, but it's actually pretty evil.
And just the focus on algorithms at the core is pretty interesting.
I thought so.
Although I would like to point out that I think half the time that people are talking about AI,
in air quotes, they're talking about a thing that could have been implemented with an if statement.
And in fact, I would argue, I know that there's technical definitions of AI,
but what most people mean is software making a decision for me.
And it's like, well, there is a way that software does that.
It is an if statement.
It's AI.
If you've written an if statement in your code, your freshman programming class,
you've written AI.
You just hang your head up.
It could go crazy and do a switch statement.
It may seem sort of wow.
But yeah, one of these branching things.
The decisions are endless.
You know, theoretically endless.
As many decisions as you want to spend time programming by hand.
Yeah.
So this one goes back to the sort of everything's going to be used for good, right?
I'm not sure how anybody thought this could have been used for good, actually.
Like this algorithm was just intentionally designed to screw everybody over.
So, you know, this episode is going to come out around the holidays and people will be traveling.
People will be traveling.
And if you are traveling with your family, you may have had this experience where you're like
trying to buy cheap plane tickets because there's like you and like all your kids and you're
traveling across the country at an expensive time to travel.
And you're trying to like get to your parents' house in time for Christmas.
And it's really stressful and you're annoyed.
And then you book your tickets and you try and get seats together and you can't do it.
And you're like, wait a second.
Come on, airline.
Like, you know, I booked all these tickets at the same time.
I'm clearly traveling with like a couple of kids like under 10 years old.
Come on.
Like this is this is hard enough as it is.
Shake fists.
Surely they know they should put the kids with the parents, right?
Right.
That's like a common.
It's like, why is this system not smart enough to recognize that?
But it turns out it is smart.
It's just smart in exactly the evil opposite way that you don't want it to be.
Because it turns out that at least in the UK, some airlines are using algorithms not to put families together, which is what we all assume they would be doing, but to intentionally split us up.
And you might ask yourself, why?
Like, are you just like, you know, like a sadist?
I don't know.
Like, what's the somewhere?
There's like, you know, the developer of this algorithm at the back of every airplane twiddling his thumbs like Mr. Burns and like laughing maniacally.
Exactly.
But it's because that way they can charge people more money so that they pay to sit together.
They're like, oh, do you not want the inconvenience of asking 47 people whether or not they're going to switch with you so that you can sit with your like your child who may or may not have the like emotional fortitude and maturity to to not like freak out by themselves on an airplane going across the country.
Yes.
So this apparently this is common practice with a number of airlines.
They are algorithmically looking at people who share last names.
So if you have a common surname, you are you will not be seated with each other when the seats are assigned, which seems really uncool.
I just come on.
So you can pay for the reserve seat, the extra twenty seven dollars per traveler or whatever.
Right.
How much do you care about your kids or like how uncomfortable are you with asking a bunch of strangers during the holidays?
To switch with you when it becomes that like that like really complicated calculus problem where you're like, well, my wife's sitting seven seats up and and she's at the window.
But we're also traveling with my son who's four seats up on the aisle.
So if you switch with her and this person in row 47, which is with him, then I actually think that we could get, you know, approximately close to each other.
It's like it's absurd.
So if you don't want to go through that, yeah, you can just like pay an extra 50 bucks.
But like wouldn't the decent thing to do just be.
It's so evil to split the families apart so that they'll pay to go back together.
Although, to be clear, I'm well out of the range where this matters.
Right.
My kids could sit alone and it wouldn't be that big of a deal.
But my thought is, all right, evil airline and your algorithms.
I see your play and I raise you in a lone child at three in the back by the business traveler.
I'm going to bed now.
Thank you very much.
I love it.
Just like probably shouldn't implement it.
But it seems like, you know, you could just turn it around.
I love it.
It's like, yeah.
Oh, you know what we did?
We skipped nap.
You know who had and I just like dumped like three, you know, pop rock sugar packets down their throat right before we got on the plane.
Because, you know, in 30 minutes they're going to freak out.
Yeah, exactly.
I like it.
Let's see like how many kids we can stack up, how many screaming children we can stack up on airplane at holiday.
It's really bad.
Something like this actually happened to my daughter.
Not from algorithms, just other bad, bad stuff.
So it's not great.
And I do think it's really evil, the airlines, to do this.
It is.
But what was interesting is that it actually got referred to in the UK.
There's a new government organization called the Center for Data Science Ethics and Innovation.
So they actually have.
That's crazy.
It's cool, right?
It's cool.
So like.
Yeah, it's very cool.
Yeah.
And like we have similar types of stuff here in the US.
There's an Office of Science and Technology Policy that's in like in the administration, like it's part of the White House.
And so anybody who's kind of follows that sort of stuff or is interested in data science, like that's where our first US chief data scientist sits is in the OSTP.
I don't think there is a data science, chief data scientist in the current administration yet.
But there's a chief technology officer.
And anyway, it's where like it's where the geeks sit.
So but in the UK, there's a Center for Data Science Ethics and Innovation.
And this case was actually referred to them.
So I think they've just formed and they just formed.
And basically I got handed like this is the most offensive thing that algorithms have done.
Good luck with it.
Center for Data Science Ethics and Innovation.
Like fix this, man.
They're like, great.
This is why we exist.
Oh, my gosh.
It is.
I guess like, you know, it's like because it's a real softball.
You know, it's like what would the ethical thing to do it be to do in this situation?
Like, I don't I don't know.
Gosh, I'm I'm spent.
I couldn't I couldn't possibly come up with a better, more ethical alternative.
than splitting parents up from their children.
Even bureaucrats could totally solve this.
Yeah, for sure.
Yeah.
So, you know, that's a thing.
I mean, it seems like one of those like open and shut cases.
I think government ministers are calling it exploitative.
So that's usually not a good sign for your business practices.
No, but I.
Yeah, no, that's a bad start.
It's a bad start.
I think they may.
You know, they've got nowhere to go but up.
We can say that, you know.
That's kind of like a pun, I guess, because there are airplanes that go up in the air.
But anyway, but it brings me to something that I was really excited to talk about with all
of your listeners because it's something that's important to me personally and something that
I'm involved with is actually an ethics project for data scientists so that hopefully we could
prevent these types of mishaps in the future.
So as I mentioned at the top of the show, I'm involved in an organization called Data
for Democracy.
It's a nonprofit.
And we have recently launched what we're calling our ethical principles for data practitioners.
So the global data ethics principles.
So this is like the Hippocratic oath, like the doctor's take, but for.
Exactly, exactly.
And so because like we mentioned, this has been kind of a bad year, I would say, for technology
in general and technologists and and, you know, Silicon Valley and Silicon Valley culture
and data science and machine learning and AI.
And everybody's wondering, like, well, is this a good thing for society?
Is it not?
Like, how did we get here?
Like, how did we kind of like stumble into this dystopia where our minds are being manipulated
by propagandists on Facebook and in China?
They're doing social credit like that terrible Dark Mirror episode that I saw that we'll get
to like what's happening to us.
And, you know, fundamentally, as the people who are implementing this technology, we have a real
opportunity to think about our values, think about our ethics, like think about the way
that our technology might be used in ways that we hadn't intended because, you know, we're
a pretty optimistic group technologists.
I think we assume that like we want to put something really useful and meaningful out in
the world.
Maybe not this like family splitting algorithm.
That was probably.
There's probably the business department.
They say, hey, guys, can you?
Yeah.
They're like, well, this will, you know, we'll improve revenue by like 17 percent in
Q4.
Like, that'll be good for the world, you know, which and there's nothing wrong with improving
revenue.
I'm great.
Businesses are fantastic.
Not in the back of three year olds, maybe.
Right.
Maybe maybe not in this way, you know.
But I think also like the stuff that we do is actually pretty complicated.
People don't really understand at a deep level like what the software is doing and all
the potential ways that it might be used other than the intended use case.
Like that's something that really only we think about or are in a good position to think
about as technologists.
And so anyway, that was the idea behind this data for democracy project.
It's a global initiative and it's basically like what's a framework for thinking through
like putting ethics into your process.
So how do you incorporate these principles just in your everyday data and technology work?
What does it look like for data science?
I know it looks like for doctors.
You won't do any harm and that kind of thing.
How about for data scientists?
Yeah, exactly.
So like we have a we call it forts.
There's the high level, which is kind of like do no harm.
So you think about fairness, openness, reliability, trust and social behavior.
There's a handful of principles that is kind of like a checklist.
And so you can kind of go through this checklist.
And as you're developing a new feature or maybe developing a new model, if you're a data scientist
or, you know, some system for processing data, like anything that touches data, any of the
kind of technology work that you're doing, you can go through and, you know, it may be that
some of these principles like you don't have to check every box every single time.
But it's a nice like it's a framework for thinking about catching potential blind spots.
And so what's your intention when you're coding, like building this feature or developing this
model?
Have you made your best effort to guarantee the security of any data that you're going to use?
I mean, that seems like a no brainer.
But, you know, it's easy to forget when you're moving fast and you're maybe thinking about,
you know, the deadline or the fact that, you know, you're trying to ship this really important
feature because your customer really needs it.
Like, you know, give a second to remind yourself whether the data security is important.
Have you made your best effort to protect anonymous data subjects, which is really important in a lot
of data science research?
Sometimes if we don't think about this, we can inadvertently leak private data to the public
when they consume our research, even though that was never our intention and potentially is,
you know, irresponsible.
You can practice transparency, which is a lot of times understanding how our algorithms work.
So in this case, there was no transparency around how the algorithm that shows seat assignments
was functioning.
And then after an investigation, it was revealed that, well, it was actually examining whether
or not you shared a last name.
And if you do, it was splitting you up.
And if we if that was a transparent algorithm, we would have said, wait a second, this is totally
uncool.
You can't explain this algorithm transparently and people still accept it.
So, you know, like that would that's kind of like the light is great disinfectant, right?
In politics and all that in business.
Yeah, yeah, absolutely.
Another principle that maybe would have mitigated this problem was to communicate responsibly.
If the engineer who was responsible for implementing that went, hey, this is going to split up families.
And like during holiday travel, you can respect relevant tensions of stakeholders, which I also
think is really interesting because this is exactly what probably happened here.
The business team said, hey, but it'll improve revenue by 17 percent throughout the year.
And or whatever the number is, I'm making that up.
So it's a set of principles.
You can sign on to it, which is so if you go to data for democracy dot org, you will find
a link to sign the ethics pledge.
If you think that ethics are important, then you should totally sign up for it.
And here's why you should sign the pledge.
A, I think it's an important.
It's a cool thing to do if you think that ethics are important and you want to have this
like kind of mental checklist.
But it's also important because, you know, we all work for organizations or we're students
at academic institutions or we're otherwise doing this as our profession.
And the organizations that we work for are starting to adopt more ethical practices as companies
and academic institutions and governments.
like this is becoming more prominent.
But what's the way that we can make sure that our values are encoded in these kind of larger
business processes and these larger institutions is by making ourselves heard by sort of showing
our numbers.
And so if we show up as a technology community and we sign a pledge or we kind of communicate
to our manager or whatever it is, I mean, ultimately, like this isn't going to come from the top down.
And I don't think we want it to come from the top down.
I don't think we want this to come from people who aren't doing the work every day, who hear
about this ethics thing and they wanted this like a stamp of approval on whatever products
they're making.
That's fine.
But ultimately, the systems that they design won't actually accommodate the technology work
that we have to do every day.
So I think for those of us who are like writing software, for those of us who are developing
models, who are doing data science and software engineering every day, I think we need to make
our voices heard about the ethical principles that we want to see applied to the work that
we're doing.
So anyway, that's why I think it's important.
Data for democracy.org.
Don't be the developer who splits up families at the holidays.
You're better than that.
That's right.
That's awesome.
So I think this is great.
And I think it ties in really well to a lot of the themes that seem to be happening around
tech companies.
Like it used to just be, oh, tech companies are amazing.
Of course, we want to just encourage them.
And now there's some real skepticism around Facebook and Uber and all these types of companies.
And they kind of have to earn it.
And this oath is part of earning it, I think.
It's cool.
Yeah, I think so, too.
I think so, too.
And it's a good opportunity, I think, for, like I was saying, the actual doers, like
those of us who are doing the work, to participate in that conversation.
Because it's happening, like you're saying, it's happening whether we might want it to or
not.
The kind of attitude has changed.
People are thinking about legislating Silicon Valley, which would have been a totally foreign,
like bizarre idea almost, even a year or two years ago.
Yes, that's exactly what I was thinking of, is that kind of stuff.
It's like, wait, what?
What do you mean?
Right.
It's like, we're just over here doing good, making cool stuff.
Come on, like pull out that iPhone, buddy.
Like, let's play some Angry Birds.
And times have changed.
And more people are aware of the potential negative consequences.
And so, you know, now's our time to have a conversation and make the industry that we want
to be a part of.
Yeah.
So some of the things we've covered have been a little creepy.
Indeed.
Like the babysitter one.
But this next one is, I think it's just pure goodness.
100%.
I couldn't agree more.
So we know that Python is being used more in general scientific work.
And it's probably being used more in sort of the hard sciences.
Would you consider economics hard science?
Ooh.
Oh.
I'd put it right on the edge, right?
I mean, that's a lot of math in there.
There's numbers.
There's a lot of math in there.
I guess because I never really took economics.
I've only listened to like a couple economics textbooks in adulthood to try and something
I feel like I should know a little bit about.
And like, I feel like they were behavioral economics.
And it seems like a lot of correlation without causation.
Personally, no offense, economists out there.
But it's really data driven, which I think is really cool.
So there is a huge amount of information to consume when you're doing good economics.
So in any case, yeah, let's do it.
I'm on board.
I'm going to go one step further.
Let's call it a hard science.
I'm in.
All right.
Right on.
I certainly think some aspects of it are.
Now, we talked about the scientific papers obsolete, the move from just PDF or written
paper over to Mathematica to Jupyter.
And that's sort of a high level conversation of a trend.
But this year, the Nobel Prize in economics was basically won with Jupyter and Python, which
is awesome.
That is amazing and not surprising.
I mean, if you're going to do some scientific research, what other programming language would
you choose?
Yeah, absolutely.
Especially if you're like an economist.
So there was a bunch of folks who did a bunch of mathematics, Mathematica, and included in them
were these two guys named Nordhaus and Romer.
I think they're both American university professors.
And they're, let me see if I can mess up, poorly described what their Nobel Prize was, their work
generally is about.
But it was like, basically looking at how do you create long-term sustainable growth in a
global economy that improves the world for everybody through things like capitalism and
whatnot that mostly focus on very, very narrow self-interest.
They think they cracked that nut, which is pretty interesting.
And they cracked it with Jupyter.
I mean, that sounds Nobel Prize worthy to me.
And also the economic discoveries are probably useful.
No, but what I think interesting, because we talked about this in one of the previous stories,
is that the team, or Romer in particular, was the Python user.
And he wanted to make his research transparent and open.
That was like a key part of the research.
So that people could understand how he was reaching his conclusion.
So like all of my, you know, joking about behavioral economists a minute ago aside, like this is
actually an important part of the work.
So that you can understand his assumptions and, you know, at least understand the choices that
he's making and the data that he's choosing and that he tried to do it with Mathematica,
which is another way that people use or sort of perform computation for their research.
And apparently that just made it too difficult to share his work in a way that anybody who wanted
to try and understand his work would have to also use this proprietary software, which is a really,
really high bar.
Like it's really expensive.
Not everybody knows how to use it.
And it's not as simple, intuitive, open, and transparent as Python and Jupyter Notebooks.
So it was really core to the work that he did that ultimately won him the Nobel Prize,
which is pretty awesome.
Yeah, it's super cool.
And I do think that there's, if your goal is to share your work, having it in these super
expensive proprietary systems is not amazing, right?
I mean, we're talking about Mathematica here.
My experience was I did a bunch of stuff in MATLAB at one point and we worked with some
extra toolkits.
And these toolkits were like $2,000 a user just to run the code.
And if you wanted to run the code and check it out, you also paid $2,000.
Like that's really prohibitive.
It really is.
And I mean, I think that was my experience with proprietary software.
I mean, not only do those like programming languages or applications make it, it's just
difficult to collaborate.
And I think this will be of no surprise.
I would think that this is something that everybody accepts as fact amongst all of your
listeners.
But the open source community has made this current software revolution possible.
The fact that we are able to collaborate at this scale and share ideas and share code and
build on top of each other's work, I think is the reason that we've had this explosion in
entrepreneurship, this explosion in the kind of energy and excitement that comes out of Silicon
Valley, even though we were just talking about it, you know, maybe being a bad thing.
But this level of sort of rapid innovation that we've been going through is because programming
and it's just it's so much more accessible than it's ever been before.
And I think that that's largely because we transitioned away from these proprietary software
models.
Yeah.
And you think about the people who that benefits.
Obviously, it benefits everyone.
But if you live in a country where the average monthly income is a tenth of what it is in the
U.S. and you have to pay $2,000, it doesn't mean it's expensive.
It means that you can't have it.
Right.
I mean, it's just inaccessible to you.
And so these sort of opening ups of this research and these capabilities, I think it benefits the
people who need the most benefit as well.
Yeah, absolutely.
And it almost like distributes creativity much more broadly than we would have been able to
before.
Like we can we can tap sources of creativity and innovation that, like you're saying, would
have been just taken off the taken off the board because proprietary software is only accessible
to the small portion of the global population that can afford to spend thousands of dollars
annually on on licensing it.
Yeah, absolutely.
So there's there's a couple more thoughts.
I just want to share really quickly from this before we move on to something I guess I'll call
positive.
So this you got it in 2018.
You got to put it up there positive or not.
So one thing I think it's really awesome about this is this guy is 62.
He transitioned into Python recently.
Right.
You feel a lot of people are like, oh, I'm 32.
I couldn't possibly learn programming or get into this.
Like this guy made this Nobel research change into Python programming and the data science
tools at 60s, late 50s.
That's awesome.
It is awesome.
And what's interesting is that he's now been like exploring how software works.
And you pulled out a really great quote where he says, the more I learn about proprietary
software, the more I worry that, wait for it, objective truth might perish from the earth,
which is an insanely powerful statement.
That is a powerful statement from a guy who won the Nobel Prize.
So he's probably right.
Yeah.
He definitely sees a change in the world.
And I think this opens, this is a little bit of what I was saying, like thinking when
I said, look, we've got open source being used by scientists, but also changing science,
science.
Right.
Absolutely.
Because it's not only making the work more approachable and accessible, but it's making
it more repeatable.
And it's allowing us, especially now that so much research is based on computation, like we've
been saying before, it really does make it possible.
It would be impossible to come to a consensus about whether or not something is correct, acceptable,
whether we can say that this is an established fact.
You can't really say it if you can't show your work.
And in this case, showing your work is the computation in the data.
Right.
It's like just writing the final number down in calculus.
You're like, no, no, you got to show your work.
Exactly.
It's very important.
Like science and objective truth depends on it.
Show your work.
That's right.
Show your work.
All right.
So the next one is more like a mundane day to day thing, but actually makes a big difference.
So what's the story with Waze and Waze reducing crashes?
So this is pretty cool.
So we've talked about using quote unquote AI to predict things.
Sorry.
Maybe we should tell people what Waze is.
I don't know how global Waze is.
Maybe they don't have experience.
Just give us a real quick summary.
That is a really good point.
So Waze is a mapping application that helps you find the shortest route from one point
to another in your car.
And so there's a whole thing about Waze.
Like it's a community of people.
And so you're kind of collaborating to point out things on the road.
So I'm stuck in traffic and you can tap a button or there's a police car trying to catch people
for speeding and you can tap the button or there's been an accident.
You can tap a button.
And so it's this way for like drivers to communicate with each other on the road.
And it's so big.
That community is so large that it can help you.
It routes you to one point from one point to another in a city that helps you avoid obstacles
that might be pretty dynamic and changing all the time.
So it's kind of like Google Maps.
It's more of a two-way street for sure, right?
Like the users send info back a lot more to it.
Okay, cool.
With that in mind, how does Waze play into this story?
Well, as you can imagine, it captures a ton of data about driving patterns.
So not only does it know what's happening in real time, but all that data is stored.
And so you start to get a sense about how people move through cities in general.
And once you have data that captures a behavior in general, in data science, you can start to make predictions using that data.
So you can train a model and say, generally, this is how things work.
And then maybe you could make some predictions about how things work in the future.
And assuming that historical data is accurate, then you can usually make pretty decent predictions.
And so the cool thing about an application like Waze that captures not only traffic patterns, but also events like accidents or car crashes,
is that you could predict when and where car crashes are likely to occur, which is kind of mind-blowing.
Like I think traffic seems like this total, super complex, impossible to understand, messy organic...
If you ever thought of chaos, it should totally apply to this, right?
Like if a butterfly can affect weather, like people should just be crazy in cars.
They can be crazy in cars.
And I don't know if everybody will be familiar with this.
There's this like famous experiment in where they, scientists set up a circular track and put cars,
they had cars drive around the circular track, all like equidistant from one another.
So in theory, they could all maintain their speed.
But because there are human beings driving the cars, they would occasionally make these little choices.
Like they would feel like they got a little bit too close to the car in front of them,
where they put a little bit too much gas and they would get too close.
And so they'd brake.
And then as soon as they put their foot on the brake,
then the car behind them will put their foot on the brake.
And then there was this like cascading effect.
And no matter what, even though there was enough room for all of these cars on the road,
they wound up in a traffic jam driving around in the circle.
It's like...
That's awesome.
Yeah.
It's like a beautifully designed system that humans cannot participate in fully.
Because we're just too human.
So we could cause traffic.
We're flawed.
And all those flaws are captured by Waze.
And so what Waze basically started doing is that they have all this data from connected
cars and road cameras and apps and whatever.
And they have an overview of how the city works.
And they've shared that data with local authorities who then basically have developed models that
predict when and where these accidents are going to occur.
And so the city's traffic and safety management agencies were able to take that data and say,
oh, there's likely to be an accident in this area at this time.
And then they sent...
They went to those areas to take preventative measures.
So they basically identified what are the most high risk areas for where accidents are likely
to occur at certain times of day or in certain conditions or whatever.
And if you can then take action to make those areas more safe, then, of course, you can reduce
the number of crashes.
And they reduce crashes by 20%.
So if on a normal day there's 100 car crashes, there's only 80, which, I mean, that's pretty
amazing.
So not only that, but if you're in an area where an accident's likely to occur, all of the other
services that happen around that accident are more readily available.
So you can get faster treatment for anybody who was injured.
You can more quickly clear and restore normal traffic flow.
And so in addition to actually making the health implications, like the public health implications
of having fewer car crashes, you can actually make it easier for people to get around the
city more quickly by moving, by sort of quickly dealing with accidents as they occur, because
you kind of knew or had a pretty strong indication that that accident was going to happen in advance.
So it's like minority report, but for car crashes.
It's like a pre-crash.
It is.
So they've got the pre-crash.
If that system is not called pre-crash.
Sir, do you know why I'm pulling you over?
No, you were going to crash up there.
What?
Right.
You were the cause of an accident that was about to occur.
Like what?
I actually, I kind of like this idea.
I mean, we're getting into territory that sounds like the wrong, like the unintended use of AI,
like we've been talking about this entire episode.
But I kind of love it.
I would love for the AI to tell me in advance, even if it meant I got a ticket.
Like you were going to cause an accident.
You didn't because we told you and we've changed the future.
But you still have a $25 ticket.
I'd pay that.
I would pay that $25 ticket.
That's so interesting.
That's like the 2025 edition.
The 2018 edition is they were able to cause fewer crashes, address the ones that happened better,
and basically just improve life for all the drivers.
That's awesome.
Yeah, it's totally cool.
And I think this is one of those like almost like classic data science problems now,
where it's weird to say that, that there are like such a thing as a classic data science problem,
but like maybe like an archetypal data science problem,
where there's like where you have a bunch of data about the past,
and whatever system it is that you're interested in understanding is so predictable and repeatable
that all you really need to do is understand how it behaved in the past,
and then you can have a pretty good idea about how it's going to behave in the future.
Like if only you could crunch enough numbers.
So it's kind of like we could have a grand theory of the universe if only we could compute the universe.
Sorry, not to get too philosophical,
but like, but the systems that we have the computing power to understand are increasingly large and complex.
So like a city's traffic flow is pretty large and complex,
and probably too much data to really process in any meaningful way until now.
And now we not only have the data, but we have the ability to process it and make predictions.
And so this is a real significant, tangible improvement on human life.
Pretty awesome.
Yeah, that's really awesome.
I think another thing that would make an improvement on life is if more people participated in speaking about what they would like to happen in their country,
and what they would not like to happen in their country.
What do you think?
That seems like a good idea.
You know, like participating in the process.
I think that'd be a win all around.
You know, you know, way better than I do.
I feel like the average voting turnout is something like 65% or something in the US, maybe 70 on a crazy period.
But then that's just among registered voters.
What about all the people who aren't even registered, or they've become unregistered because they moved and they forgot to update it?
Right. This is, as we probably heard about in the 2018 election cycle that we just had, a big part of the process.
And anybody who, well, you probably met somebody who was like standing in front of your office or your church or your school or walked around your neighborhood and was saying,
hey, are you registered to vote?
Like there's these get out the vote campaigns that are really important because what?
Twitter asked me at least five times if I was registered.
Twitter did.
I think I Googled something the day before the election.
They were like, hey, here's your local polling location where you can go get registered to vote right now.
It's kind of cool.
I think there's people have recognized that there's low voter turnout.
And so there's all of these interesting initiatives to try and get people to go out, make sure that they follow the appropriate procedures and they actually cast their vote, which, you know, ultimately, you know, democracy dies in darkness.
Right.
Like it's important that we're, you know, participating in the process.
So technologists are, of course, trying to help.
And there's a guy called Jeff Jonas.
He's a prominent data scientist.
And he is interested in the integrity of voter rolls.
And so this is an interesting aspect of it.
So in most places, I think in all places, you can't just show up to the polling place and vote.
You have to be registered to vote.
And there's lots of reasons that you might get unregistered like you were just talking about.
So I recently moved from one place to another in Austin and the people were coming around my neighborhood.
And I actually didn't know that this impacted my ability to vote here where I live.
They said, hey, are you registered to vote?
I said, of course I am.
And I mentioned offhand like, oh, just move to the neighborhood.
Love it so much.
And they were like, oh, well, then you're not registered to vote because you've just changed your address.
And so there's all these like little details that are important, sometimes hard to understand.
Like it's a big government bureaucratic process at the end of the day.
And so this guy, Jeff Jonas, used his software for this multi-state project that he called the Electronic Registration Information Center that basically uses machine learning to identify eligible voters.
And then it cleans up the existing voter rolls.
So, OK, great.
Because the reason that you might need machine learning for this and not just like normal string matching is because people's names are sometimes slightly different on one form or another.
Or maybe their address has changed or maybe multiple people have the same name.
And so there's like all sorts of ways where like it's sometimes difficult to know whether a record in one database that represents a human being represents the same human being in another database, even if their names are identical or similar.
So there's it gets a little bit complicated.
And so that's why, you know, machine learning and AI are useful here because they can recognize these kind of subtle variations and patterns that ultimately lead you to be able to kind of triangulate a bunch of different data to point at the same human being.
And so this nonprofit, the Electronic Registration Information Center, identified 26 million people who are eligible to vote but unregistered and then 10 million registered voters who have moved.
Who maybe became uneligible because of that.
Yeah, that's right.
So it somehow became uneligible.
So they've moved.
They appear on more than one list for whatever reason.
This does happen.
Or they died.
So important to nobody.
After your death, you remain registered to vote.
And because who are you going to even you just died.
It's not the thing that you think of on your deathbed.
It's like, wait, take me off the voter rolls.
The end is near.
So, you know, this is actually pretty common.
But again, like, matching a record of death with a name on a voter registration roll is much more difficult than it sounds.
So anyway, super interesting project because I think in every sense, like we want our voter rolls to be authentic.
We want them to have integrity because we want our democracy to have integrity.
Like, you know, we should make sure that one person, one vote.
But at the same time, we want to make sure that as many people who can vote do because that's how the whole process works.
We want to make sure that the people are represented in their and their elected leader.
So, yeah, really, really interesting project.
And I think hard to imagine this going wrong.
Yeah, it's really good.
There was some conversation in the article about this project where it talks about trying to thread the needle of not looking partisan.
We just want people to vote.
How do we do that?
And that's an interesting challenge.
Right.
Because, of course, that's become a polarized topic of conversation.
There's a lot of concern about whether or not voting rolls are authentic.
Nobody wants this concern on one side of the aisle about voting fraud.
And then there's concern about from the other side of the aisle about voter suppression.
So how do we get to some common ground?
Because I think ultimately the common ground that everybody has is that we want an authentic process, whereas many people who are eligible to vote can.
I think we all believe in democracy at the end of the day.
But there's these two kind of opposing points of view on what to prioritize when making sure that our process has integrity.
So it was great to thread the needle and find a technology driven, sort of a nonpartisan approach to making sure that the system functions as best as it can.
Right.
Let's take this technology applied to a problem that is inherently political and try to make our political system better without, you know, raising the hairs and anger of any particular group.
It's pretty good.
Yeah.
It's a challenge.
So it's almost like these days it's hard to find anything that AI can do that makes everybody happy.
However, I think this next story that you found actually is something that I think universally we can all agree on.
I think it's pretty awesome.
Apolitical and universally beneficial, sort of unequivocally beneficial.
Yeah.
So I think there's two really interesting angles to this.
Let's take the super positive one first.
So this is about using machine learning and computer vision to fight breast cancer, which there's been several projects around this.
And they're universally good, I think.
Right.
You have these mammograms.
They have pictures of potentially cancerous regions.
But the key to catch cancer is to catch it early.
But to catch it early means to see things that are utterly subtle.
Right.
So they were saying something like 38% of radiologists or whatever group of doctors is called that looks at this.
They were doing like a 38% catch rate on these really super early cancers.
So Google came up with an AI.
It's even just like, well, they took one off the shelf and they applied it.
It's like something ridiculous.
Like off the cuff.
You're just like off.
We pointed at these and asked it some questions.
And apparently it found the cancerous regions 99% of the time.
Yeah, it is.
And for exactly the reasons that you mentioned.
Because it's capable of seeing much subtler patterns than human beings can.
Which is, I mean, exactly what machine vision is good for.
Yeah.
So first it started out like we're just going to show the AI all the pictures and just get its opinion.
Like forget the doctors.
And then they said, well, what if, like we have doctors.
And I think there still always will be doctors.
But what if we give the doctors a stethoscope?
We give them a tongue depressor.
We give them a camera.
What if we gave them AI as one of the tools they could point at the people and ask, you know, and analyze what the results are coming out of that machine, right?
So they basically said, all right, the second one would take six pathologists.
And they said they found it easier to detect small cancerous regions.
And it only took half the time.
At least for me, like in terms of where AI can be helpful in health care, especially these life-saving moments when the earlier that you detect cancer, for example, the more likely you are to be able to treat it.
Like it's so complicated.
Like I feel like the medical profession, the amount that doctors are expected to hold in their minds in order to like recognize relevant pieces of information and put together like a theory of the case.
You know, what might this be based on all the pieces of information that I'm seeing?
It is really like a marvel.
I have nothing but respect for doctors who go through the amount of training that they go through, the amount of information that they're able to retain, and the kind of creativity that's required to recognize these different symptoms and put together, you know, some likely candidates for what might be ailing the patient.
However, that type of pattern matching, assuming that you can capture accurate data, is exactly what machines have become really, really, really good at.
And so I do think this is an area where, again, assuming that good data is available, and I think when it comes to something that is more kind of binary to determine, like whether or not there's cancer tissue, like cancer tissue present, and we can take an image of a region of the body and sort of reliably provide that to the algorithm that's trying to make a determination about whether or not cancer is present.
Like, in examples like that, where the data is readily available, I think there's no reason that AI can't be a really powerful assistant so that doctors with all their knowledge and creativity can't augment that and sort of help recognize where they might have blind spots or where there might be technical limitations to their ability as human beings.
Like, our eyes only work so well.
I think that's open source earlier.
Aggregate knowledge of the medical community can be available to any practitioner, which is kind of amazing.
Yeah, it's pretty amazing.
So you spoke about the computers detecting these really careful, nuanced details and images.
And I would say China is doing a whole lot of interesting stuff like that to sort of assess people.
So they've got crazy facial recognition, the stuff going on over there.
They have a system that will detect your gait and identify you by the way you walk.
That's, yeah.
And all of these types of things are generally around this idea of like a social credit.
Like, can we just like turn cameras and machines on our population and find the good ones in the background?
It's true.
I mean, it's a really interesting.
It sounds crazy, right?
Like you're laughing, but it's kind of like you're going to laugh or you're going to cry.
Pick one.
Well, it's true.
It's true.
So, A, I think China is a really interesting counterpoint to the debate that we're having here in the U.S.
where here our values are very much privacy, individual freedom.
And whenever technology encroaches on that privacy, we're very suspicious.
So even the fact that advertisers can target me based on my browsing history, like, you know, makes a lot of people uncomfortable.
Like maybe that's a violation of my privacy.
Even though the advertiser doesn't know who I am as an individual, it's possible to make a pretty good guess about who I might be based on my behavior.
They know you want a Leatherman pocket knife, but they just don't know your name.
Right, right.
And they know that people like me also like other products that people who like Leathermans like.
I don't know.
We're outside of my comfort zone.
I'm sorry.
I'm just making this up.
But you get the idea, right?
Yeah, exactly.
But here, you know, a lot of the conversation is like, is that okay?
Whereas in China, they've gone the other direction.
They were like, I mean, it's a way that we can find the best people and maybe maintain social order.
I mean, I don't know.
I don't know what they're thinking.
Just quickly, because not everybody will have seen this, but there's a Netflix TV show called Black Mirror.
If you are into kind of a dystopian technology future or technology enabled dystopian future or whatever, I highly recommend Black Mirror.
There is an entire episode dedicated to a social credit system.
And everybody in the episode is ranked.
Like every social interaction you have, you can basically like rate the person you had the interaction with.
So did you get a smile from the barista at your favorite coffee shop?
Five stars.
Did you tip?
You get five stars back from the barista.
Like, did you take an Uber and the person was friendly?
Five stars.
And some of these things we already do.
Like, we rate our Uber drivers and our Uber drivers rate us.
But they're usually kept within the little space of Uber or Starbucks or whatever.
It's not like your global rating.
Like, you don't get a mortgage based on how you treated your Uber driver.
Or not.
Right.
Well, I mean, you get your babysitting gig depending on what you posted on social media.
But that's, again, here, like, it's like, oh, we're debating.
Is it okay to judge potential babysitters based on that rage post they made about the ending of the Dark Mirror episode that they thought was stupid?
Like, whatever.
But China's gone the other direction.
And so they, like, exactly like you were saying, they have all of these ways in which they are scoring and rating people based on the social behaviors that they can observe, either through surveillance or people's behavior online, their social media behavior.
And so the Shanghai city in China, you may be familiar with it, is going to pool data from several departments.
And they're going to reward and punish about 22 million citizens based on their actions and reputations by the end of 2020.
So social.
Right.
Like a year and a half.
Yeah, exactly.
Like.
It's not in the future very far.
We're.
Yeah, this is not something like far future dystopia.
This is today, people.
And so pro-social behaviors are rewarded.
So if you do volunteer work, if you donate blood, which actually sounds cool, like I'd like to be rewarded for those things.
This doesn't seem that bad.
But people who violate traffic laws or charge under the table fees are punished.
OK.
If we're getting in.
I mean, in a way, like we're already socially rewarded for doing good things and we're socially harmed for doing mean things, I guess.
Or things that aren't cool.
But and so in a way, it's like China wants to use technology to optimize the social systems that we already have in place.
Like if I'm rude to you, then I suffer social consequences for that.
But it's not really captured anywhere.
I guess like that damage is pretty localized.
Like it doesn't go on your permanent record.
Exactly.
This is everybody's permanent record is now captured digitally and managed by artificial intelligence.
That's welcome to.
Welcome to China.
Yeah.
So, yeah, it's pretty interesting.
I mean, on one hand, I can see this benefiting society, but it just seems Black Mirror-esque to me as well.
And so you might be wondering, like, well, what the heck is a punishment, right?
So they say in another city, Hangzhou, they rolled out a credit system earlier this year and rewarding pro-social behaviors such as volunteer work or blood donations and punish those who violate traffic laws.
They charge under the table fees and whatnot.
And statistically, they said by the end of May, they've been blocking more than 11 million flights and 4 million high-speed train trips from the bad guys.
Right.
And not bad guys, like, broke a law.
Not.
Bad guys, like, doesn't volunteer enough.
Doesn't seem like, you know, heart's probably not in the right place.
We're not going to let you take this train trip, buddy.
Just denied.
I'm sorry.
Yeah, you're like, I was wrong.
You got three and a half.
Yeah, totally.
Like, I was going to go visit my family.
I wasn't going to be able to sit with them on the plane, but at least I was going to take a trip home for the holiday or whatever.
And that, you know, trip was thwarted.
Like, actual real-life consequences for things that we've all come to accept as, like, pretty much being a right if we can afford to pay for them.
Right.
Yeah.
Yeah, kind of bizarre.
Well, it's going to be a very interesting social experiment.
Yeah.
I don't want to be part of it.
I'm glad that I won't be part of it either, although I wonder if everybody will just be, like, super friendly.
Well, but hey, like, maybe that's the outcome that we're just not seeing.
It's like, we'll go to Shanghai and be like, man, people are just, this is like a Leave it to Beaver episode.
Exactly.
Well, you know, how much of that would be disingenuous?
You know, like, oh, bless your heart.
You know, that type of stuff.
You know?
Then we just need to optimize the algorithm, man.
Like, downvotes.
Exactly.
Downvotes for disingenuous social pleasantries.
It's a double downvote.
You were mean and you were disingenuous about your nitheness.
Boom.
All right.
So, the last one is, I thought it'd be fun to leave people with something practical on this one.
Have you seen this new data set search from Google?
Yes.
I am so, so into this.
Partially because it's useful and partially because I've worked on a project where we tried to accomplish something similar.
And it is super freaking hard.
So, props to Google.
Of course, if someone's going to get searched right.
Google.
Yeah, for sure.
So, tell people what this is.
Well, I mean, it's just like it sounds.
It's a data set search.
So, sometimes the data is like an actual data set that got captured somewhere as like a CSV.
And or it's data that was extracted from sort of less structured material, like a table and a web page or something.
But the way that you can search for it is like by topic.
And I just want, as somebody who suffered through this very difficult problem, I just want people to understand what that actually would mean.
Like to know what a data set is about in air quotes.
And a data set in this case, if you're not like a data person, it's like a spreadsheet with column names at the top and a bunch of rows, for example, in the simplest case.
And so, maybe you can look at the column headers and perform some machine learning or something and get a sense that the column headers are really well named.
But they never are.
Trust me.
They never are.
They always have some random name, like the name of like the column in the database table that was named in the 1970s that like this thing ultimately spit out in the first place.
And there's like random characters in there that have no place in any data set ever.
And there's a bunch of random missing values.
And everything is a number.
And so, you can't actually make any guesses about what's in there because it's just a bunch of random numbers.
And so, you end up looking at weird things like the structure of the data set.
And like you go to some strange places, my friends.
But the fact that Google's figured out how to catalog this type of information and make it accessible to people, this like almost like semantic search for data sets, it really is a real feat of machine learning and engineering.
Yeah, it's awesome.
So, you just go to the data search page, which is toolbox.google.com slash data set search, at least for the time being.
And you just type in a search and it'll give you a list, like here's all the places we found.
And some of them will be like legitimate just raw data.
And sometimes it's just embedded tables in a web page and all sorts of stuff.
It's really well done.
Yeah.
It kind of lets you look for data in the way that you would look for any other content on the internet.
Just the way that you would, well, the way that you would search normal Google.
Yeah.
Which is pretty impressive because there's usually not that much context around data sets on the internet.
But like that kind of semantic real world context.
So.
Yeah, it's great.
So, if people are out there looking for data sets, definitely drop in on Google data set search and throw some stuff in there.
There's some good answers.
I also really like the 538 data.
Have you seen that?
Oh, yeah, totally.
So, the website 538, for folks who aren't familiar with it, kind of a data journalism focused website.
A lot about sports, a lot about politics.
But most of the work is driven by some type of data analysis.
Yeah.
And over at github.com/538, all spelled out, slash data, they have all of the data sets they use to drive their journalism,
which is like hundreds of different data sets.
So, I'd love to go and grab data there for various things I'm looking into.
Yeah, absolutely.
It's a great resource.
Especially because then you can go see how they use the data and what questions they asked.
And then it's kind of an easy way to, well, it's a great way to learn.
Especially if you're kind of toying around with data for the first time and just getting comfortable with some of the amazing data exploration and modeling tools in Python.
Best software language.
Take that.
Our users.
That's right.
Stick it.
So, if you're looking for data sets, where do you go?
Now, I go to data set search.
But there's also a lot of great, it depends on kind of what you're looking for.
But there's a company based in Austin, actually, called data.world that is trying to do kind of a similar thing to Google's data set search.
But it's more curated.
So, it's kind of community-based.
People are sharing interesting data sets that they found and contextualizing them.
So, it's a great, a lot of data for democracy volunteers when they're working on projects, they'll upload them to data.world to make the data available.
But then there's also a lot of kind of open data portals, both at the national level.
So, there's still data.gov.
I believe that's still up.
There was some rumors that it might all come down eventually, but it's still around, I think.
And a lot of cities that have had open data projects or open data initiatives have collected all of those into a portal that's specific to where you live.
So, if you want to find out, you know, how many dogs and cats are in your local animal shelter from one month to the next or whatever the analysis is that you're curious about that's super relevant to your city,
you can probably find one that is for the city closest to where you live.
I know there's one here in Austin, New York, Chicago, L.A., San Francisco.
There's a lot of cities have this now, and it's a great way to find data that answer interesting questions and just toy around a little bit and learn more about where you live.
Yeah, that's cool.
And data.world's cool as well.
I haven't seen that.
All right, Jonathan.
Well, that's the 10 items for the year in review.
And I definitely think there's an interesting trend, and it's been super fun to talk to you about it.
Yeah, of course.
Thanks so much for having me on the show.
And I hope everybody had a wonderful 2018 and is looking forward to an exciting year ahead.
Absolutely.
So, I have a few quick questions before you get to go, though.
First, when are you coming back to podcasting?
Are you just going to make these guest appearances?
Do you have any plans to come back, or are you going to just keep working on your projects?
You know, I'm thinking maybe towards the end of 2019, I'll try and find a year in review podcast where I can sit in.
Well, you can definitely come back in 2019.
That'll be good.
I'm just pre-positioning for the next year.
I love doing it.
It's really fun.
And I have no timetable for actually returning, though, because even the thought of committing to the amount of work that it takes to put on an episode.
Yeah, it's a crazy amount of work per episode.
That's for sure.
Well, I'm really glad you came back for, you came out of retirement to do this one.
Oh, thanks, man.
I really appreciate it.
And I'm super happy to come on the show and do it.
I mean, especially because I won't be responsible for any of the work once this is recorded.
Exactly.
That's the way to do it.
Be a guest.
All right.
Last two questions, which I know you answered a couple years ago, but it could have changed.
So if you write some Python code, data science or otherwise, what editor do you use?
Well, I use Jupyter Notebooks pretty heavily.
And actually, more recently than not, I write much less software.
Like almost everything I write now is some type of like exploratory data analysis.
So it's almost entirely in Python.
But when I do code, I still use sublime text a lot, which I feel like is kind of old school.
I hear that the world has moved on.
There's like Python specific, like quasi IDEs.
And I'm out of the game, Michael.
What can I tell you?
It's all right.
No, it's all good.
It's a great one.
And then a notable package on PyPI.
Oh, man.
Well, I mean, given what we've been talking about, I would strongly encourage everybody to check out a package called Keras, K-E-R-A-S, or TensorFlow,
which is a both are very popular machine learning libraries or kind of machine learning frameworks.
Keras is more high level.
It's kind of it's a very accessible way to get into exploring neural networks, basically.
So there's lots of kind of popular machine learning techniques that are sort of more traditional and super effective.
There's nothing wrong with them.
But the world has kind of moved into these like deep learning and AI is largely based on neural networks.
And Keras is a great way to explore those without getting too much into the weeds.
And then once you get into the weeds and you find it kind of interesting and you want to get down lower level and really play around with some of the network structures yourself,
then you can get into TensorFlow, which is one of the underlying libraries that Keras is both on top of.
So highly recommend both of those.
Right on.
Yeah, I've definitely heard nothing but good things about them.
All right.
Final call to action.
Maybe especially around this whole democracy data pledge and stuff.
People heard all your stories.
They're interested.
What can they do?
They can.
If you're like, I don't want to live in a Black Mirror episode, know that you have the power to change it.
Python programmer and podcast listener.
The power is in your hands.
First up, go to datafordemocracy.org and you can sign the ethics pledge and you can let the world know that you believe in ethical technology.
And together, we'll make our voices heard.
We'll make sure the practitioners have a voice in this whole thing.
And so datafordemocracy.org, we really would love to both have you sign the pledge but then also participate in the conversation.
Because there's a whole community there that's really hashing out these ethical principles, making sure they work for real-world technologists who have real-world jobs.
So you can contribute to that process.
It's open source.
It's happening on GitHub.
We'd love to have you participate.
All right.
It's a great project.
Hopefully people go and check it out.
Jonathan, thanks for being on the show.
It's been great to have you back, if just for an hour this year.
Thanks, Michael.
I really appreciate the opportunity.
It was super fun.
You bet.
All right.
Bye-bye.
This has been another episode of Talk Python to Me.
Our guest on this episode was Jonathan Morgan.
And it's been brought to you by us over at Talk Python Training.
Want to level up your Python?
If you're just getting started, try my Python Jumpstart by Building 10 Apps course.
Or if you're looking for something more advanced, check out our new async course that digs into all the different types of async programming you can do in Python.
And of course, if you're interested in more than one of these, be sure to check out our Everything Bundle.
It's like a subscription that never expires.
Be sure to subscribe to the show.
Open your favorite podcatcher and search for Python.
We should be right at the top.
You can also find the iTunes feed at /itunes, the Google Play feed at /play, and the direct RSS feed at /rss on talkpython.fm.
This is your host, Michael Kennedy.
Thanks so much for listening.
I really appreciate it.
Now get out there and write some Python code.
I'll see you next time.
Bye.
you
Thank you.