bobcastillo
bobcastillo
Data Analytics Journey
4 posts
Contains exercises and projects regarding analytics
Don't wanna be here? Send us removal request.
bobcastillo · 5 years ago
Text
Graphing Life Expectancy and Urban Rates Data.
Research question: is there an association between life-expectancy and urban rate? Data set: Gapminder
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
Under the variable “life expectancy”, the count of values are skewed to the left. it means in the data set there are more countries with a life expectancy of above 70%. Since the values of the said variable range from 40% to 100%, After categorizing them into three groups the graph returned an almost symmetrical pattern. The result showed that the most of the countries considered have a 60% to 80% life expectancy.
On the other hand, the variable “urban rate”, the count of values are also skewed to the left but favors a normal distribution compared to the previous variable with the peak between 60% to 80%. The values of the said variable range from 10% to 90%, After categorizing them into 5 bins the graph shows that it is skewed to the left. Similar to the first variable, the result showed that the most of the countries considered have a 60% to 80% urban rate.
Overall, there is a positive relationship between life expectancy and urban rate. Interestingly, on the scatterplot when urban rate is small there is a weak relationship or association. Meanwhile, as urban rate continues to increase, the relationship or association is getting stronger. Additionally, there are also two things the researcher would like to point out. First, between to 65% to 85% there are numerous data points above the line of best fit which means life expectancy is better than expected. Second,  between to 85% to 100% there are numerous data points below the line of best fit which means life expectancy has is slightly worse than expected. It seems that when a country’s urban rate have passed 80%, it can have negative returns to life expectancy. 
0 notes
bobcastillo · 5 years ago
Text
Categorizing/Binning Gapminder data
Below are the pictures of my work followed by the findings after categorizing/binning the data. Polity score was no longer categorized since I’ve only considered observation that had 5,6,7,8,9,10 value. Hence, there are only two variables that were in need of being categorized.
Tumblr media Tumblr media
The categorized variables of urbanrate and lifeexpectancy were assigned to new variables: urban and life, respectively. For urban, 39.58% of countries considered, which is the highest percentage, means that nearly half or around 2/5 of the countries have 60% to 80% urban rate. On the other hand, for life, 65.62% of countries considered, which is the highest percentage, means that more than half or or just above 3/5 of the countries have a life expectancy of 60% to 80% urban rate.
0 notes
bobcastillo · 5 years ago
Text
First Program - C1 - Week 2
Note from the discussion forum:  ”Binning continuous variables into intervals is introduced in a later video." Hence, “urbanrate” and “lifeexpectancy” have the same counts and frequency.
Tumblr media Tumblr media
Original question: Are urban rate and life expectancy associated?
Refined question: Are urban rate and life expectancy associated among countries that are highly democratic?
Originally, the data set contains two hundred twelve (212) countries. After slicing the data to include only countries which had a polity score of greater than or equal to five (5) which means the country is leaning more to as democratic, only ninety six (96) countries remain.
Since the variables “urbanrate” and “lifeexpectancy” are continuous or containing decimals, percentages and counts in this phase is not really helpful to see patterns and trends. It was said on the discussion that “binning” of the said variable types will be discussed in a later video. Only the variable “lifeexpectancy” had one NaN or missing value.
The polity score, collected by Polity IV Project during 2009 and made available by Gapminder, it is calculated by subtracting an autocracy score from a democracy score. The summary measure of a country's democratic and free nature. -10 is the lowest value, 10 the highest. 
Since the data set was sliced to include scores greater than or equal to five (5) there are no scores less than 5 present on the table. It could be observed that on the remaining polity scores, a score of 10 had 34%, which is the highest among them. It is followed by the scores: 8,9,7,6 respectively which has a percentage that range between 10% and 20% . Lastly, the polity score 5 had around 7%.
0 notes
bobcastillo · 5 years ago
Text
Urbanization and life-expectancy.
Chosen data set: Gapminder. Variables chosen: urnbanrate and lifeexpectancy. Research Question: Is there an association between the rate of urbanization and life-expectancy globally?
Literature review
Urbanization is wherein the proportion of a country’s population increase to choose to reside in Urban areas than in the countryside (Wang, 2018). Leon (2008) said that metropolitan areas have become the center where innovations have arisen. He discussed the reason why people are shifting to move to rural areas is because there is a promise of greater life due to increase in economic activities.
              Most argue that urbanization has increased life expectancy. This is because of better access to healthcare, public transportation, and grocery stores for food (Sing and Siahpush 2009; Leon 2008). It is found that there is a great difference with the variables that affect life-expectancy within countries that are developed and developing countries. It was observed that in the former, that government play a big role in ensuring high-quality healthcare is provided and that in most developed countries, costs related acquiring services in the health sector were little to none(Doorslaer et al. 2006). Additionally, they have also found that in those countries, the rich generally visit a physician than their lower income counterparts. On the other hand, developing countries had less access to healthcare. Road accessibility, availability of drugs, financial capacity, poor sanitation, and quality care are the variables that are of importance (Peters et al, 2008). Additionally, undernutrition in rural areas for kids were prevalent but had a higher risk to being overweight (Eckert and Kohler 2014). Even with those challenges faced by developing countries it is still urban areas that get better mortality rates, especially with children because of vaccination (Leon,2008).
              Meanwhile some say that urbanization decrease or that benefits of urbanization are negated by variables that are caused by urbanization. Air pollution was found as one the factors that negate or undermine the short term and long-term benefits of living in a metropolitan city (Wang, 2018). It can be observed that cities tend to have more factories that emit greenhouse gases in the air that people breathe. Also, people who are financially incapable, especially those living in slums which populous cities gave rise to have little to no access to healthcare (Dye,2008). Drugs, violence, HIV, and spread of epidemic diseases is easier throughout urban areas (Leon,2008).
              Urbanization has its positive and negative benefits across countries. Usually, developed countries have better access to general healthcare than developing countries. Still, urban areas in both types of countries have better healthcare than rural areas.  This research aims to look if there is an association between the rate of urbanization and life-expectancy globally. With the previous findings, the general hypothesis is that it is likely that as urbanization increases, life-expectancy increases.
