UK Smoking DataSource:
Survey data on smoking habits from the UK. The data set can be used for analyzing the demographic characteristics of smokers and types of tobacco consumed.
A data frame with 1691 observations on the following 12 variables.
Gender with levels
Marital status with levels
Highest education level with levels
Nationality with levels
Ethnicity with levels
Gross income with levels
2,600 to 5,200,
5,200 to 10,400,
10,400 to 15,600,
15,600 to 20,800,
20,800 to 28,600,
28,600 to 36,400,
Region with levels
Midlands & East Anglia,
Smoking status with levels
Number of cigarettes smoked per day on weekends.
Number of cigarettes smoked per day on weekdays.
Type of cigarettes smoked with levels
National STEM Centre, Large Datasets from stats4schools, https://www.stem.org.uk/resources/elibrary/resource/28452/large-datasets-stats4schools.
library(ggplot2) ggplot(smoking, aes(x = amt_weekends)) + geom_histogram(binwidth = 5) #> Warning: Removed 1270 rows containing non-finite values (stat_bin). ggplot(smoking, aes(x = amt_weekdays)) + geom_histogram(binwidth = 5) #> Warning: Removed 1270 rows containing non-finite values (stat_bin). ggplot(smoking, aes(x = gender, fill = smoke)) + geom_bar(position = "fill") ggplot(smoking, aes(x = marital_status, fill = smoke)) + geom_bar(position = "fill")