Go to TogaWare.com Home Page. Data Science Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

Data Glimpse

20200317 Another useful tool to quickly review the dataset is dplyr::glimpse(). Data from all columns is presented, including the first observations of the individual columns.

glimpse(ds)
## Rows: 3,984
## Columns: 24
## $ Date          <dttm> 2008-02-01, 2008-02-02, 2008-02-03, 2008-02-04, 2...
## $ Location      <chr> "Sydney", "Sydney", "Sydney", "Sydney", "Sydney", ...
## $ MinTemp       <dbl> 19.5, 19.5, 21.6, 20.2, 19.7, 20.2, 18.6, 17.2, 16...
## $ MaxTemp       <dbl> 22.4, 25.6, 24.5, 22.8, 25.7, 27.2, 26.3, 22.3, 20...
## $ Rainfall      <dbl> 15.6, 6.0, 6.6, 18.8, 77.4, 1.6, 6.2, 27.6, 12.6, ...
## $ Evaporation   <dbl> 6.2, 3.4, 2.4, 2.2, NA, 2.6, 5.2, 5.8, 4.8, 4.4, 6...
## $ Sunshine      <dbl> 0.0, 2.7, 0.1, 0.0, 0.0, 8.6, 5.2, 2.1, 3.0, 10.1,...
## $ WindGustDir   <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA...
## $ WindGustSpeed <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA...
## $ WindDir9am    <chr> "S", "W", "ESE", "NNE", "NNE", "W", "W", "S", "SSW...
## $ WindDir3pm    <chr> "SSW", "E", "ESE", "E", "W", "ENE", "S", "SE", "W"...
## $ WindSpeed9am  <dbl> 17, 9, 17, 22, 11, 9, 15, 7, 19, 11, 9, 7, 24, 15,...
## $ WindSpeed3pm  <dbl> 20, 13, 2, 20, 6, 22, 15, 15, 9, 20, 26, 24, 30, 1...
## $ Humidity9am   <dbl> 92, 83, 88, 83, 88, 69, 75, 77, 92, 80, 78, 68, 87...
## $ Humidity3pm   <dbl> 84, 73, 86, 90, 74, 62, 80, 61, 91, 53, 53, 67, 70...
## $ Pressure9am   <dbl> 1017.6, 1017.9, 1016.7, 1014.2, 1008.3, 1002.7, 99...
## $ Pressure3pm   <dbl> 1017.4, 1016.4, 1015.6, 1011.8, 1004.8, 998.6, 100...
## $ Cloud9am      <dbl> 8, 7, 7, 8, 8, 6, 4, 7, 7, 4, 7, 7, 8, 7, 7, 7, 7,...
## $ Cloud3pm      <dbl> 8, 7, 8, 8, 8, 6, 7, 8, 7, 2, 8, 7, 7, 1, 3, 6, 7,...
## $ Temp9am       <dbl> 20.7, 22.4, 23.5, 21.4, 22.5, 23.8, 21.7, 18.9, 17...
## $ Temp3pm       <dbl> 20.9, 24.8, 23.0, 20.9, 25.5, 26.0, 22.3, 21.1, 16...
## $ RainToday     <chr> "Yes", "Yes", "Yes", "Yes", "Yes", "Yes", "Yes", "...
## $ RISK_MM       <dbl> 6.0, 6.6, 18.8, 77.4, 1.6, 6.2, 27.6, 12.6, 8.8, 0...
## $ RainTomorrow  <chr> "Yes", "Yes", "Yes", "Yes", "Yes", "Yes", "Yes", "...

Notice the style used for variable names here. Different datasets will use different styles. It is useful to convert the variable names (and the levels of a factor) to a canonical form across all of the dataset that we deal with and so avoid having to remember particular naming schemes. We do this next.


Support further development by purchasing the PDF version of the book.
Other online resources include the GNU/Linux Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 2000-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.