10.48 Location

20180723 From our review of the data so far we start to make some observations about the character variables. The first is location. We note that several locations were reported in the above exploration of the dataset. We can confirm the number of locations by counting the number of base::unique() values the variable has in the original dataset.

# How many locations are represented in the dataset.

ds$location %>%
  unique() %>%
  length()
## [1] 49

We may not know in general what other locations we will come across in related datasets and we already have quite a collection of 49 locations. We will retain this variable as a character data type.

Here is a list of locations and their frequencies in the dataset.

ds$location %>%
  table()
## .
##         Adelaide           Albany           Albury     AliceSprings 
##             3924             4348             4349             4349 
##    BadgerysCreek         Ballarat          Bendigo         Brisbane 
##             4301             4349             4340             4502 
##           Cairns         Canberra            Cobar     CoffsHarbour 
##             4349             4745             4318             4318 
##         Dartmoor           Darwin        GoldCoast           Hobart 
##             4318             4502             4349             4502 
##        Katherine       Launceston        Melbourne MelbourneAirport 
##             2887             4349             4502             4318 
##          Mildura            Moree     MountGambier      MountGinini 
##             4318             4318             4348             4337 
##        Newcastle             Nhil        NorahHead    NorfolkIsland 
##             4030             2887             4313             4318 
##        Nuriootpa       PearceRAAF          Penrith            Perth 
##             4317             4317             4348             4501 
##     PerthAirport         Portland         Richmond             Sale 
##             4317             4318             4318             4318 
##       SalmonGums           Sydney    SydneyAirport       Townsville 
##             4271             4653             4318             4349 
##      Tuggeranong            Uluru       WaggaWagga          Walpole 
##             4348             2887             4318             4314 
##         Watsonia      Williamtown      Witchcliffe       Wollongong 
....


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