10.53 Numeric

20180723 Summaries of numeric data are provided using base::summary(). In the following we identify the numeric variables and summarise each. In doing so, as a data scientist, we want to again observe any oddities and to explain them.

ds %>%
  sapply(is.numeric) %>%
  which() %>%
  names %T>%
  print() ->
numi
##  [1] "min_temp"        "max_temp"        "rainfall"        "evaporation"    
##  [5] "sunshine"        "wind_gust_speed" "wind_speed_9am"  "wind_speed_3pm" 
##  [9] "humidity_9am"    "humidity_3pm"    "pressure_9am"    "pressure_3pm"   
## [13] "cloud_9am"       "cloud_3pm"       "temp_9am"        "temp_3pm"       
## [17] "risk_mm"
ds[numi] %>% 
  summary()
##     min_temp        max_temp        rainfall        evaporation    
##  Min.   :-8.70   Min.   :-4.10   Min.   :  0.000   Min.   :  0.00  
##  1st Qu.: 7.50   1st Qu.:17.90   1st Qu.:  0.000   1st Qu.:  2.60  
##  Median :11.90   Median :22.60   Median :  0.000   Median :  4.80  
##  Mean   :12.09   Mean   :23.21   Mean   :  2.348   Mean   :  5.51  
##  3rd Qu.:16.80   3rd Qu.:28.20   3rd Qu.:  0.600   3rd Qu.:  7.40  
##  Max.   :33.90   Max.   :48.90   Max.   :474.000   Max.   :138.70  
##  NA's   :3800    NA's   :3630    NA's   :6775      NA's   :123256  
##     sunshine      wind_gust_speed  wind_speed_9am  wind_speed_3pm 
##  Min.   : 0.00    Min.   :  2.00   Min.   : 0.00   Min.   : 0.00  
##  1st Qu.: 4.90    1st Qu.: 31.00   1st Qu.: 7.00   1st Qu.:13.00  
##  Median : 8.50    Median : 39.00   Median :13.00   Median :17.00  
##  Mean   : 7.63    Mean   : 40.06   Mean   :14.06   Mean   :18.59  
##  3rd Qu.:10.60    3rd Qu.: 48.00   3rd Qu.:19.00   3rd Qu.:24.00  
##  Max.   :14.50    Max.   :146.00   Max.   :87.00   Max.   :87.00  
##  NA's   :132637   NA's   :16800    NA's   :4433    NA's   :8190   
....

Reviewing this information we can make some obvious observations. Temperatures, for example, appears to be in degrees Celsius rather than Fahrenheit. Rainfall looks like millimetres. There are some quite skewed distributions with min and median small but large max values. As data scientists we will further explore the distributions as in Chapter 9.



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0