Examples
Note: the Flourish API is an enterprise-level bolt-on and not available to all customers.
Simple API example
This simple example uses d3-fetch to pull in data from a CSV file before rendering it in a Flourish template.
Flourish story API example
This example replicates the story player behavior and functionality, adding navigation buttons, a slide count and captions, and featuring smooth transitions between slides
Base visualization simple example
Demonstrates how to use the published visualization endpoint to directly replicate a visualization made in the app with the API.
Base visualization with overrides example
Demonstrates how to use the published visualization endpoint to replicate a visualization made in the app with the API, while overriding its data, bindings, and some settings.
Sourcing data from a database
This example shows how to fetch data from a database, and use that data to generate visualizations using the Flourish Live API. It also demonstrates how to keep your API key secret by proxying requests to the Live API through your own server.
R/Shiny example
This is an example of how to connect the Flourish API to R's Shiny package
Control sheet example
This example demonstrates the use of a control sheet. This makes it possible to control the contents of a visualization without needing to code.