Flourish for developers
  • Flourish SDK
  • Flourish Live API
  • Embedding guide
  • Help

›Getting started

Introduction

  • Introduction to the Flourish SDK

Getting started

  • Getting started with the SDK
  • Working with settings
  • Working with data
  • Cloning visualizations
  • Using Flourish modules
  • Using Flourish with Javascript libraries and frameworks
  • Simple 5 minute template

API reference

  • SDK commands
  • File structure
  • Template configuration with template.yml
  • Structuring your template logic
  • Versioning your template
  • The window.Flourish object
  • Automatic assignment of columns to bindings

Getting started with the SDK

You'll need to have Node and NPM installed on your machine to install the Flourish SDK.

Install the SDK

npm install -g @flourish/sdk

Create a new template

flourish new my_template

Run a template

cd my_template and flourish run. Your project should now be running on localhost:1685. You should see an empty preview window and a settings panel on the right-hand side.

Empty SDK

Edit a template

First, open src/index.js, and you'll see the top-level Flourish structure:

  • the data object, that's where user-editable data tables will be stored
  • the state object, which stores the visualization's current state
  • the draw() function, which is called once when the visualization loads
  • the update() function, which gets called every time the data or state changes

Publish a template

cd my_template and flourish publish

Next steps

You should have your first Flourish project up and running.

  • For more information about which files were just created and what they do, have a look at the Flourish template file structure
  • If you wish to explore more SDK commands beyond flourish new and flourish run, have a look at the SDK commands overview

In the next pages we are going to look at how the settings panel and data selection work.

Last updated on 07/04/2022
← Introduction to the Flourish SDKWorking with settings →
  • Install the SDK
  • Create a new template
  • Run a template
  • Edit a template
  • Publish a template
  • Next steps
Copyright © 2025 Flourish