← Latest papers
📊 statistics

cubble: An R Package for Organizing and Wrangling Multivariate Spatio-temporal Data

The paper introduces **cubble**, an R package featuring a novel data structure and suite of functions designed to simplify the organization, manipulation, and simultaneous analysis of complex multivariate spatio-temporal data, particularly for handling hierarchical structures as demonstrated with Australian climate datasets.

Original authors: H. Sherry Zhang, Dianne Cook, Ursula Laa, Nicolas Langrené, Patricia Menéndez

Published 2026-02-24
📖 5 min read🧠 Deep dive

Original authors: H. Sherry Zhang, Dianne Cook, Ursula Laa, Nicolas Langrené, Patricia Menéndez

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a massive, chaotic library of information about the weather. You have thousands of weather stations scattered across a country, and each one records temperature, rain, and wind every single day for years.

If you try to look at this data in a standard spreadsheet, it gets messy very quickly. You might have to choose: do you look at one station and see how the weather changed over time? Or do you look at one day and see how the weather varied across space?

The problem is that real-world questions often need both at once. "How did the rain pattern change across the whole state over the last decade?" is a question that requires looking at space and time simultaneously.

Enter cubble (pronounced like "cubicle" but with a "b"), a new tool for the R programming language designed to solve this exact headache.

The "Cubble" Metaphor: The Magic Cube

Think of your data not as a flat sheet of paper, but as a 3D cube.

  • One side of the cube represents Space (where the weather stations are).
  • The other side represents Time (the days, months, and years).
  • The inside of the cube is the actual data (temperature, rain, etc.).

Most tools force you to flatten this cube into a 2D sheet, which makes it hard to see the whole picture. cubble is like a magical cube that can instantly pivot or rotate between two views without losing any information:

  1. The "Spatial" View (The Map): Imagine looking at the cube from the top. You see all the weather stations as dots on a map. The time data is neatly tucked away inside each dot, like a small diary attached to every station. This is great for comparing different locations.
  2. The "Temporal" View (The Timeline): Now, imagine rotating the cube to look at the side. Suddenly, the map disappears, and you see a long list of dates. The location data is now tucked away in the background, like a name tag on every line of the timeline. This is great for spotting trends over time.

The magic of cubble is that you can flip back and forth between these two views instantly. If you filter the map to show only "hot" stations, the timeline automatically updates to show only the data from those specific stations. They stay perfectly synchronized.

What Can You Do With It?

The paper explains how cubble helps scientists do three main things that used to be very difficult:

1. The "Matchmaker" (Connecting Different Data Sources)
Imagine you have a map of rain gauges and a separate list of river levels. You want to know: "Does the rain at Station A cause the river to rise at Gauge B?"
Usually, these two datasets don't line up perfectly. cubble acts like a smart matchmaker. It can find the rain gauge closest to a river gauge (spatial matching) and then check if their patterns of rising and falling water move together over time (temporal matching). It helps you connect the dots between different types of data.

2. The "Glyph Artist" (Visualizing Time on a Map)
How do you show 12 months of temperature changes on a single map without cluttering it?
cubble allows you to create "glyph maps." Imagine placing a tiny, custom-shaped graph (a glyph) on top of every city on the map. Each glyph shows the temperature trend for that city over the year.

  • A tall glyph might mean a hot summer.
  • A wavy glyph might mean unpredictable weather.
    This lets you see the "personality" of the weather in every city at a single glance.

3. The "Interactive Explorer" (Playing with Data)
The paper shows how cubble works with interactive graphics. Imagine a dashboard with a map on the left and a graph on the right.

  • If you click on a specific city on the map, the graph instantly highlights only the data for that city.
  • If you click on a specific peak on the graph (like a heatwave), the map instantly highlights the cities that experienced that heatwave.
    It turns data analysis into a conversation where you can ask questions and get immediate visual answers.

Why Does This Matter?

Before cubble, scientists had to use different, clunky tools to handle the "where" and the "when" of data, often forcing them to choose one perspective over the other.

cubble is like a Swiss Army knife for spatio-temporal data. It respects the "tidy" way of organizing data (making it clean and easy to read) while giving scientists the flexibility to slice and dice the data however they need to. Whether they are tracking the spread of a virus, predicting floods by matching rain to rivers, or studying how climate change is altering temperature patterns over decades, cubble makes the complex world of space and time data much easier to understand.

In short: It turns a messy pile of weather reports into a clear, interactive story about our changing world.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →