Let’s store our data on BigQuery. Data Studio is compatible with more Data sources not just BigQuery but in this post, we will just use BigQuery. Here I have good news, saving data into BigQuery is as easy as exporting a pandas DataFrame to CSV!

Pandas’ library has already implemented a function to directly dump our dataframe into BigQuery. We will just need to install the python package pandas-gbq and its dependencies. And then just use the function pandas.DataFrame.to_gbq. If you want to do more than just storing data into BigQuery I recommend you then use the package google-cloud-bigquery.

Build a Dashboard with Data Studio

Now we have all our predictions ready to be explored in BigQuery. Just a small step before diving into the dashboard. We need to create a view of our processed data. In BigQuery this is very easy since it provides a website IDE to create SQL queries. We just need to make our SQL query and produce a view. Now, we are ready to visualize our data!

Creating a view using BigQuery web’s UI

Let’s move now to Data Studio. There are some templates that we could follow to create our dashboard. I encourage you to start a report from scratch though. In just a few hours we will be masters of Data Studio and we will be able to create useful reports. We can use multiple data sources to build our dashboard. If we have followed this post we will probably need to choose BigQuery and then choose our view. If our data is already imported we need to know that Data Studio will cache it and we can start playing without the fear of thinking that it is querying BigQuery every time. We can decide how often our data will be refreshed: every 12 hours (default), every 4 hours or every hour. You can also refresh the data manually, of course. More info about how it works internally in the google documentation.

We have our data imported and it is time to start playing around and create our dashboards. We have multiple ways to visualize our data: dynamic tables, bubble pots, barplots, etc. I encourage you to use the ones that suit our use case best!

Data Studio report for sales forecasting online evaluation

In the previous image, we have an example from a real case where we evaluate our sales forecasting models for finished sales. The predictions are stored in BigQuery and used for analysis afterwards. The difference between this dashboard and some offline evaluation is that this will keep being updated with new sales every day. We will be able to see if our performance decreases through time or our models are stable or not.

Schedule and send our report by email

Finally, another useful feature from Data Studio is the report scheduling. We can schedule an email with our report so our team never misses anything!