Introducing Window Calculations with Chart in Exploratory Desktop

Kan Nishida
learn data science

I have talked about five most practically useful window calculations in R before. With the most recent release of Exploratory Desktop (as of writing), we have embedded them as part of Bar, Line, and Area charts to make them even more accessible for more people. We think this will help you use these calculations quickly and iteratively to spot insightful trends or outliers easier.

All the window calculations can be found in a dialog under Y-Axis gear icon and available for Bar, Line, and Area charts for now. If you would like to know more about what exactly each window calculation does in general, take a look at this previous post where I explained with examples.

Here is a quick introduction.

Running Total

You can click the gear icon next to ‘Y Axis’. This will open ‘Window (Table) Calculation’ dialog and select ‘Running Total’ from the list.

The default is ‘Sum’ as a way to accumulate the numbers, but you can change this to something else like ‘Mean’, for example.

You can also select a column from Color dropdown to see the running total for each of the column values.

The cool thing is, you can quickly switch the date / time aggregation level in ‘X Axis’ when date / time data type column is assigned so that you can see the trend of the running total at different time intervals.

% of Total

You can select ‘% of Total’ in the Window Calculation dialog. Bar or Area chart would be a great way to visualize the result.

Difference From

You can select ‘Difference From’ in the Window Calculation dialog. The default is ‘First’ to calculate the difference from the first value, but you can switch this to ‘Last’, ‘Previous (lag)’, or ‘Next (lead)’.

You can always change the aggregation function for the base measure. In this example with the stock price data we might want to change that to ‘Average’ instead of the default ‘Sum’.

And, if you want to see the difference from a particular date / time point, you can always filter the data using ‘filter’ command like below.

Percent (%) Difference From

You can select ‘% Difference From’ in the Window Calculation dialog. This is very much like ‘Difference From’, except it gives the percentage difference.

Moving Average

You can select ‘Moving Calculation’ and select ‘Average’ in the Window Calculation dialog.

‘Window Size’ is to set how many data points (or time periods) you want to use to calculate the aggregation like average. ‘Window Align’ is to set whether you want to use the previous periods (Right), the next periods (Left), or both (Center) to calculate the average.

As I discussed in the previous post, these window calculations can be very useful in many practical use cases. Now that it is super easy to access them and you can use them flexibly, we hope you will uncover many of hidden patterns and trends from your data!

If you want to try this out quickly you can download the sample data sets below and import into your Exploratory Desktop.

If you don’t have Exploratory Desktop yet, you can sign up for free from our website, download it, and start exploring your data with a power of R and dplyr!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Written by Kan Nishida

CEO / Founder at Exploratory(https://exploratory.io/). Having fun analyzing interesting data and learning something new everyday.

No responses yet

What are your thoughts?