Skip to content

D3 visuals illustrating maternity leave in the companies, educational institutions, nonprofits, etc.

Notifications You must be signed in to change notification settings

mandicai/maternity-leave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maternity Leave in the US

Intro

Currently, the United States is the only developed nation that has no federal policy for paid maternity leave. As a result, many new mothers in the US must rely heavily on their employers to grant them paid maternity leave and benefits. I was curious to know how many US employers granted their employees maternity leave, and to what extent compared to other countries that have federal policies mandating maternity leave.

How it works

Data is from Fairygodboss's Maternity Resource Center. I wrote an HTML web scraper in Python that loads a page from Fairygodboss, gets the data from the table, and stores it in a JSON object. The web scraper is available in the /assets folder and can be run using Jupyter Notebook.

The data is visualized using d3.js.

Special thank you to Jim Valladingham for his scroll tutorial, and to Susie Lu for her d3-annotation library.

Run it

To run, git clone the repo, cd into the project, and run http-server -c-1 -p 8000 (or any local server of your choice) to view the project at localhost:8000.

Sources

Resources

Making a bubble chart

Annotating the bubble chart

Creating the scrolly story

Building a web scraper with Python and Jupyter Notebook

About

D3 visuals illustrating maternity leave in the companies, educational institutions, nonprofits, etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published