Editing DS4UX (Spring 2016)/Baby Names
From CommunityData
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 18: | Line 18: | ||
You'll be playing with data from the list of all baby names in the US (used more than five times in a year) from the last several years: | You'll be playing with data from the list of all baby names in the US (used more than five times in a year) from the last several years: | ||
# Right click the following file, click "Save Target as..." or "Save link as...", and save it to your Desktop directory: http:// | # Right click the following file, click "Save Target as..." or "Save link as...", and save it to your Desktop directory: http://mako.cc/teaching/2015/cdsw-autumn/babynames.zip | ||
# The ".zip" extension on the above file indicates that it is a compressed Zip archive. We need to "extract" its contents. To do this, click on "Start", then "Computer", and navigate to your Desktop directory. Find babynames.zip on your Desktop and double-click on it to "unzip" it. That will create a folder called babynames containing several files. | # The ".zip" extension on the above file indicates that it is a compressed Zip archive. We need to "extract" its contents. To do this, click on "Start", then "Computer", and navigate to your Desktop directory. Find babynames.zip on your Desktop and double-click on it to "unzip" it. That will create a folder called babynames containing several files. | ||
===Test the Baby Names code=== | ===Test the Baby Names code=== | ||
Line 79: | Line 80: | ||
ssadata.girls | ssadata.girls | ||
We'll walk through the rest of the important details in the session! | We'll walk through the rest of the important details in the session! | ||
== Ideas for exercises == | |||
# Search for your own name. Are there both boys and girls that have your name? Is it more popular for one group than for the other? | |||
# Are there more boys' names or girls' names? What about for particular first letters? What about for ''every'' first letter? | |||
# How people are described in the dataset (assuming nobody is counted more than once)? | |||
# What is the longest name in the dataset? | |||
# How many boys' names are also girls' names? How many girls' names are also boys' names? | |||
# How many names are subsets of other names? | |||
# Write a program that will take a name as input and return the number of girls and boys with that name. | |||
# What is the most popular girls' name that is also a boys' name? | |||
# Take a prefix as input and print the number of boys and girls with that prefix (i.e., "m" would list babies whose names start with "m" and "ma" would list babies whose names start with "ma", etc). | |||
[[Category:DS4UX (Spring 2016)]] | [[Category:DS4UX (Spring 2016)]] |