3 ms·
We used altair to develop an analytics dashboard as part of our single page application (SPA). We developed a web component encapsulating vega-lite JS library a
by dragonsh 6y ago
We used altair to develop an analytics dashboard as part of our single page application (SPA). We developed a web component encapsulating vega-lite JS library and used that component to assemble the dashboard which is part of the application. Altair based backend can use custom renderer to generate target response for analytics API requests. [1]
Most of the commercial and open source solutions including Tableau, Apache Superset, Metabase were very complicated to provide a seamless integrated dashboard with our Single Page Application using the same authenticaton and authorization layer. Most of these solutions recommend using iFrame. With altair we could directly generate the target vega-lite json for our web component and it work seamless.
Also for some static reports we could generate output in other formats from altair directly. Altair being in Python (Apache Superset was a big contender), it was easy enough to integrate into our backend as one of the analytics services provider. Given vega-lite and vega grammar is standardized, we are exploring to build real-time dashboard analytics application for large multi-screen display in a control room kind of an environment.
Before altair our backend was generating data directly consumed by chartjs web component.
[1] https://altair-viz.github.io/user_guide/custom_renderers.html https://altair-viz.github.io/user_guide/custom_renderers.htm...
- Sherl 6y agoWould you recommend this to integrate with FastAPI or dash/plotly for similar application?
- dragonsh 6y agoWe have tried dash/plotly and moved to altair. Reason is we can generate vega-lite specification and send it to web-component based on API Request (we did it with flask and bottle). In general with FastAPI you can integrate altair to generate your vega-lite json as a response to an API request taking care of authentication and authorization in FastAPI (either with JWT token or other schemes like oauth2).