Get the data

Download file into json var.

library(jsonlite)

url <- "http://fisherman.pt/uniplaces/cities.topo.json"
json <- fromJSON(url, simplifyDataFrame = FALSE)

Clean the data

Structured data

Non-structured to structured data.

jsonCities <- json$objects$cities$geometries

countCities <- length(jsonCities)
print(countCities)
## [1] 648
countFeatures <- length(jsonCities[[1]]$properties)
print(countFeatures)
## [1] 19
data <- data.frame()
row <- vector()
for (i in 1:countCities) {
    for (j in 1:countFeatures) {
          row[j] <- jsonCities[[i]]$properties[[j]]
    }
    data <- rbind(data, t(as.data.frame(row)))
}

Rename columns, rows

Rename columns, rows.

library(knitr)

names(data) <- names(jsonCities[[1]]$properties)
row.names(data) <- 1:length(jsonCities)

data$count <- as.numeric(as.character(data$count))
data$accom <- as.numeric(as.character(data$accom))
data$landl <- as.numeric(as.character(data$landl))
data$cost1 <- as.numeric(as.character(data$cost1))  
data$cost2 <- as.numeric(as.character(data$cost2))
data$cost3 <- as.numeric(as.character(data$cost3))  
data$cost4 <- as.numeric(as.character(data$cost4))  
data$cost5 <- as.numeric(as.character(data$cost5))  
data$nlife <- as.numeric(as.character(data$nlife))  
data$odoor <- as.numeric(as.character(data$odoor))  
data$qlife <- as.numeric(as.character(data$qlife))  
data$shope <- as.numeric(as.character(data$shope))  
data$unive <- as.numeric(as.character(data$unive))  
data$cultu <- as.numeric(as.character(data$cultu))  
data$clink <- as.character(data$clink)
data$cname <- as.character(data$cname)
data$votes <- as.numeric(as.character(data$votes))  

Remove NAs

Inspect if NAs can be ommited from the analysis, or if they mean something.

sum(is.na(data$cost1))
## [1] 304
sum(is.na(data$cost1))/nrow(data)
## [1] 0.4691358
dataNa <- filter(data, is.na(cost1))
kable(head(dataNa), digits=2, caption="**Table 2: Sample data - NA values**")
Table 2: Sample data - NA values
ccode count accom landl cost1 cost2 cost3 cost4 cost5 nlife odoor qlife shope unive cultu cname votes
3595 0 0 0 NA NA NA NA NA NA NA NA NA NA NA Bragança 184
3595 0 0 0 NA NA NA NA NA NA NA NA NA NA NA Covilhã 134
3595 0 0 0 NA NA NA NA NA NA NA NA NA NA NA Malaga 132
3595 0 0 0 NA NA NA NA NA NA NA NA NA NA NA Strasbourg 105
3595 0 0 0 NA NA NA NA NA NA NA NA NA NA NA Rovaniemi 100
3595 0 0 0 NA NA NA NA NA NA NA NA NA NA NA Aveiro 95

We can safely remove NAs.

data <- filter(data, !is.na(cost1))

Prepare the data

Units

The scale appears to range between 0 and 100, for all features.

Overral

library(ggplot2)
summary(data$accom)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   40.00   80.00   80.00   79.92   82.46  100.00
qplot(data$accom, geom="histogram", xlab = "\nRating", ylab = "Count\n", main="Histogram of accom\n")

summary(data$landl)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   45.00   82.84   86.00   83.79   86.00  100.00
qplot(data$landl, geom="histogram", xlab = "\nRating", ylab = "Count\n", main="Histogram of landl\n")

Best known for

Should add up to 100.

dataBestFor <- mutate(data, total = nlife + odoor + qlife + shope + unive + cultu) 

kable(head(dataBestFor, n= 5), digits = 2, caption="**Table 3: Sample data - Best for**")
Table 3: Sample data - Best for
ccode count accom landl cost1 cost2 cost3 cost4 cost5 nlife odoor qlife shope unive cultu cname votes total
2553 1116 73.57 76.82 4.39 33.15 28.49 30.73 3.23 33.78 5.82 34.77 5.02 2.24 18.37 Madrid 1396 100
2777 974 91.11 89.44 1.33 6.26 21.46 64.07 6.88 8.01 25.56 39.63 0.51 20.53 5.75 Oulu 1293 100
3602 593 77.30 79.71 11.64 44.18 28.50 15.18 0.51 22.60 14.17 34.06 4.38 3.04 21.75 Lisbon 755 100
3412 441 90.61 86.89 35.37 44.44 16.10 3.17 0.91 38.55 9.98 19.73 3.85 10.88 17.01 Vilnius 564 100
2691 337 81.54 81.99 22.85 48.66 20.47 7.42 0.59 16.91 7.12 47.48 4.45 2.97 21.07 Sevilla 544 100

Check!

Cost

Compute total cost

We will use a weighted average.

data <- mutate(data, cost = 1 * cost1/100 + 2 * cost2/100 + 3 * cost3/100 + 4 * cost4/100 + 5 * cost5/100)

kable(head(data, n= 5), digits = 2, caption="**Table 4: Sample data - Total cost**")
Table 4: Sample data - Total cost
ccode count accom landl cost1 cost2 cost3 cost4 cost5 nlife odoor qlife shope unive cultu cname votes cost
2553 1116 73.57 76.82 4.39 33.15 28.49 30.73 3.23 33.78 5.82 34.77 5.02 2.24 18.37 Madrid 1396 2.95
2777 974 91.11 89.44 1.33 6.26 21.46 64.07 6.88 8.01 25.56 39.63 0.51 20.53 5.75 Oulu 1293 3.69
3602 593 77.30 79.71 11.64 44.18 28.50 15.18 0.51 22.60 14.17 34.06 4.38 3.04 21.75 Lisbon 755 2.49
3412 441 90.61 86.89 35.37 44.44 16.10 3.17 0.91 38.55 9.98 19.73 3.85 10.88 17.01 Vilnius 564 1.90
2691 337 81.54 81.99 22.85 48.66 20.47 7.42 0.59 16.91 7.12 47.48 4.45 2.97 21.07 Sevilla 544 2.14

Drop cost1, cost2, cost3, cost4, cost5

data <- data %>%
            select(-cost1, -cost2, -cost3, -cost4, -cost5)

Minimum number of votes

summary(data$count)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    1.00    5.00    5.00   43.74   36.00 1116.00
dataSelected <- filter(data, count >= 100)

Results

City level

Most voted

