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             5781             5782             5782 
##    BadgerysCreek         Ballarat          Bendigo         Brisbane 
##             5727             5780             5773             5935 
##           Cairns         Canberra            Cobar     CoffsHarbour 
##             5782             6178             5751             5751 
##         Dartmoor           Darwin        GoldCoast           Hobart 
##             5751             5935             5782             5935 
##        Katherine       Launceston        Melbourne MelbourneAirport 
##             3893             5782             5935             5751 
##          Mildura            Moree     MountGambier      MountGinini 
##             5751             5751             5781             5770 
##        Newcastle             Nhil        NorahHead    NorfolkIsland 
##             4030             4320             5746             5751 
##        Nuriootpa       PearceRAAF          Penrith            Perth 
##             5750             5750             5781             5934 
##     PerthAirport         Portland         Richmond             Sale 
##             5750             5751             5751             5751 
##       SalmonGums           Sydney    SydneyAirport       Townsville 
##             5704             6086             5751             5782 
##      Tuggeranong            Uluru       WaggaWagga          Walpole 
##             5781             4320             5751             5747 
##         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