happiness {MESS} | R Documentation |
Happiness score and tax rates for 148 countries
Description
Dataset on subjective happiness, tax rates, population sizes, continent, and major religion for 148 countries
Format
A data frame with 148 observations on the following 6 variables.
- country
a factor with 148 levels that contain the country names
- happy
a numeric vector with the average subject happiness score (on a scale from 0-10)
- tax
a numeric vector showing the tax revenue as percentage of GDP
- religion
a factor with levels
Buddhist
Christian
Hindu
Muslim
None
orOther
- continent
a factor with levels
AF
,AS
,EU
,NA
,OC
,SA
, corresponding to the continents Africa, Asia, Europe, North America, Ocenaia, South American, respectively- population
a numeric vector showing the population (in millions)
Source
Data collected by Ellen Ekstroem.
Population sizes are from
Wikipedia per August 2nd, 2012
https://en.wikipedia.org/wiki/List_of_countries_by_population
Major
religions are from Wikipedia per August 2nd, 2012
https://en.wikipedia.org/wiki/Religions_by_country
Tax rates are
from Wikipedia per August 2nd, 2012
https://en.wikipedia.org/wiki/List_of_countries_by_tax_revenue_as_percentage_of_GDP
Average happiness scores are from "Veenhoven, R. Average happiness in
148 nations 2000-2009, World Database of Happiness, Erasmus University
Rotterdam, The Netherlands". Assessed on August 2nd, 2012 at:
https://worlddatabaseofhappiness-archive.eur.nl/hap_nat/findingreports/RankReport_AverageHappiness.php
Examples
data(happiness)
with(happiness, symbols(tax, happy, circles=sqrt(population)/8, inches=FALSE, bg=continent))
#
# Make a prettier image with transparent colors
#
newcols <- rgb(t(col2rgb(palette())),
alpha=100, maxColorValue=255)
with(happiness, symbols(tax, happy, circles=sqrt(population)/8,
inches=FALSE, bg=newcols[continent],
xlab="Tax (% of GDP)", ylab="Happiness"))
#
# Simple analysis
#
res <- lm(happy ~ religion + population + tax:continent, data=happiness)
summary(res)