StevenWingett / LifeSciencesTrainingDatasets

A collection of datasets and accompanying scripts for learning how to analyse data
GNU General Public License v3.0
7 stars 5 forks source link

Hobbies data percent column meaning #25

Closed s-andrews closed 4 years ago

s-andrews commented 4 years ago

From the documentation it sounds like the percent column in the hobby dataset should be the percentage of time which each hobby occupied, which would mean that it should add up to 100? However it doesn't:

> sum(Childrens_Indoor_Hobbies_During_Lockdown$Percent)
[1] 61.2
> sum(Childrens_Outdoor_Hobbies_During_Lockdown$Percent)
[1] 24

The values I get are somewhat different;

> Childrens_Indoor_Hobbies_During_Lockdown %>% mutate(mypc=100*Number/sum(Number))
         Indoor.Hobby Number Percent       mypc
1       Arts & Crafts    195    12.5 21.8120805
2   Puzzles and Games    162    11.3 18.1208054
3      Building stuff     11     0.8  1.2304251
4            Cleaning      4     0.3  0.4474273
5            Computer     35     2.4  3.9149888
6      Cooking/Baking     32     2.1  3.5794183
7  Designing/Creating      8     0.6  0.8948546
8      Helping Others      1     0.1  0.1118568
9    Imaginitive Play      9     0.6  1.0067114
10             Tablet     12     0.8  1.3422819
11           Learning     12     0.8  1.3422819
12               Lego     51     3.4  5.7046980
13      Making Videos      3     0.2  0.3355705
14              Music     28     2.0  3.1319911
15   Physical ability     37     2.6  4.1387025
16              Phone      2     0.2  0.2237136
17            Reading     67     4.5  7.4944072
18             Sewing      1     0.7  0.1118568
19           Sleeping      1     0.1  0.1118568
20         Television     47     3.2  5.2572707
21               Toys     18     1.2  2.0134228
22         Video Chat      7     0.5  0.7829978
23        Video Games    149    10.2 16.6666667
24            Writing      2     0.1  0.2237136
s-andrews commented 4 years ago

Actually, it could simply be that the "None of the above" people aren't listed. In which case this could be a nice example to use. Leave this as it is.