kable(head(arrange(dataSelected, desc(votes)), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
2553 1116 73.56631 76.81900 33.781362 5.824373 34.76703 5.0179211 2.240143 18.369176 Madrid 1396 2.952509
2777 974 91.10883 89.43532 8.008214 25.564682 39.63039 0.5133470 20.533881 5.749487 Oulu 1293 3.688912
3602 593 77.30186 79.71332 22.596965 14.165261 34.06408 4.3844857 3.035413 21.753794 Lisbon 755 2.487352
3412 441 90.61224 86.89342 38.548753 9.977324 19.72789 3.8548753 10.884354 17.006803 Vilnius 564 1.897959
2691 337 81.54303 81.98813 16.913947 7.121662 47.47774 4.4510386 2.967359 21.068249 Sevilla 544 2.142433
3608 383 80.83551 82.84595 25.848564 11.749347 33.68146 2.8720627 4.960835 20.887729 Porto 487 2.368146
2379 346 72.08092 75.52023 21.098266 10.404624 39.01734 3.7572254 2.312139 23.410405 Barcelona 447 3.225433
3279 314 80.89172 81.56051 66.242038 7.006369 12.10191 1.9108280 2.547771 10.191083 Budapest 421 1.885350
2090 317 84.73186 80.41009 42.902208 8.201893 21.76656 0.9463722 4.416404 21.766562 Prague 409 2.100946
2232 285 85.47368 85.96491 20.000000 10.175439 44.21053 1.7543860 12.631579 11.228070 Regensburg 406 2.947368

Accommodation

Hardest to find

kable(head(arrange(dataSelected, accom), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
3081 118 53.72881 66.18644 5.932203 5.084746 22.88136 0.8474576 7.627119 57.627119 Paris 152 4.381356
3325 185 60.75676 70.37838 39.459460 4.864865 24.86486 2.7027027 5.945946 22.162162 Bologna 267 3.486486
3382 170 65.88235 71.35294 10.000000 6.470588 15.88235 2.9411765 1.176471 63.529412 Rome 216 3.852941
3361 179 68.49162 74.58101 33.519553 2.793296 22.90503 16.2011173 6.703911 17.877095 Milan 220 4.055866
3743 128 72.03125 75.00000 12.500000 7.812500 8.59375 7.0312500 2.343750 61.718750 Istanbul 161 2.343750
2379 346 72.08092 75.52023 21.098266 10.404624 39.01734 3.7572254 2.312139 23.410405 Barcelona 447 3.225433
2553 1116 73.56631 76.81900 33.781362 5.824373 34.76703 5.0179211 2.240143 18.369176 Madrid 1396 2.952509
3385 146 75.06849 77.87671 3.424657 2.739726 42.46575 2.0547945 6.849315 42.465753 Siena 164 3.595890
2004 123 75.60976 78.04878 2.439024 5.691057 60.97561 0.8130081 3.252032 26.829268 Vienna 152 3.528455
2018 285 76.28070 79.01754 36.491228 4.561403 20.35088 0.0000000 35.438597 3.157895 Leuven 393 3.414035

Easiest to find

kable(head(arrange(dataSelected, desc(accom)), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
2069 162 93.82716 90.43210 45.061728 6.1728395 22.22222 3.7037037 14.814815 8.024691 Brno 221 1.858025
2782 121 91.90083 90.57851 13.223140 19.0082645 38.01653 1.6528926 23.966942 4.132231 Turku 146 3.851240
2777 974 91.10883 89.43532 8.008214 25.5646817 39.63039 0.5133470 20.533881 5.749487 Oulu 1293 3.688912
3628 105 90.66667 87.61905 55.238095 7.6190476 19.04762 0.9523810 5.714286 11.428571 Cluj-Napoca 144 1.809524
3412 441 90.61224 86.89342 38.548753 9.9773243 19.72789 3.8548753 10.884354 17.006803 Vilnius 564 1.897959
2731 104 89.42308 89.42308 32.692308 0.9615385 44.23077 3.8461538 12.500000 5.769231 Valladolid 126 2.067308
2338 120 89.00000 88.83333 25.833333 18.3333333 43.33333 0.8333333 2.500000 9.166667 Almeria 154 1.783333
3573 166 88.31325 84.93976 42.168675 6.0240964 30.12048 5.4216867 4.819277 11.445783 Wrocław 215 1.825301
2492 274 87.59124 86.42336 33.941606 4.7445255 30.65693 2.1897810 2.554744 25.912409 Granada 365 1.839416
3542 215 87.53488 84.04651 46.976744 8.3720930 26.04651 6.0465116 7.441860 5.116279 Poznań 269 1.725581

Landlord

Worst

kable(head(arrange(dataSelected, landl), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
3081 118 53.72881 66.18644 5.932203 5.084746 22.88136 0.8474576 7.627119 57.627119 Paris 152 4.381356
3325 185 60.75676 70.37838 39.459460 4.864865 24.86486 2.7027027 5.945946 22.162162 Bologna 267 3.486486
3382 170 65.88235 71.35294 10.000000 6.470588 15.88235 2.9411765 1.176471 63.529412 Rome 216 3.852941
3361 179 68.49162 74.58101 33.519553 2.793296 22.90503 16.2011173 6.703911 17.877095 Milan 220 4.055866
3743 128 72.03125 75.00000 12.500000 7.812500 8.59375 7.0312500 2.343750 61.718750 Istanbul 161 2.343750
2379 346 72.08092 75.52023 21.098266 10.404624 39.01734 3.7572254 2.312139 23.410405 Barcelona 447 3.225433
2553 1116 73.56631 76.81900 33.781362 5.824373 34.76703 5.0179211 2.240143 18.369176 Madrid 1396 2.952509
3385 146 75.06849 77.87671 3.424657 2.739726 42.46575 2.0547945 6.849315 42.465753 Siena 164 3.595890
2004 123 75.60976 78.04878 2.439024 5.691057 60.97561 0.8130081 3.252032 26.829268 Vienna 152 3.528455
2018 285 76.28070 79.01754 36.491228 4.561403 20.35088 0.0000000 35.438597 3.157895 Leuven 393 3.414035

Best

kable(head(arrange(dataSelected, desc(landl)), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
2782 121 91.90083 90.57851 13.223140 19.0082645 38.01653 1.6528926 23.966942 4.132231 Turku 146 3.851240
2069 162 93.82716 90.43210 45.061728 6.1728395 22.22222 3.7037037 14.814815 8.024691 Brno 221 1.858025
2777 974 91.10883 89.43532 8.008214 25.5646817 39.63039 0.5133470 20.533881 5.749487 Oulu 1293 3.688912
2731 104 89.42308 89.42308 32.692308 0.9615385 44.23077 3.8461538 12.500000 5.769231 Valladolid 126 2.067308
2338 120 89.00000 88.83333 25.833333 18.3333333 43.33333 0.8333333 2.500000 9.166667 Almeria 154 1.783333
3628 105 90.66667 87.61905 55.238095 7.6190476 19.04762 0.9523810 5.714286 11.428571 Cluj-Napoca 144 1.809524
3412 441 90.61224 86.89342 38.548753 9.9773243 19.72789 3.8548753 10.884354 17.006803 Vilnius 564 1.897959
2492 274 87.59124 86.42336 33.941606 4.7445255 30.65693 2.1897810 2.554744 25.912409 Granada 365 1.839416
3680 131 86.56489 86.18321 13.740458 18.3206107 52.67176 10.6870229 1.526718 3.053435 Maribor 165 2.274809
2288 115 87.13043 86.17391 13.913044 4.3478261 59.13043 0.8695652 15.652174 6.086957 Odense 172 3.695652

Nightlife

Worst

kable(head(arrange(dataSelected, nlife), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
2004 123 75.60976 78.04878 2.439024 5.691057 60.97561 0.8130081 3.252032 26.829268 Vienna 152 3.528455
3385 146 75.06849 77.87671 3.424657 2.739726 42.46575 2.0547945 6.849315 42.465753 Siena 164 3.595890
3081 118 53.72881 66.18644 5.932203 5.084746 22.88136 0.8474576 7.627119 57.627119 Paris 152 4.381356
2777 974 91.10883 89.43532 8.008214 25.564682 39.63039 0.5133470 20.533881 5.749487 Oulu 1293 3.688912
3382 170 65.88235 71.35294 10.000000 6.470588 15.88235 2.9411765 1.176471 63.529412 Rome 216 3.852941
3679 163 83.19018 84.60123 12.269939 16.564417 48.46626 10.4294479 7.975460 4.294479 Ljubljana 221 2.564417
3743 128 72.03125 75.00000 12.500000 7.812500 8.59375 7.0312500 2.343750 61.718750 Istanbul 161 2.343750
2782 121 91.90083 90.57851 13.223140 19.008264 38.01653 1.6528926 23.966942 4.132231 Turku 146 3.851240
3680 131 86.56489 86.18321 13.740458 18.320611 52.67176 10.6870229 1.526718 3.053435 Maribor 165 2.274809
2288 115 87.13043 86.17391 13.913044 4.347826 59.13043 0.8695652 15.652174 6.086957 Odense 172 3.695652

Best

kable(head(arrange(dataSelected, desc(nlife)), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
3279 314 80.89172 81.56051 66.24204 7.006369 12.10191 1.9108280 2.547771 10.191083 Budapest 421 1.885350
3628 105 90.66667 87.61905 55.23810 7.619048 19.04762 0.9523810 5.714286 11.428571 Cluj-Napoca 144 1.809524
3946 221 85.97285 83.30317 53.39367 2.714932 22.17195 1.8099548 6.334842 13.574661 Salamanca 270 1.932127
3542 215 87.53488 84.04651 46.97674 8.372093 26.04651 6.0465116 7.441860 5.116279 Poznań 269 1.725581
3571 231 80.17316 81.99134 46.32035 5.627706 19.04762 4.3290043 7.792208 16.883117 Warszawa 298 1.822511
3589 224 86.87500 84.91071 45.98214 1.785714 28.12500 0.4464286 11.160714 12.500000 Coimbra 292 2.142857
2069 162 93.82716 90.43210 45.06173 6.172840 22.22222 3.7037037 14.814815 8.024691 Brno 221 1.858025
3517 241 82.40664 81.82573 43.15353 6.224066 21.57676 3.7344398 5.394191 19.917012 Kraków 316 1.792531
2090 317 84.73186 80.41009 42.90221 8.201893 21.76656 0.9463722 4.416404 21.766562 Prague 409 2.100946
3573 166 88.31325 84.93976 42.16867 6.024096 30.12048 5.4216867 4.819277 11.445783 Wrocław 215 1.825301

Outdoor

Worst

kable(head(arrange(dataSelected, odoor), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
2731 104 89.42308 89.42308 32.692308 0.9615385 44.23077 3.8461538 12.500000 5.769231 Valladolid 126 2.067308
3589 224 86.87500 84.91071 45.982143 1.7857143 28.12500 0.4464286 11.160714 12.500000 Coimbra 292 2.142857
3946 221 85.97285 83.30317 53.393665 2.7149321 22.17195 1.8099548 6.334842 13.574661 Salamanca 270 1.932127
3385 146 75.06849 77.87671 3.424657 2.7397260 42.46575 2.0547945 6.849315 42.465753 Siena 164 3.595890
3361 179 68.49162 74.58101 33.519553 2.7932961 22.90503 16.2011173 6.703911 17.877095 Milan 220 4.055866
2288 115 87.13043 86.17391 13.913044 4.3478261 59.13043 0.8695652 15.652174 6.086957 Odense 172 3.695652
2018 285 76.28070 79.01754 36.491228 4.5614035 20.35088 0.0000000 35.438597 3.157895 Leuven 393 3.414035
2492 274 87.59124 86.42336 33.941606 4.7445255 30.65693 2.1897810 2.554744 25.912409 Granada 365 1.839416
2014 167 81.43713 82.45509 22.754491 4.7904192 44.31138 1.1976048 14.371258 12.574850 Ghent 209 3.586826
3325 185 60.75676 70.37838 39.459460 4.8648649 24.86486 2.7027027 5.945946 22.162162 Bologna 267 3.486486

Best

kable(head(arrange(dataSelected, desc(odoor)), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
2777 974 91.10883 89.43532 8.008214 25.56468 39.63039 0.5133470 20.533881 5.749487 Oulu 1293 3.688912
2782 121 91.90083 90.57851 13.223140 19.00826 38.01653 1.6528926 23.966942 4.132231 Turku 146 3.851240
2338 120 89.00000 88.83333 25.833333 18.33333 43.33333 0.8333333 2.500000 9.166667 Almeria 154 1.783333
3680 131 86.56489 86.18321 13.740458 18.32061 52.67176 10.6870229 1.526718 3.053435 Maribor 165 2.274809
2409 214 81.40187 81.86916 16.355140 16.82243 42.99065 1.8691589 3.271028 18.691589 Cadiz 275 2.163551
3679 163 83.19018 84.60123 12.269939 16.56442 48.46626 10.4294479 7.975460 4.294479 Ljubljana 221 2.564417
3602 593 77.30186 79.71332 22.596965 14.16526 34.06408 4.3844857 3.035413 21.753794 Lisbon 755 2.487352
2297 155 83.09677 85.03226 25.806452 13.54839 29.03226 3.2258065 12.258064 16.129032 Tallinn 195 2.451613
3608 383 80.83551 82.84595 25.848564 11.74935 33.68146 2.8720627 4.960835 20.887729 Porto 487 2.368146
2301 111 84.14414 83.51351 25.225225 11.71171 45.04505 3.6036036 6.306306 8.108108 A Coruña 139 2.387387

Quality of life

Worst

kable(head(arrange(dataSelected, qlife), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
3743 128 72.03125 75.00000 12.50000 7.812500 8.59375 7.0312500 2.343750 61.718750 Istanbul 161 2.343750
3279 314 80.89172 81.56051 66.24204 7.006369 12.10191 1.9108280 2.547771 10.191083 Budapest 421 1.885350
3382 170 65.88235 71.35294 10.00000 6.470588 15.88235 2.9411765 1.176471 63.529412 Rome 216 3.852941
3571 231 80.17316 81.99134 46.32035 5.627706 19.04762 4.3290043 7.792208 16.883117 Warszawa 298 1.822511
3628 105 90.66667 87.61905 55.23810 7.619048 19.04762 0.9523810 5.714286 11.428571 Cluj-Napoca 144 1.809524
3412 441 90.61224 86.89342 38.54875 9.977324 19.72789 3.8548753 10.884354 17.006803 Vilnius 564 1.897959
2018 285 76.28070 79.01754 36.49123 4.561403 20.35088 0.0000000 35.438597 3.157895 Leuven 393 3.414035
3517 241 82.40664 81.82573 43.15353 6.224066 21.57676 3.7344398 5.394191 19.917012 Kraków 316 1.792531
2090 317 84.73186 80.41009 42.90221 8.201893 21.76656 0.9463722 4.416404 21.766562 Prague 409 2.100946
3946 221 85.97285 83.30317 53.39367 2.714932 22.17195 1.8099548 6.334842 13.574661 Salamanca 270 1.932127

Best

kable(head(arrange(dataSelected, desc(qlife)), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
2004 123 75.60976 78.04878 2.439024 5.6910569 60.97561 0.8130081 3.252032 26.829268 Vienna 152 3.528455
2288 115 87.13043 86.17391 13.913044 4.3478261 59.13043 0.8695652 15.652174 6.086957 Odense 172 3.695652
3680 131 86.56489 86.18321 13.740458 18.3206107 52.67176 10.6870229 1.526718 3.053435 Maribor 165 2.274809
2729 229 82.96943 84.36681 24.890830 8.7336245 49.34498 1.7467249 5.240175 10.043668 Valencia 304 2.222707
3679 163 83.19018 84.60123 12.269939 16.5644172 48.46626 10.4294479 7.975460 4.294479 Ljubljana 221 2.564417
2691 337 81.54303 81.98813 16.913947 7.1216617 47.47774 4.4510386 2.967359 21.068249 Sevilla 544 2.142433
2301 111 84.14414 83.51351 25.225225 11.7117117 45.04505 3.6036036 6.306306 8.108108 A Coruña 139 2.387387
2014 167 81.43713 82.45509 22.754491 4.7904192 44.31138 1.1976048 14.371258 12.574850 Ghent 209 3.586826
2731 104 89.42308 89.42308 32.692308 0.9615385 44.23077 3.8461538 12.500000 5.769231 Valladolid 126 2.067308
2232 285 85.47368 85.96491 20.000000 10.1754386 44.21053 1.7543860 12.631579 11.228070 Regensburg 406 2.947368

Shopping

Worst

kable(head(arrange(dataSelected, shope), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
2018 285 76.28070 79.01754 36.491228 4.561403 20.35088 0.0000000 35.438597 3.157895 Leuven 393 3.414035
3589 224 86.87500 84.91071 45.982143 1.785714 28.12500 0.4464286 11.160714 12.500000 Coimbra 292 2.142857
2777 974 91.10883 89.43532 8.008214 25.564682 39.63039 0.5133470 20.533881 5.749487 Oulu 1293 3.688912
2004 123 75.60976 78.04878 2.439024 5.691057 60.97561 0.8130081 3.252032 26.829268 Vienna 152 3.528455
2338 120 89.00000 88.83333 25.833333 18.333333 43.33333 0.8333333 2.500000 9.166667 Almeria 154 1.783333
3081 118 53.72881 66.18644 5.932203 5.084746 22.88136 0.8474576 7.627119 57.627119 Paris 152 4.381356
2288 115 87.13043 86.17391 13.913044 4.347826 59.13043 0.8695652 15.652174 6.086957 Odense 172 3.695652
2090 317 84.73186 80.41009 42.902208 8.201893 21.76656 0.9463722 4.416404 21.766562 Prague 409 2.100946
3628 105 90.66667 87.61905 55.238095 7.619048 19.04762 0.9523810 5.714286 11.428571 Cluj-Napoca 144 1.809524
2014 167 81.43713 82.45509 22.754491 4.790419 44.31138 1.1976048 14.371258 12.574850 Ghent 209 3.586826

Best

kable(head(arrange(dataSelected, desc(shope)), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
3361 179 68.49162 74.58101 33.51955 2.793296 22.90503 16.201117 6.703911 17.877095 Milan 220 4.055866
3680 131 86.56489 86.18321 13.74046 18.320611 52.67176 10.687023 1.526718 3.053435 Maribor 165 2.274809
3679 163 83.19018 84.60123 12.26994 16.564417 48.46626 10.429448 7.975460 4.294479 Ljubljana 221 2.564417
3259 105 81.52381 83.42857 38.09524 7.619048 22.85714 9.523810 3.809524 18.095238 Thessaloniki 126 2.542857
3743 128 72.03125 75.00000 12.50000 7.812500 8.59375 7.031250 2.343750 61.718750 Istanbul 161 2.343750
2589 128 85.00000 83.20312 36.71875 6.250000 39.06250 6.250000 6.250000 5.468750 Murcia 173 1.921875
3542 215 87.53488 84.04651 46.97674 8.372093 26.04651 6.046512 7.441860 5.116279 Poznań 269 1.725581
3573 166 88.31325 84.93976 42.16867 6.024096 30.12048 5.421687 4.819277 11.445783 Wrocław 215 1.825301
2553 1116 73.56631 76.81900 33.78136 5.824373 34.76703 5.017921 2.240143 18.369176 Madrid 1396 2.952509
2691 337 81.54303 81.98813 16.91395 7.121662 47.47774 4.451039 2.967359 21.068249 Sevilla 544 2.142433

University

Worst

kable(head(arrange(dataSelected, unive), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
3382 170 65.88235 71.35294 10.00000 6.470588 15.88235 2.9411765 1.176471 63.529412 Rome 216 3.852941
3680 131 86.56489 86.18321 13.74046 18.320611 52.67176 10.6870229 1.526718 3.053435 Maribor 165 2.274809
2553 1116 73.56631 76.81900 33.78136 5.824373 34.76703 5.0179211 2.240143 18.369176 Madrid 1396 2.952509
2379 346 72.08092 75.52023 21.09827 10.404624 39.01734 3.7572254 2.312139 23.410405 Barcelona 447 3.225433
3743 128 72.03125 75.00000 12.50000 7.812500 8.59375 7.0312500 2.343750 61.718750 Istanbul 161 2.343750
2338 120 89.00000 88.83333 25.83333 18.333333 43.33333 0.8333333 2.500000 9.166667 Almeria 154 1.783333
3279 314 80.89172 81.56051 66.24204 7.006369 12.10191 1.9108280 2.547771 10.191083 Budapest 421 1.885350
2492 274 87.59124 86.42336 33.94161 4.744525 30.65693 2.1897810 2.554744 25.912409 Granada 365 1.839416
2691 337 81.54303 81.98813 16.91395 7.121662 47.47774 4.4510386 2.967359 21.068249 Sevilla 544 2.142433
3602 593 77.30186 79.71332 22.59696 14.165261 34.06408 4.3844857 3.035413 21.753794 Lisbon 755 2.487352

Best

kable(head(arrange(dataSelected, desc(unive)), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
2018 285 76.28070 79.01754 36.491228 4.5614035 20.35088 0.0000000 35.43860 3.157895 Leuven 393 3.414035
2782 121 91.90083 90.57851 13.223140 19.0082645 38.01653 1.6528926 23.96694 4.132231 Turku 146 3.851240
2777 974 91.10883 89.43532 8.008214 25.5646817 39.63039 0.5133470 20.53388 5.749487 Oulu 1293 3.688912
2288 115 87.13043 86.17391 13.913044 4.3478261 59.13043 0.8695652 15.65217 6.086957 Odense 172 3.695652
2069 162 93.82716 90.43210 45.061728 6.1728395 22.22222 3.7037037 14.81481 8.024691 Brno 221 1.858025
2014 167 81.43713 82.45509 22.754491 4.7904192 44.31138 1.1976048 14.37126 12.574850 Ghent 209 3.586826
2232 285 85.47368 85.96491 20.000000 10.1754386 44.21053 1.7543860 12.63158 11.228070 Regensburg 406 2.947368
2731 104 89.42308 89.42308 32.692308 0.9615385 44.23077 3.8461538 12.50000 5.769231 Valladolid 126 2.067308
2297 155 83.09677 85.03226 25.806452 13.5483871 29.03226 3.2258065 12.25806 16.129032 Tallinn 195 2.451613
3589 224 86.87500 84.91071 45.982143 1.7857143 28.12500 0.4464286 11.16071 12.500000 Coimbra 292 2.142857

Culture

Worst

kable(head(arrange(dataSelected, cultu), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
3680 131 86.56489 86.18321 13.740458 18.3206107 52.67176 10.6870229 1.526718 3.053435 Maribor 165 2.274809
2018 285 76.28070 79.01754 36.491228 4.5614035 20.35088 0.0000000 35.438597 3.157895 Leuven 393 3.414035
2782 121 91.90083 90.57851 13.223140 19.0082645 38.01653 1.6528926 23.966942 4.132231 Turku 146 3.851240
3679 163 83.19018 84.60123 12.269939 16.5644172 48.46626 10.4294479 7.975460 4.294479 Ljubljana 221 2.564417
3542 215 87.53488 84.04651 46.976744 8.3720930 26.04651 6.0465116 7.441860 5.116279 Poznań 269 1.725581
2589 128 85.00000 83.20312 36.718750 6.2500000 39.06250 6.2500000 6.250000 5.468750 Murcia 173 1.921875
2777 974 91.10883 89.43532 8.008214 25.5646817 39.63039 0.5133470 20.533881 5.749487 Oulu 1293 3.688912
2731 104 89.42308 89.42308 32.692308 0.9615385 44.23077 3.8461538 12.500000 5.769231 Valladolid 126 2.067308
2288 115 87.13043 86.17391 13.913044 4.3478261 59.13043 0.8695652 15.652174 6.086957 Odense 172 3.695652
2069 162 93.82716 90.43210 45.061728 6.1728395 22.22222 3.7037037 14.814815 8.024691 Brno 221 1.858025

Best

kable(head(arrange(dataSelected, desc(cultu)), n = 10))
ccode count accom landl nlife odoor qlife shope unive cultu cname votes cost
3382 170 65.88235 71.35294 10.000000 6.470588 15.88235 2.9411765 1.176471 63.52941 Rome 216 3.852941
3743 128 72.03125 75.00000 12.500000 7.812500 8.59375 7.0312500 2.343750 61.71875 Istanbul 161 2.343750
3081 118 53.72881 66.18644 5.932203 5.084746 22.88136 0.8474576 7.627119 57.62712 Paris 152 4.381356
3385 146 75.06849 77.87671 3.424657 2.739726 42.46575 2.0547945 6.849315 42.46575 Siena 164 3.595890
2004 123 75.60976 78.04878 2.439024 5.691057 60.97561 0.8130081 3.252032 26.82927 Vienna 152 3.528455
2492 274 87.59124 86.42336 33.941606 4.744525 30.65693 2.1897810 2.554744 25.91241 Granada 365 1.839416
2379 346 72.08092 75.52023 21.098266 10.404624 39.01734 3.7572254 2.312139 23.41040 Barcelona 447 3.225433
3325 185 60.75676 70.37838 39.459460 4.864865 24.86486 2.7027027 5.945946 22.16216 Bologna 267 3.486486
2090 317 84.73186 80.41009 42.902208 8.201893 21.76656 0.9463722 4.416404 21.76656 Prague 409 2.100946
3602 593 77.30186 79.71332 22.596965 14.165261 34.06408 4.3844857 3.035413 21.75379 Lisbon 755 2.487352

Country level

Add country level to table

country <- read.csv("cityToCountry.csv")
country <- country %>% select(country, cname)
dataCountry <- inner_join(data, country)
write.csv(dataCountry, "exportPerCity.csv")
dataCountry <- dataCountry%>%
                   group_by(country) %>%
                       summarize(
                             avgAccom = mean(accom),
                             avgLandl = mean(landl),
                             avgNlife = mean(nlife),
                             avgOdoor = mean(odoor),
                             avgQlife = mean(qlife),
                             avgShope = mean(shope),
                             avgUnive = mean(unive),
                             avgCultu = mean(cultu),
                             totalVotes = sum(votes)
                       )
write.csv(dataCountry, "exportPerCountry.csv")

dataCountry <- dataCountry %>% 
                   filter(totalVotes >= 100)

Most voted

Accommodation

Hardest to find

kable(head(arrange(dataCountry, avgAccom), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
IE 63.31781 69.21773 35.902778 8.031046 18.61928 0.6535948 15.645425 21.147876 112
FR 73.89814 76.78320 12.782470 17.808194 37.24746 2.5549317 11.039060 18.567888 579
GR 76.01814 82.10658 30.952381 18.752834 13.40136 14.9659864 1.609977 20.317460 264
LV 76.32576 80.27273 10.795454 14.393939 32.27273 0.1893939 21.325758 21.022727 127
NL 76.76150 82.27853 2.540004 1.290569 56.47110 0.0517598 37.576777 2.069790 482
DE 77.09032 81.28841 9.868833 7.683723 50.01204 2.4025205 22.473879 7.559007 1162
IT 77.93540 83.50275 4.172640 1.368243 52.90207 1.1212325 31.807551 8.628268 1527
UK 78.36058 83.94827 6.909223 2.681993 49.87898 1.2588948 33.658848 5.612061 418
DK 78.97833 80.20713 7.014445 1.086957 73.17077 0.2173913 13.575872 4.934568 260
SE 79.78694 85.15585 2.162630 2.314316 59.43257 0.4524887 34.070765 1.567226 299

Easiest to find

kable(head(arrange(dataCountry, desc(avgAccom)), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
FI 90.44099 89.20359 7.932185 19.114774 43.57973 0.4332479 24.165757 4.7743087 1681
EE 89.88172 88.81821 24.361559 14.586694 29.62030 1.6129032 20.191532 9.6270161 335
SK 89.67710 87.76838 25.085524 12.749270 41.68461 0.4255319 19.204005 0.8510638 120
RO 87.53704 86.57143 48.346561 5.747355 21.01190 1.9973545 11.937831 10.9589947 253
PT 85.36973 86.79596 19.210137 6.709199 48.75145 1.4405613 10.600036 13.2886158 1716
LT 84.23356 86.36757 17.154195 5.328798 41.61224 2.9931973 27.843537 5.0680272 627
SI 83.54988 85.72389 6.502599 15.665701 50.00673 9.4457844 12.375544 6.0036451 418
CZ 82.54850 86.16369 11.162061 1.655199 51.18595 0.4675883 33.017786 2.5114151 908
HR 82.53003 84.81231 16.261261 18.596096 35.40541 1.3513514 3.986486 24.3993994 161
TR 81.45409 86.27549 1.750905 2.359134 50.34040 3.7461275 32.676352 9.1270774 263

Landlord

Worst

kable(head(arrange(dataCountry, avgLandl), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
IE 63.31781 69.21773 35.902778 8.031046 18.61928 0.6535948 15.645425 21.147876 112
FR 73.89814 76.78320 12.782470 17.808194 37.24746 2.5549317 11.039060 18.567888 579
DK 78.97833 80.20713 7.014445 1.086957 73.17077 0.2173913 13.575872 4.934568 260
LV 76.32576 80.27273 10.795454 14.393939 32.27273 0.1893939 21.325758 21.022727 127
DE 77.09032 81.28841 9.868833 7.683723 50.01204 2.4025205 22.473879 7.559007 1162
HU 80.99899 81.74824 45.472492 7.013819 18.65385 2.3913286 17.223526 9.244981 521
GR 76.01814 82.10658 30.952381 18.752834 13.40136 14.9659864 1.609977 20.317460 264
NL 76.76150 82.27853 2.540004 1.290569 56.47110 0.0517598 37.576777 2.069790 482
ES 81.38877 83.09755 25.111527 10.422382 37.09779 2.9823586 5.878184 18.507755 4844
BE 81.05056 83.20388 17.333983 3.851312 39.19469 0.6117038 33.004112 6.004195 930

Best

kable(head(arrange(dataCountry, desc(avgLandl)), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
FI 90.44099 89.20359 7.9321852 19.114774 43.57973 0.4332479 24.16576 4.7743087 1681
EE 89.88172 88.81821 24.3615591 14.586694 29.62030 1.6129032 20.19153 9.6270161 335
SK 89.67710 87.76838 25.0855236 12.749270 41.68461 0.4255319 19.20400 0.8510638 120
PT 85.36973 86.79596 19.2101374 6.709199 48.75145 1.4405613 10.60004 13.2886158 1716
RO 87.53704 86.57143 48.3465608 5.747355 21.01190 1.9973545 11.93783 10.9589947 253
LT 84.23356 86.36757 17.1541950 5.328798 41.61224 2.9931973 27.84354 5.0680272 627
TR 81.45409 86.27549 1.7509050 2.359134 50.34040 3.7461275 32.67635 9.1270774 263
CZ 82.54850 86.16369 11.1620611 1.655199 51.18595 0.4675883 33.01779 2.5114151 908
NO 81.45054 85.93181 0.1031992 13.175955 52.71561 0.0000000 33.72512 0.2801120 184
SI 83.54988 85.72389 6.5025992 15.665701 50.00673 9.4457844 12.37554 6.0036451 418

Nightlife

Worst

kable(head(arrange(dataCountry, avgNlife), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
NO 81.45054 85.93181 0.1031992 13.175955 52.71561 0.0000000 33.72512 0.280112 184
TR 81.45409 86.27549 1.7509050 2.359134 50.34040 3.7461275 32.67635 9.127077 263
SE 79.78694 85.15585 2.1626298 2.314316 59.43257 0.4524887 34.07076 1.567226 299
NL 76.76150 82.27853 2.5400039 1.290569 56.47110 0.0517598 37.57678 2.069790 482
AT 80.79314 84.65353 3.2470608 7.279465 53.83821 0.1921288 26.91141 8.531723 311
IT 77.93540 83.50275 4.1726396 1.368243 52.90207 1.1212325 31.80755 8.628268 1527
SI 83.54988 85.72389 6.5025992 15.665701 50.00673 9.4457844 12.37554 6.003645 418
UK 78.36058 83.94827 6.9092228 2.681993 49.87898 1.2588948 33.65885 5.612061 418
DK 78.97833 80.20713 7.0144451 1.086957 73.17077 0.2173913 13.57587 4.934568 260
FI 90.44099 89.20359 7.9321852 19.114774 43.57973 0.4332479 24.16576 4.774309 1681

Best

kable(head(arrange(dataCountry, desc(avgNlife)), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
RO 87.53704 86.57143 48.34656 5.747355 21.01190 1.9973545 11.937831 10.9589947 253
HU 80.99899 81.74824 45.47249 7.013819 18.65385 2.3913286 17.223526 9.2449808 521
IE 63.31781 69.21773 35.90278 8.031046 18.61928 0.6535948 15.645425 21.1478758 112
GR 76.01814 82.10658 30.95238 18.752834 13.40136 14.9659864 1.609977 20.3174603 264
ES 81.38877 83.09755 25.11153 10.422382 37.09779 2.9823586 5.878184 18.5077548 4844
SK 89.67710 87.76838 25.08552 12.749270 41.68461 0.4255319 19.204005 0.8510638 120
EE 89.88172 88.81821 24.36156 14.586694 29.62030 1.6129032 20.191532 9.6270161 335
PT 85.36973 86.79596 19.21014 6.709199 48.75145 1.4405613 10.600036 13.2886158 1716
BE 81.05056 83.20388 17.33398 3.851312 39.19469 0.6117038 33.004112 6.0041947 930
LT 84.23356 86.36757 17.15420 5.328798 41.61224 2.9931973 27.843537 5.0680272 627

Outdoor

Worst

kable(head(arrange(dataCountry, avgOdoor), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
DK 78.97833 80.20713 7.014445 1.086957 73.17077 0.2173913 13.57587 4.934568 260
PL 81.12258 85.50752 10.979667 1.141216 51.35388 1.3217916 32.59980 2.603649 1417
NL 76.76150 82.27853 2.540004 1.290569 56.47110 0.0517598 37.57678 2.069790 482
IT 77.93540 83.50275 4.172640 1.368243 52.90207 1.1212325 31.80755 8.628268 1527
CZ 82.54850 86.16369 11.162061 1.655199 51.18595 0.4675883 33.01779 2.511415 908
SE 79.78694 85.15585 2.162630 2.314316 59.43257 0.4524887 34.07076 1.567226 299
TR 81.45409 86.27549 1.750905 2.359134 50.34040 3.7461275 32.67635 9.127077 263
UK 78.36058 83.94827 6.909223 2.681993 49.87898 1.2588948 33.65885 5.612061 418
BE 81.05056 83.20388 17.333983 3.851312 39.19469 0.6117038 33.00411 6.004195 930
LT 84.23356 86.36757 17.154195 5.328798 41.61224 2.9931973 27.84354 5.068027 627

Best

kable(head(arrange(dataCountry, desc(avgOdoor)), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
FI 90.44099 89.20359 7.9321852 19.11477 43.57973 0.4332479 24.165757 4.7743087 1681
GR 76.01814 82.10658 30.9523810 18.75283 13.40136 14.9659864 1.609977 20.3174603 264
HR 82.53003 84.81231 16.2612613 18.59610 35.40541 1.3513514 3.986486 24.3993994 161
FR 73.89814 76.78320 12.7824702 17.80819 37.24746 2.5549317 11.039060 18.5678875 579
SI 83.54988 85.72389 6.5025992 15.66570 50.00673 9.4457844 12.375544 6.0036451 418
EE 89.88172 88.81821 24.3615591 14.58669 29.62030 1.6129032 20.191532 9.6270161 335
LV 76.32576 80.27273 10.7954545 14.39394 32.27273 0.1893939 21.325758 21.0227273 127
NO 81.45054 85.93181 0.1031992 13.17595 52.71561 0.0000000 33.725122 0.2801120 184
SK 89.67710 87.76838 25.0855236 12.74927 41.68461 0.4255319 19.204005 0.8510638 120
ES 81.38877 83.09755 25.1115267 10.42238 37.09779 2.9823586 5.878184 18.5077548 4844

Quality of life

Worst

kable(head(arrange(dataCountry, avgQlife), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
GR 76.01814 82.10658 30.95238 18.752834 13.40136 14.9659864 1.609977 20.317460 264
IE 63.31781 69.21773 35.90278 8.031046 18.61928 0.6535948 15.645425 21.147876 112
HU 80.99899 81.74824 45.47249 7.013819 18.65385 2.3913286 17.223526 9.244981 521
RO 87.53704 86.57143 48.34656 5.747355 21.01190 1.9973545 11.937831 10.958995 253
EE 89.88172 88.81821 24.36156 14.586694 29.62030 1.6129032 20.191532 9.627016 335
LV 76.32576 80.27273 10.79545 14.393939 32.27273 0.1893939 21.325758 21.022727 127
HR 82.53003 84.81231 16.26126 18.596096 35.40541 1.3513514 3.986486 24.399399 161
ES 81.38877 83.09755 25.11153 10.422382 37.09779 2.9823586 5.878184 18.507755 4844
FR 73.89814 76.78320 12.78247 17.808194 37.24746 2.5549317 11.039060 18.567888 579
BE 81.05056 83.20388 17.33398 3.851312 39.19469 0.6117038 33.004112 6.004195 930

Best

kable(head(arrange(dataCountry, desc(avgQlife)), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
DK 78.97833 80.20713 7.0144451 1.086957 73.17077 0.2173913 13.57587 4.934568 260
SE 79.78694 85.15585 2.1626298 2.314316 59.43257 0.4524887 34.07076 1.567226 299
NL 76.76150 82.27853 2.5400039 1.290569 56.47110 0.0517598 37.57678 2.069790 482
AT 80.79314 84.65353 3.2470608 7.279465 53.83821 0.1921288 26.91141 8.531723 311
IT 77.93540 83.50275 4.1726396 1.368243 52.90207 1.1212325 31.80755 8.628268 1527
NO 81.45054 85.93181 0.1031992 13.175955 52.71561 0.0000000 33.72512 0.280112 184
PL 81.12258 85.50752 10.9796668 1.141216 51.35388 1.3217916 32.59980 2.603649 1417
CZ 82.54850 86.16369 11.1620611 1.655199 51.18595 0.4675883 33.01779 2.511415 908
TR 81.45409 86.27549 1.7509050 2.359134 50.34040 3.7461275 32.67635 9.127077 263
DE 77.09032 81.28841 9.8688330 7.683723 50.01204 2.4025205 22.47388 7.559007 1162

Shopping

Worst

kable(head(arrange(dataCountry, avgShope), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
NO 81.45054 85.93181 0.1031992 13.175955 52.71561 0.0000000 33.72512 0.2801120 184
NL 76.76150 82.27853 2.5400039 1.290569 56.47110 0.0517598 37.57678 2.0697901 482
LV 76.32576 80.27273 10.7954545 14.393939 32.27273 0.1893939 21.32576 21.0227273 127
AT 80.79314 84.65353 3.2470608 7.279465 53.83821 0.1921288 26.91141 8.5317232 311
DK 78.97833 80.20713 7.0144451 1.086957 73.17077 0.2173913 13.57587 4.9345681 260
SK 89.67710 87.76838 25.0855236 12.749270 41.68461 0.4255319 19.20400 0.8510638 120
FI 90.44099 89.20359 7.9321852 19.114774 43.57973 0.4332479 24.16576 4.7743087 1681
SE 79.78694 85.15585 2.1626298 2.314316 59.43257 0.4524887 34.07076 1.5672260 299
CZ 82.54850 86.16369 11.1620611 1.655199 51.18595 0.4675883 33.01779 2.5114151 908
BE 81.05056 83.20388 17.3339826 3.851312 39.19469 0.6117038 33.00411 6.0041947 930

Best

kable(head(arrange(dataCountry, desc(avgShope)), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
GR 76.01814 82.10658 30.952381 18.752834 13.40136 14.965986 1.609977 20.317460 264
SI 83.54988 85.72389 6.502599 15.665701 50.00673 9.445784 12.375544 6.003645 418
TR 81.45409 86.27549 1.750905 2.359134 50.34040 3.746128 32.676352 9.127077 263
LT 84.23356 86.36757 17.154195 5.328798 41.61224 2.993197 27.843537 5.068027 627
ES 81.38877 83.09755 25.111527 10.422382 37.09779 2.982359 5.878184 18.507755 4844
FR 73.89814 76.78320 12.782470 17.808194 37.24746 2.554932 11.039060 18.567888 579
DE 77.09032 81.28841 9.868833 7.683723 50.01204 2.402521 22.473879 7.559007 1162
HU 80.99899 81.74824 45.472492 7.013819 18.65385 2.391329 17.223526 9.244981 521
RO 87.53704 86.57143 48.346561 5.747355 21.01190 1.997354 11.937831 10.958995 253
EE 89.88172 88.81821 24.361559 14.586694 29.62030 1.612903 20.191532 9.627016 335

University

Worst

kable(head(arrange(dataCountry, avgUnive), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
GR 76.01814 82.10658 30.952381 18.752834 13.40136 14.9659864 1.609977 20.317460 264
HR 82.53003 84.81231 16.261261 18.596096 35.40541 1.3513514 3.986486 24.399399 161
ES 81.38877 83.09755 25.111527 10.422382 37.09779 2.9823586 5.878184 18.507755 4844
PT 85.36973 86.79596 19.210137 6.709199 48.75145 1.4405613 10.600036 13.288616 1716
FR 73.89814 76.78320 12.782470 17.808194 37.24746 2.5549317 11.039060 18.567888 579
RO 87.53704 86.57143 48.346561 5.747355 21.01190 1.9973545 11.937831 10.958995 253
SI 83.54988 85.72389 6.502599 15.665701 50.00673 9.4457844 12.375544 6.003645 418
DK 78.97833 80.20713 7.014445 1.086957 73.17077 0.2173913 13.575872 4.934568 260
IE 63.31781 69.21773 35.902778 8.031046 18.61928 0.6535948 15.645425 21.147876 112
HU 80.99899 81.74824 45.472492 7.013819 18.65385 2.3913286 17.223526 9.244981 521

Best

kable(head(arrange(dataCountry, desc(avgUnive)), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
NL 76.76150 82.27853 2.5400039 1.290569 56.47110 0.0517598 37.57678 2.069790 482
SE 79.78694 85.15585 2.1626298 2.314316 59.43257 0.4524887 34.07076 1.567226 299
NO 81.45054 85.93181 0.1031992 13.175955 52.71561 0.0000000 33.72512 0.280112 184
UK 78.36058 83.94827 6.9092228 2.681993 49.87898 1.2588948 33.65885 5.612061 418
CZ 82.54850 86.16369 11.1620611 1.655199 51.18595 0.4675883 33.01779 2.511415 908
BE 81.05056 83.20388 17.3339826 3.851312 39.19469 0.6117038 33.00411 6.004195 930
TR 81.45409 86.27549 1.7509050 2.359134 50.34040 3.7461275 32.67635 9.127077 263
PL 81.12258 85.50752 10.9796668 1.141216 51.35388 1.3217916 32.59980 2.603649 1417
IT 77.93540 83.50275 4.1726396 1.368243 52.90207 1.1212325 31.80755 8.628268 1527
LT 84.23356 86.36757 17.1541950 5.328798 41.61224 2.9931973 27.84354 5.068027 627

Culture

Worst

kable(head(arrange(dataCountry, avgCultu), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
NO 81.45054 85.93181 0.1031992 13.175955 52.71561 0.0000000 33.72512 0.2801120 184
SK 89.67710 87.76838 25.0855236 12.749270 41.68461 0.4255319 19.20400 0.8510638 120
SE 79.78694 85.15585 2.1626298 2.314316 59.43257 0.4524887 34.07076 1.5672260 299
NL 76.76150 82.27853 2.5400039 1.290569 56.47110 0.0517598 37.57678 2.0697901 482
CZ 82.54850 86.16369 11.1620611 1.655199 51.18595 0.4675883 33.01779 2.5114151 908
PL 81.12258 85.50752 10.9796668 1.141216 51.35388 1.3217916 32.59980 2.6036492 1417
FI 90.44099 89.20359 7.9321852 19.114774 43.57973 0.4332479 24.16576 4.7743087 1681
DK 78.97833 80.20713 7.0144451 1.086957 73.17077 0.2173913 13.57587 4.9345681 260
LT 84.23356 86.36757 17.1541950 5.328798 41.61224 2.9931973 27.84354 5.0680272 627
UK 78.36058 83.94827 6.9092228 2.681993 49.87898 1.2588948 33.65885 5.6120607 418

Best

kable(head(arrange(dataCountry, desc(avgCultu)), n = 10))
country avgAccom avgLandl avgNlife avgOdoor avgQlife avgShope avgUnive avgCultu totalVotes
HR 82.53003 84.81231 16.26126 18.596096 35.40541 1.3513514 3.986486 24.399399 161
IE 63.31781 69.21773 35.90278 8.031046 18.61928 0.6535948 15.645425 21.147876 112
LV 76.32576 80.27273 10.79545 14.393939 32.27273 0.1893939 21.325758 21.022727 127
GR 76.01814 82.10658 30.95238 18.752834 13.40136 14.9659864 1.609977 20.317460 264
FR 73.89814 76.78320 12.78247 17.808194 37.24746 2.5549317 11.039060 18.567888 579
ES 81.38877 83.09755 25.11153 10.422382 37.09779 2.9823586 5.878184 18.507755 4844
PT 85.36973 86.79596 19.21014 6.709199 48.75145 1.4405613 10.600036 13.288616 1716
RO 87.53704 86.57143 48.34656 5.747355 21.01190 1.9973545 11.937831 10.958995 253
EE 89.88172 88.81821 24.36156 14.586694 29.62030 1.6129032 20.191532 9.627016 335
HU 80.99899 81.74824 45.47249 7.013819 18.65385 2.3913286 17.223526 9.244981 521