加入 leaflet 地圖
讓我們用 leaflet 在儀表板中加入一張地圖。
本練習屬於課程
使用 flexdashboard 建立儀表板
練習說明
- 使用
stations_df$latitude和stations_df$longitude欄位,在 Stations Map 圖表中加入標示各站位置的leaflet地圖。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
{"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"}