This html document has been produced as part of an assignment in the Developing Data Products course, itself part of the Data Science Specialisation from Johns Hopkins.
It has been created using rmarkdown and leaflet and displays the venues from the 2023 Fifa Women’s World Cup.
This first code chunk loads packages and creates the dataframe.
## Load packages
library(tidyverse)
library(leaflet)
## Create dataframe
## Data sourced from:
## https://www.fifa.com/fifaplus/en/articles/the-womens-world-cup-australia-new-zealand-2023-stadiums
## Map coordinates sourced from google maps
df <- data.frame(
Stadium = c("Brisbane Stadium",
"Hindmarsh Stadium",
"Melbourne Rectangular Stadium",
"Perth Rectangular Stadium",
"Stadium Australia",
"Sydney Football Stadium",
"Dunedin Stadium",
"Eden Park",
"Waikato Stadium",
"Wellington Regional Stadium"
),
Capacity = c(56851,
13327,
28870,
13932,
69314,
38841,
24243,
40536,
16271,
31089
),
lat = c(-27.464899366022458,
-34.90711485173241,
-37.824930318193886,
-31.945612701769736,
-33.8469872509159,
-33.88886213020138,
-45.869392432731125,
-36.78005685041043,
-37.78092703876204,
-41.27277662751557
),
lng = c(153.00966535276777,
138.5688811367912,
144.98374225030238,
115.86988914460721,
151.06384877013596,
151.22533181078606,
170.52501219729723,
174.97365392544424,
175.26893432763194,
174.78588321108717
)
)
The below map displays the venues for the 2023 Fifa Women’s World Cup.
The circle size indicates the capacity of the stadium.
Clicking each circle shows the stadium name and exact capacity.
df %>%
leaflet() %>%
addTiles() %>%
addCircleMarkers(popup = paste0(
df$Stadium,
"<br>",
"Capacity = ",
df$Capacity
),
weight = 1,
radius = df$Capacity / 1000)