CommencerCommencer gratuitement

Add a leaflet map

Let's add a map to our dashboard using leaflet.

Cet exercice fait partie du cours

Building Dashboards with flexdashboard

Afficher le cours

Instructions

  • Use the stations_df$latitude and stations_df$longitude columns to add a leaflet map marking station locations to the Stations Map chart.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

{"my_document.Rmd":"---\ntitle: \"Bike Shares Daily\"\noutput: \n  flexdashboard::flex_dashboard:\n    orientation: columns\n    vertical_layout: fill\n---\n\n```{r setup, include=FALSE}\nlibrary(flexdashboard)\nlibrary(readr)\nlibrary(tidyverse)\nlibrary(leaflet)\n\nstations_df <- read_csv('https://assets.datacamp.com/production/course_6355/datasets/stations_data.csv')\n```\n\n\nColumn {data-width=650}\n-----------------------------------------------------------------------\n\n### Stations Map\n\n```{r}\n\n```\n\n\n"}
Modifier et exécuter le code