Login and get codingAfter our Code Challenge 62 / Alicante PyDay last week, we thought it would be nice to branch off a Bite exercise using what we learned. So prepare to do some web scraping using
BeautifulSoup
and discover a new library calledgender_guesser
. We are going to look at the percentage of female speakers at Pycon US 2019.Here is what you need to do:
- Complete
get_pycon_speaker_first_names
extracting all names fromPYCON_HTML
we cached somewhere for you. Note that some entries have multiple names separated by comma (,
) and slash (/
), so you will need to extract those. Return alist
of first names.- Complete
get_percentage_of_female_speakers
usinggender_guesser.detector
'sDetector()
to determine the gender based on the first names passed in. This tool is not perfect: some names won't be found. However we like Pareto's principle so we're happy to get a rough indication. Return the percentage of female speakers rounded to 2 decimal places.If next year's Pycon site doesn't change much, you now have a re-usable script you can run against Pycon 2020's data ...
Have fun and keep calm and code in Python!
127 out of 127 users completed this Bite.
Will you be the 128th person to crack this Bite?
Resolution time: ~66 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 4.3 on a 1-10 difficulty scale.
» Up for a challenge? 💪