kiln / flourish-api-demo-control-sheet-generic

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Control sheet writing back to editor #1

Open zmeers opened 1 day ago

zmeers commented 1 day ago

Hello @larsvers šŸ‘‹šŸ» (can't get rid of me yet hehe...)

This demo is great!

I do have a feature request: I'm wondering if it's possible to write a control sheet back to the editor-based graph? That is, could do you API -> control sheet -> reflect changes in editor?

My use case is: I have a marketing team that creates graphs in Canva/Flourish for research reports. What happens now is the marketing team manually transcribes the data from a PPT slide that contains a screenshot of a graph (currently a thinkcell graph but I'd like to transition the research team to Flourish), then copies into Canva charts and recreates the graph.

I'd like to simplify their work by creating Flourish graphs in R/Python, which is what we use in the research function. I've created a post hook in an internal R package that runs when the package is loaded to write out the data that feeds into flourishcharts graphs into separate Excel files every time the R Markdown file is knitted into a Word doc & PPT deck for the non-data people in my company to review. We use a templated RMD file for every analysis, so the package loads by default. R Markdown does a great job of screenshotting Flourish graphs for Word & PPT docs once you turn of the intro animation feature in Flourish, so getting the output into Word & PPT is simple, as is downloading the data for the graphs. This means marketing no longer needs to manually transcribe the data which is already a timesaver.

But we could improve the process by writing to a control sheet, then write that control sheet back to the editor (if possible?). This means the marketing team wouldn't need to add the data to Flourish graph in the editor. This means they could then just add an embed to a Canva design via the Flourish content app without needing to mess around with the Flourish editor.

I'm wondering if this is feasible with control sheets right now?

larsvers commented 17 hours ago

Hey @zmeers šŸ‘‹ great to hear from you and please keep writing :))

The control sheet concept as is represents a one-way connection pointing from a user to a Live API chart. So if you're developers have built a workflow using a control sheet, it would serve as a naive CMS for non-coders to add new charts, change settings etc. The control sheet lets non-coding users control Live API charts without coding:

Users -> control sheet -> Live API chart

However, you can of course consider a reverse workflow, where a Live API chart is writing data to a csv which is used as a data source for an editor created Flourish chart.

Live API chart -> source sheet -> Editor chart

The JS code building the Live API chart (or in your case the R code building out flourishcharts) has of course access to its data and can save it to a csv file which can serve as the source for an Editor chart. If the csv was a public csv you can additionally connect it via the Live CSV feature and would get automatic updates.

That would surely work as a "source-sheet" instead of a "control-sheet" - for the lack of a better term :))

Do you think that could fit in or help with your considered workflow?