Skip to main content

Data access and analysis of baby names statistics

Project description

babe

Note that the first time you import name, you need to have access to the Internet, and it will take a few seconds (depending on bandwidth) to download the required data.

But this data is automatically saved in a local file so things are faster the next time around.

To install:

pip install graze

Then in a python console or notebook...

from babe import names_by_us_states, names_all_us_states

names_all_us_state

This data frame provides popularity matrix for names of babies born in the US between 1910 and 2019.

names_all_us_states
popularity
name year
Aaban 2013 6
2014 6
Aadam 2019 6
Aadan 2008 12
2009 6
... ... ...
Zyriah 2013 7
2014 6
2016 5
Zyron 2015 5
Zyshonne 1998 5

594681 rows × 1 columns

names = set(names_all_us_states.reset_index()['name'].values)
print(f"{len(names)} unique names")
31862 unique names
years = set(names_all_us_states.reset_index()['year'])
print(f"Popularity stats cover years {min(years)} through {max(years)} (or subset thereof, depending on the name)")
Popularity stats cover years 1910 through 2019 (or subset thereof, depending on the name)
names_all_us_states.loc['Vanessa'].plot(figsize=(15, 4), style='-o', grid=True)

png

names_all_us_states.loc['Cora'].plot(figsize=(15, 4), style='-o', grid=True)

png

names_by_us_states

This dataframe provides the same as above, but by state. 51 US states are covered.

names_by_us_states
gender popularity
state name year
AK Mary 1910 F 14
Annie 1910 F 12
Anna 1910 F 10
Margaret 1910 F 8
Helen 1910 F 7
... ... ... ... ...
WY Theo 2019 M 5
Tristan 2019 M 5
Vincent 2019 M 5
Warren 2019 M 5
Waylon 2019 M 5

6122890 rows × 2 columns

states = set(names_by_us_states.reset_index()['state'])
print(f"{len(states)} states")
51 states
names_by_us_states.loc['CA']
gender popularity
name year
Mary 1910 F 295
Helen 1910 F 239
Dorothy 1910 F 220
Margaret 1910 F 163
Frances 1910 F 134
... ... ... ...
Zayvion 2019 M 5
Zeek 2019 M 5
Zhaire 2019 M 5
Zian 2019 M 5
Ziyad 2019 M 5

387781 rows × 2 columns

names_by_us_states.loc['CA'].loc['Cora']
gender popularity
year
1911 F 8
1912 F 9
1913 F 15
1914 F 15
1915 F 17
... ... ...
2015 F 269
2016 F 244
2017 F 284
2018 F 282
2019 F 256

109 rows × 2 columns

names_by_us_states.loc['CA'].loc['Cora'].plot(figsize=(15, 4), style='-o', grid=True)

png

names_by_us_states.loc['GA'].loc['Cora'].plot(figsize=(15, 4), style='-o', grid=True)

png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

babe-0.0.5.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

babe-0.0.5-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file babe-0.0.5.tar.gz.

File metadata

  • Download URL: babe-0.0.5.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for babe-0.0.5.tar.gz
Algorithm Hash digest
SHA256 c2b5e62438e0f0ef90509ae32d56bd1b2af842a271abcb84132be96c61435153
MD5 a333c581f6c9072a89182977ae21b059
BLAKE2b-256 5f08f24fd0a1086c3b537c84ac254a60424713b408d053b1eccfb3cc1bc33489

See more details on using hashes here.

File details

Details for the file babe-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: babe-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for babe-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7cdbb257fbe3fa5d3e6acd5b50c10b0218116ffc5fe6d7912dedd2c16a1a745d
MD5 bae01c198c4d3eaab28a1c55f71a733a
BLAKE2b-256 3da3bb0e8398d9a93ff2fc8e7ad7cffb786838eaed382d2eafba0891d7dd7b71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page