Carpe Diem | A life expectancy calculator

Description

Carpe Diem (http://tberic.shinyapps.io/CarpeDiem/) is a life expectancy calculator that tells the users how much more time they have based on their country of residence and sex.

The user selects his country of residence, sex and date of birth. Then we calculate the difference between the life expectancy of the user and his age.

The data

The raw life expectancy data is taken from UN data and can be accessed here: https://data.un.org/Data.aspx?q=life+expectancy&d=PopDiv&f=variableID%3a67 https://data.un.org/Data.aspx?q=life+expectancy&d=PopDiv&f=variableID%3a66

We use a cleaned up and reduced version of those tables which we load in this way:

LE <- read.csv("data/LifeExpectancy.csv")

Data visualization

Here we give a scatterplot of male vs. female life expectancies.

plot(LE$M, LE$F, xlab = "male LE", ylab = "female LE")

plot of chunk unnamed-chunk-2

Conclusion

Carpe Diem is a simple shiny app which serves an important purpose - to remind people that time is precious and shouldn't be squandered. Also, it illustrates the disparities in life expectancies between different countries - more developed countries have a higher life expectancy.