This document shows a map of the Catalan startups currently included in the “Barcelona & Catalonia Startups Hub”, as of july, 22nd 2020. The data has been obtained via CURL and transformed using jq on Linux. Markers are added for each startup location and for each one of them a popup with its name and a link to the startups hub directory is included. Markers are clustered for convenience, as there is a large number of them concentrated around some specific points (Barcelona, Lleida, etc.)
Please note that links in the map popups are opened in a new window since RPubs are https-only and the startups hub is http-only and, therefore, most browsers block this link with a mixed-content security warning. The only workaround found is to open them in a "_blank" (new) window.
These are the commands used to create the map shown below (libraries are loaded previously in a silent R chunk)
startups <- fromJSON("locations.processed.json") %>%
filter(abs(0-lon)<3) %>%
filter(abs(40-lat)<3)
startups %>%
leaflet() %>%
addTiles() %>%
addMarkers(
lng = ~lon,
lat = ~lat,
label = ~name,
popup = sprintf('<h3>%s</h3>View data on <a href="http://startupshub.catalonia.com%s" target="_blank">startups hub</a></h3>',startups$name,startups$url),
clusterOptions = markerClusterOptions()
)