Preparing the data for time spend
I use this data because I want to know how people spend their time across many different countries. I want to know how different gender spend their time, how age affect daily activity,and how many hour do they spend working.
This is the link to where I find the data and link is the csv format of the data source.
Read data
View data with glimpse
glimpse(times)
Rows: 494
Columns: 13
$ LOCATION <chr> "AUS", "AUS", "AUS", "AUT", "AUT", "AUT", "BEL"…
$ Country <chr> "Australia", "Australia", "Australia", "Austria…
$ DESC <chr> "UPW", "UPW", "UPW", "UPW", "UPW", "UPW", "UPW"…
$ Description <chr> "Unpaid work", "Unpaid work", "Unpaid work", "U…
$ SEX <chr> "TOTAL", "WOMEN", "MEN", "TOTAL", "WOMEN", "MEN…
$ Sex <chr> "Total", "Women", "Men", "Total", "Women", "Men…
$ AGE <chr> "15_64", "15_64", "15_64", "15_64", "15_64", "1…
$ Age <chr> "15-64", "15-64", "15-64", "15-64", "15-64", "1…
$ T <chr> "LY", "LY", "LY", "LY", "LY", "LY", "LY", "LY",…
$ Time <chr> "Latest year", "Latest year", "Latest year", "L…
$ Value <dbl> 243.1689, 311.0000, 171.5958, 202.0000, 269.172…
$ `Flag Codes` <chr> "D", "D", "D", NA, NA, NA, NA, NA, NA, NA, NA, …
$ Flags <chr> "Difference in methodology", "Difference in met…
Change name from Sex to gender and select columns needed for analysis
Reviewing time2
glimpse(times2)
Rows: 494
Columns: 11
$ LOCATION <chr> "AUS", "AUS", "AUS", "AUT", "AUT", "AUT", "BEL"…
$ Country <chr> "Australia", "Australia", "Australia", "Austria…
$ DESC <chr> "UPW", "UPW", "UPW", "UPW", "UPW", "UPW", "UPW"…
$ Description <chr> "Unpaid work", "Unpaid work", "Unpaid work", "U…
$ Gender <chr> "TOTAL", "WOMEN", "MEN", "TOTAL", "WOMEN", "MEN…
$ Age <chr> "15-64", "15-64", "15-64", "15-64", "15-64", "1…
$ T <chr> "LY", "LY", "LY", "LY", "LY", "LY", "LY", "LY",…
$ Time <chr> "Latest year", "Latest year", "Latest year", "L…
$ Value <dbl> 243.1689, 311.0000, 171.5958, 202.0000, 269.172…
$ `Flag Codes` <chr> "D", "D", "D", NA, NA, NA, NA, NA, NA, NA, NA, …
$ Flags <chr> "Difference in methodology", "Difference in met…
write_csv(times2, file = "times_use2.csv")