Being Born in the wrong zip code can shorten your life.

Info

This project tests whether California residents who live near parks, museums, and medical providers (MP) have a lower life expectancy.

We used Yelp's API to calculate the number of parks, museums, and medical care providers for all 2,597 zip codes in California and exported the collected data to a CSV. We downloaded a CSV of the Census Data which shows the life expectancies per zip code in California. We then combined these two datasets into one Panda's DataFrame and plotted each dataset as a scatterplot, including the trendline, linear regression line, p-value, and correlation coefficient.

We tested our null hypothesis that people who live near parks/arts/MP do not have a lower life expectancy against our alternative hypothesis that people who live near parks/arts/MP do have a lower life expectancy at a significance level of alpha = 0.05.

Visualizations