เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

เพิ่มแผนที่ leaflet

มาเพิ่มแผนที่ลงในแดชบอร์ดโดยใช้ leaflet กัน

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

การสร้างแดชบอร์ดด้วย flexdashboard

ดูคอร์ส

คำแนะนำการฝึกหัด

  • ใช้คอลัมน์ stations_df$latitude และ stations_df$longitude เพื่อเพิ่มแผนที่ leaflet ที่แสดงตำแหน่งสถานีลงในชาร์ต Stations Map

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

{"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"}
แก้ไขและรันโค้ด