Data Science Desktop Survival Guide
by Graham Williams |
|||||
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()
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()
|