Research Question: Is there an association between the rate of urbanization and life-expectancy globally?
Keywords: Urbanization, Urban, Metropolitan, Countryside, Life-expectancy, Mortality, Health, Healthcare, and Global Health.
 References:
1.      Dye, C. (2008). Health and Urban Living. Science, 319(5864), 766–769. https://doi.org/10.1126/science.1150198
2.      Eckert, S., & Kohler, S. (2014). Urbanization and Health in Developing Countries: A Systematic Review. World Health & Population, 15(1), 7–20. https://doi.org/10.12927/whp.2014.23722
3.      Leon, D. A. (2008). Cities, urbanization and health. International Journal of Epidemiology, 37(1), 4–8. https://doi.org/10.1093/ije/dym271
4.      Peters, D. H., Garg, A., Bloom, G., Walker, D. G., Brieger, W. R., & Hafizur Rahman, M. (2008). Poverty and Access to Health Care in Developing Countries. Annals of the New York Academy of Sciences, 1136(1), 161–171. https://doi.org/10.1196/annals.1425.011
5.      Singh, G. K., & Siahpush, M. (2014). Widening Rural–Urban Disparities in Life Expectancy, U.S., 1969–2009. American Journal of Preventive Medicine, 46(2), e19–e29. https://doi.org/10.1016/j.amepre.2013.10.017
6.      van Doorslaer, E. (2006). Inequalities in access to medical care by income in developed countries. Canadian Medical Association Journal, 174(2), 177–183. https://doi.org/10.1503/cmaj.050584
7.      Wang Q. Urbanization and Global Health: the role of air pollution. Iran J Public Health 2018;47:1644–1652.
1 note · View note