Skip to main content

Use ImportData to get CSV data into Google Sheets and display it in Geckoboard

Learn how the ImportData function pairs with the Spreadsheets data source to build visualizations from CSV files.

Updated today

Google Sheets offers a built-in function called ImportData that can automatically fetch data from a CSV or TSV file available online and add it to your Google Sheet. You can then use that Google Sheet with the Spreadsheets data source in Geckoboard to visualize your data. Continue reading to learn about the syntax of this function and how to use it within a Google Sheet.

ImportData function and syntax

The function is written as IMPORTDATA(url). And the syntax requires the following elements:

  • url - The URL from which to fetch the .csv or .tsv-formatted data, including protocol (e.g. http://).

    • The value for url must either be enclosed in quotation marks or be a reference to a cell containing the appropriate text.

How to import a CSV or TSV data into a Google Sheet

In this example, we'll use the ImportData function to fetch Bitcoin's historic price and add it to a Google Sheet, which can later be used within Geckoboard to power your widgets.

Export the exchange rate database from Quandl

Quandl helps data analysts save time, effort, and money by providing financial and economic data in the precise format they need. In this example, we'll use data from their API in CSV format. To export a CSV database from Quandl for this example, follow these steps:

  1. Go to Quandl.

  2. Use the Database browser to find Bitcoin's Spot Exchange Rates databases.

    1. We'll use Bitcoin Markets (bitfinexUSD) to demonstrate its usage.

      Quandl_Bitcoin_info_in_CSV
  3. Once you find the database you are after, look for its Export Data menu on the right of your screen.

  4. Click on CSV and copy the link for this resource.

    1. Here's the example URL we're using for reference: https://www.quandl.com/api/v3/datasets/BCHARTS/BITFINEXUSD.csv

      Export_Data_API

Import the CSV file into Google Sheets

  1. Open a new Google Sheet.

  2. Add the following formula into cell A1:โ€‹=IMPORTDATA("https://www.quandl.com/api/v3/datasets/BCHARTS/BITFINEXUSD.csv")

    Import_CSV_file

Use Spreadsheets to visualize the data in Geckoboard

With Bitcoin's exchange rate information in your Google Sheet, create a new Spreadsheets widget in Geckoboard to display this information on the dashboard.

Did this answer your question?