Curious if anyone has built an Observable dashboard app that is able to query and retrieve “new” data after app build time? At a minimum I’d like to be able to periodically query a database to refresh the dashboard data. If so, any pointers or examples would be greatly appreciated! Mike
There are many ways to do this—usually you would either poll repeatedly an API endpoint, or use a websocket. The way to make this work under Observable’s reactive system (Runtime) is to wrap these calls in a generator—so that when there is a new value, you notify the generator, and all the dependent variables (charts, etc) run again.
Here’s an example using a websocket:
https://observablehq.observablehq.cloud/pangea/party/bitcoin-transaction-size