How to download data#

What does this guide solve?

This guide will show you how to enable your dashboard’s viewer to download data

Download data#

There are several different ways to let a user download data. This guide will show you three ways to do it.

sources:
  penguins:
    type: file
    tables:
      penguins: https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-07-28/penguins.csv

layouts:
  - title: Table
    source: penguins
    download: csv
    views:
      - type: download
        format: csv
      - type: table
        table: penguins
        download: csv

sources:
  penguins:
    type: file
    tables:
      penguins: https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-07-28/penguins.csv

layouts:
  - title: Table
    source: penguins
    download: csv
    views:
      - type: download
        format: csv
      - type: table
        table: penguins
        download: csv

sources:
  penguins:
    type: file
    tables:
      penguins: https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-07-28/penguins.csv

layouts:
  - title: Table
    source: penguins
    download: csv
    views:
      - type: download
        format: csv
      - type: table
        table: penguins
        download: csv

Note

The YAML specification for the example is the same, but the line used to create the specific download button is emphasized in the code and highlighted with a red box in the preview of the dashboard.