Sitemap
TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Follow publication

I Built a Reusable Dashboard for Read the Docs Traffic Analytics Using Vizro-AI

7 min readMay 17, 2024

--

A dark theme screen shot with a set of charts to visualize traffic data from a website.
The resulting dashboard from typical traffic data

TL;DR?

A Read the Docs dashboard project

A teal-coloured chart with date on x axis and a curve of page views that goes up and down.
A typical RTD pageviews chart (the only graphical traffic data provided)

Get the code and data

What are Vizro and Vizro-AI?

Set up Vizro-AI

Build a chart

“Combine rows of Views for each Date for latest and stable Version. Draw a smoothed line graph comparing Views per Date for latest and stable.”
Insights section returned from the call to plot() with instructions “Combine rows of Views for each Date for latest and stable Version. Draw a smoothed line graph comparing Views per Date for latest and stable.”
A dark theme screenshot of a single plotly chart showing date on the x axis and two coloured lines of view data for a website.
Chart returned from the call to plot() with instructions “Combine rows of Views for each Date for latest and stable Version. Draw a smoothed line graph comparing Views per Date for latest and stable.”

Build more charts

Collate rows of data for Path where Version==stable. Create a horizontal bar chart describing the total Views for the top 5 pages. Add the numbers to each bar and title ‘Total views for top 5 stable pages’. Decrease font size of marks” and “Collate rows of data for Path where Version==stable. Create a line graph for the total Views per Date for the top 5 Paths”

Create a Vizro dashboard

The # TO DO section is where we add in each of the charts.
A dark theme screen shot with a set of charts to visualize traffic data from a website.
The final output built using method 2 which enabled me to tweak the colours in the first chart.
Vizro().build(dashboard).run(port=8006) # localhost8006 in the browser
Vizro().build(dashboard).run(jupyter_mode="external")

Wrapping up

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Jo Stichbury
Jo Stichbury

Written by Jo Stichbury

Technical content creator writing about data science and software. Old-school Symbian C++ developer, now accidental cat herder and goose chaser.

Responses (1)