Export scrubber GIF or embed in PPT?

Simple question. Have notebook (linked above) that I want to embed into a PowerPoint presentation. I have a scrubber that cycles through years so a .gif is a natural file to use. Is there any way to export a gif of the scrubber? I also tried embedding the viewof date and map cells into a ‘Online Video’ object inside Microsoft PowerPoint that only gave me an error

edited to refer to viewof date correctly

1 Like

If you get the SVG in a (t) => svg form you could use SVG Timeseries to GIF / Tom Larkworthy / Observable

Note also you need to add xmlns=“http:// www .w3.org/2000/svg” (without spaces) to the svg element for some weird reason. If you know how I can fix that I would love to remove that gotcha.

1 Like

Hmm, I remember trying this back in December. Thanks for the refresh. Now i’m trying to remember why I didn’t want to refactor my code…

I got it working with

I did some refactoring to change the t to an integer frame parameters. Then ran the gif generator at 30fps for 1 second starting at t =0 to t =30 (so the t sweeps integer values)

you will need to fiddle with the params a bit but its definitely feasible.

1 Like

Ok yea, that’s legit and does work.

IDK if your quick refactor unearthed some old skeletons or the gif generator page exacerbated the issue, but my laptop (i5/16g) absolutely screams and smokes while trying to make that gif. CPU and RAM were redlined the entire time.

@jrus did a bunch of unsolicited refactoring that got me to the original linked choropleth that fixed creating a new SVG on each iteration (that is performant and doesn’t blow up my computer after like 10 frames, lol).

But this will accomplish what I was after so I should be able to easily create my gif and get that in my PPT, so for that I thank you. You guys at observable continue to be :chef’s kiss:

1 Like

I think maybe the loaded notebook runs the scrubber loop as well. The two loops might even interact in an additively bad way, but I agree, who cares for one-off operations.

I like that an external notebook can enhance every other notebook in the ecosystem by providing a cross cutting feature.

BTW I fixed the xmlns SVG gotcha too so we don’t need to remember that anymore.