I collected some data about most of Berlin’s techno clubs. Visualizing this data the map shows the following:
library(tidyverse)
## Loading tidyverse: ggplot2
## Loading tidyverse: tibble
## Loading tidyverse: tidyr
## Loading tidyverse: readr
## Loading tidyverse: purrr
## Loading tidyverse: dplyr
## Conflicts with tidy packages ----------------------------------------------
## filter(): dplyr, stats
## lag(): dplyr, stats
library(leaflet)
library(viridis)
## Loading required package: viridisLite
club_data <- read_csv("clubdata")
## Parsed with column specification:
## cols(
## clubs = col_character(),
## address = col_character(),
## Latitude = col_double(),
## Longitute = col_double(),
## Likes = col_integer(),
## Popularity = col_character()
## )
# create map
poppal <- colorFactor(viridis(7), club_data$Popularity)
mymap <-leaflet(club_data) %>%
addProviderTiles("CartoDB.Positron") %>%
addCircleMarkers(lng = ~Longitute,
lat = ~Latitude,
radius = 10,
fillColor = ~poppal(Popularity),
stroke = FALSE,
fillOpacity = 0.8,
label = ~clubs,
popup = ~address) %>%
addLegend("bottomright", pal = poppal, values = ~Popularity, title = "Berlin Techno Clubs by Facebook likes")
mymap