Get startedGet started for free

Captions

Let's add a caption to our dashboard.

This exercise is part of the course

Building Dashboards with flexdashboard

View Course

Exercise instructions

  • Add a caption to the Origins chart that says "Source: Bay Area Bike Share".

Hands-on interactive exercise

Have a go at this exercise by completing this sample 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(leaflet)\nlibrary(DT)\nlibrary(tidyverse)\nlibrary(lubridate)\n\ntrips_df <- read_csv('https://assets.datacamp.com/production/repositories/1448/datasets/1f12031000b09ad096880bceb61f6ca2fd95e2eb/sanfran_bikeshare_joined_oneday.csv')\n```\n\nColumn \n-----------------------------------------------------------------------\n### Origins\n\n```{r}\n\ntrips_df %>%\n  rename(latitude = start_latitude,\n         longitude = start_longitude) %>%\n  group_by(start_station_id, latitude, longitude) %>%\n  count() %>%\n  leaflet() %>%\n  addTiles() %>%\n  addCircles(radius = ~n)\n\n```\n\n\n"}
Edit and Run Code