3
$\begingroup$

I have a collection of highly irregular sampled data. The gap between measurements can be few seconds, or few weeks or few decades ... What are the techniques to plot irregularly spaced time series data?

$\endgroup$
5
$\begingroup$

Just plot observations against timestamps and connect the dots.

For example, I measure my weight every time I get to the gym, which happens rather irregularly, indeed: weights

Depending on what information you want to show, you may also want to plot the length of each interval between successive observations, e.g.: difference in days

| cite | improve this answer | |
$\endgroup$
  • 2
    $\begingroup$ If the times series is mostly regular (e.g., daily values, but missing values at public holidays), you might want to plot the lines spanning (i.e., connected to) the missing days as dotted or dashed lines, to make it clearer that there are days with missing data. $\endgroup$ – Karl Ove Hufthammer Apr 1 '15 at 8:15
  • $\begingroup$ @KarlOveHufthammer: I work with retail sales, and in many countries, I only have daily data Mon-Sat, since stores are closed on (most) Sundays. In such cases, I only connect adjacent valid observations, so my time series has "holes". However, I'd call that a "regular time series with missing data", not an "irregular time series". $\endgroup$ – Stephan Kolassa Apr 1 '15 at 8:18
  • $\begingroup$ What about if sometimes your are measuring your weight obsesivly every few seconds, or every few minutes or every other day. Then severals months pass and you do not weight yourself until you get another compulsive obsessive episode? In summary, I have a highly irregular sampled data. The gap between measurements can be few seconds, or few weeks or few decades... Then we cannot have a graph plotted by month as you suggest... $\endgroup$ – mfroese Apr 1 '15 at 16:49
  • $\begingroup$ My data are not plotted by month - the months are only axis annotations. I have daily data. You can simply use whatever timestamp you have on the x axis. Perhaps you want to separate different obsessive episodes into different side-by-side panels. $\endgroup$ – Stephan Kolassa Apr 2 '15 at 6:36
1
$\begingroup$

You could create a "time map" which is a type of scatterplot. Each event is a point, with the x-value being the time elapsed since the previous event, and the y-value is the waiting time until the next event. See this blog or on Twitter, check out #time_map_viz for examples.

You can color-code the dots to carry additional information. To deal with varying timescales, you can use logarithmic axes.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.