8.2 Data Glimpse

20200317 Another useful tool to quickly review the dataset is pillar::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, 2008-02…
## $ Location      <chr> "Sydney", "Sydney", "Sydney", "Sydney", "Sydney", "Sydne…
## $ MinTemp       <dbl> 19.5, 19.5, 21.6, 20.2, 19.7, 20.2, 18.6, 17.2, 16.4, 14…
## $ MaxTemp       <dbl> 22.4, 25.6, 24.5, 22.8, 25.7, 27.2, 26.3, 22.3, 20.8, 24…
## $ Rainfall      <dbl> 15.6, 6.0, 6.6, 18.8, 77.4, 1.6, 6.2, 27.6, 12.6, 8.8, 0…
## $ Evaporation   <dbl> 6.2, 3.4, 2.4, 2.2, NA, 2.6, 5.2, 5.8, 4.8, 4.4, 6.4, 6.…
## $ Sunshine      <dbl> 0.0, 2.7, 0.1, 0.0, 0.0, 8.6, 5.2, 2.1, 3.0, 10.1, 8.0, …
## $ WindGustDir   <chr> NA, 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, NA, …
## $ WindDir9am    <chr> "S", "W", "ESE", "NNE", "NNE", "W", "W", "S", "SSW", "W"…
## $ WindDir3pm    <chr> "SSW", "E", "ESE", "E", "W", "ENE", "S", "SE", "W", "SSE…
## $ WindSpeed9am  <dbl> 17, 9, 17, 22, 11, 9, 15, 7, 19, 11, 9, 7, 24, 15, 19, 1…
## $ WindSpeed3pm  <dbl> 20, 13, 2, 20, 6, 22, 15, 15, 9, 20, 26, 24, 30, 19, 22,…
## $ Humidity9am   <dbl> 92, 83, 88, 83, 88, 69, 75, 77, 92, 80, 78, 68, 87, 81, …
## $ Humidity3pm   <dbl> 84, 73, 86, 90, 74, 62, 80, 61, 91, 53, 53, 67, 70, 51, …
## $ Pressure9am   <dbl> 1017.6, 1017.9, 1016.7, 1014.2, 1008.3, 1002.7, 999.0, 1…
## $ Pressure3pm   <dbl> 1017.4, 1016.4, 1015.6, 1011.8, 1004.8, 998.6, 1000.3, 1…
## $ Cloud9am      <dbl> 8, 7, 7, 8, 8, 6, 4, 7, 7, 4, 7, 7, 8, 7, 7, 7, 7, 7, 7,…
## $ Cloud3pm      <dbl> 8, 7, 8, 8, 8, 6, 7, 8, 7, 2, 8, 7, 7, 1, 3, 6, 7, 6, 7,…
## $ Temp9am       <dbl> 20.7, 22.4, 23.5, 21.4, 22.5, 23.8, 21.7, 18.9, 17.1, 17…
## $ Temp3pm       <dbl> 20.9, 24.8, 23.0, 20.9, 25.5, 26.0, 22.3, 21.1, 16.5, 23…
## $ RainToday     <chr> "Yes", "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.0, 0.…
## $ RainTomorrow  <chr> "Yes", "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.



Your donation will support ongoing development 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-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.