Visualizations

Row

Row

Distribution of Global Fertility

Quantile Distribution by Continent

Data Source Reference

UN Data 2021, Population growth, fertility, life expectancy and mortality datasets, data file, United Nations Statistics Division, New York, Viewed 10 August 2021, http://data.un.org/_Docs/SYB/CSV/SYB62_246_201907_Population%20Growth,%20Fertility%20and%20Mortality%20Indicators.csv.

UN Data 2021, GDP and GDP per capita , data file, United Nations Statistics Division, New York, Viewed 10 August 2021, http://data.un.org/_Docs/SYB/CSV/SYB63_230_202009_GDP%20and%20GDP%20Per%20Capita.csv.

Department of Economic and Social Affairs, Population Division, United Nations 2020, World Fertility and Family Planning, viewed 10 August 2021, https://www.un.org/en/development/desa/population/publications/pdf/family/World_Fertility_and_Family_Planning_2020_Highlights.pdf.

---
title: "Fertility: a probable worrying issue in the future"
author: "Tianzhuo Zheng"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    source_code: embed
---

Inputs {.sidebar data-width=400}
=====================================
## Brief Introduction
Despite continuous GDP growth, the world fertility has been decreasing markedly over past decades. According to the latest UN World Fertility and Family Planning report, the global level of fertility is expected to reach 2.2 live births per woman in 2050 and 1.9 in 2100, according to the medium-variant projection. As of today, close to half of the population in the world has been living in a country or region where lifetime fertility is below 2.1 live births per woman which is roughly the level required for population with low mortality to have a growth rate of zero in the long run. 


There would be series of social and economic issues triggered by the decrease, such as ageing, depopulation, labor shortage, social security deficit etc. People might have to start thinking about how to address the issue in the imminent future.


Visualizations
=====================================
Row
-----------------------------------------------------------------------
###    
```{r}
library(plotly)
library(tidyverse)
df1 <- read_csv("C:/Users/reni0/Downloads/children-per-woman-by-gdp-per-capita.csv")
df1<- drop_na(df1)
df1$Region<-as.factor(df1$Region)
colblind=c("#41AE76", "#DF65B0", "#6BAED6", "#FC9272", "#542788", "#FFD92F")
vis1 <- df1 %>%
  plot_ly(
    x = ~GDP,
    y = ~Fertility,
    frame = ~Year,
    text = paste(df1$Entity,
                 "
Fertility : ",df1$Fertility, "
GDP Percap : ", df1$GDP), hoverinfo = "text", type = 'scatter', mode = 'markers', marker = list(opacity = 0.7,sizemode="diameter"), size = ~log(Population), sizes=c(3,30), color= ~Region, colors = colblind ) vis1 %>% layout(legend = list(orientation = 'h', x=0,y=0.01),title="Trend of Fertililty VS GDP Per Capita 1950-2017", xaxis = list(type = "log",title="GDP Per Capita"),yaxis=list(title="Number of Child Birth Per woman in Average"))%>% animation_slider( currentvalue = list(prefix = "Year ", font = list(color="Steelblue")) ) ``` Row {.tabset} ----------------------------------------------------------------------- ### Distribution of Global Fertility ```{r} library(plotly) library(tidyverse) df2 <- read_csv("C:/Users/reni0/Downloads/children-per-woman-UN.csv") df2<- drop_na(df2) vis2<-df2%>%plot_ly(x = ~Ave_Child_Birth,type = 'histogram',histnorm = "probability",frame=~Year,nbinsx = 20) vis2 %>% layout(title = 'Distribution of Average Child Birth Per Woman Worldwide', xaxis = list(title="Number of Child Birth"),yaxis=list(title="Proportion"),bargap=0.1)%>%animation_slider(currentvalue = list(prefix = "Year ", font = list(color="Steelblue"))) ``` ### Quantile Distribution by Continent ```{r} vis3 <- plot_ly(df1, y = ~Fertility, color = ~Region, colors= colblind, type = "box",frame=~Year) vis3 %>% layout(title = 'Quantile Distribution of Average Child Birth Per Woman',yaxis=list(title="Number of Child Birth Per woman in Average"))%>%animation_slider(currentvalue = list(prefix = "Year ", font = list(color="Steelblue"))) ``` Data Source Reference ===================================== ### UN Data 2021, Population growth, fertility, life expectancy and mortality datasets, data file, United Nations Statistics Division, New York, Viewed 10 August 2021, . UN Data 2021, GDP and GDP per capita , data file, United Nations Statistics Division, New York, Viewed 10 August 2021, . Department of Economic and Social Affairs, Population Division, United Nations 2020, World Fertility and Family Planning, viewed 10 August 2021, .