June 3, 2018

Human Well Being

How does your country perform when it comes to education, environment, safety and other topics important to your well-being?

Using data from the OECD Regional Well-Being iniciative, I created a Shiny App that allow you to compare 11 topics between two different countries (OCDE members).

The topics measured are: income, jobs, housing, health, access to services, environment, education, safety, civic engagement and governance, community, and life satisfaction.

Getting & Cleaning the data

  • The data is available here. Only the information pertaining to countries was considered.

  • Some tidiness was required to properly manage the data. tidyr was very useful in this case:

library(tidyr)
wb <- gather(wb0, key=topic, value=education:life_satisfaction, -country)

Visualization

  • A widget allow the user to select two countries.
  • Based on the selection, a plot is created with ggplot2 and coord_polar:
ggplot(wb2, aes(x=topic, y=value, col=country, group=country)) + 
      ylim(0,10) + geom_polygon(fill=NA) + geom_point(size=2) + 
      coord_polar() + theme(text = element_text(size=15))
  • The chart obtained with this method, known as Radar Chart, is very useful to display multivariate data.

Try the App!