0

What I have is data in a tab delimited txt file in the following format (http://pastebin.com/XN3y9Wek):

Date      Time      Flow (L/h)
...
6/10/15 05:19:05    -0.175148624605041
6/10/15 05:34:05    -0.170297042615798
...
7/10/15 07:34:08    -0.033833540932291
7/10/15 07:49:08    -0.0256913011453011
...

The data currently ranges from 6/10/15 till 22/11/15. Measurements occur approximately every 15 minutes, but sometimes there is data loss which means that there are not the same amount of data points for every day. There are also periods where there is a larger gap (for example evening 16/11 -> morning 17/11) due to logger malfunction.

From this data I would like to create a similar figure like this one, as it offers a very nice seasonal representation of a large amount of data (my full dataset spans over several years):

Its similar to the style of a Hovmöller diagram. I have tried experimenting with R and the lattice package, but I struggle with the data gaps I have in my datasets and the irregular data points per day.

Any help you can offer me, an R beginner, would be greatly appreciated!

(If it would be possible in PHP or Javascript, feel free to post this as well)

miken32
  • 42,008
  • 16
  • 111
  • 154
jonasvdc
  • 33
  • 1
  • 9
  • 1
    It's not clear to me what the problem is with irregular data or what you want to do about it. Are you trying to hide the gaps? Do you want some form of interpolation or imputation? What exactly have your attempts been thus far and what specifically is wrong with the output? – MrFlick Nov 25 '15 at 16:06
  • On the diagram each day represents one horizontal line. The gaps should be blank spots on this diagram. Thus far I have not been able to get any output at all, at least not like the example I have posted. So what I'm asking here is some specific ideas on how I can do this. – jonasvdc Nov 25 '15 at 16:12
  • I was able to get something pretty similar using this http://stackoverflow.com/questions/5453336/plot-correlation-matrix-into-a-graph , but I don't know how to handle the gaps in my data. Using this method it joins the data. – jonasvdc Nov 25 '15 at 16:14
  • The basic steps would be: convert dates and times separately, Then build a matrix with numeric versions of those, containing the (possibly aggregated by minute) values for Flow. You don't yet seem to have mastered the basics of data input in R and there is no data that would make sense to build demonstrations. – IRTFM Nov 25 '15 at 16:35

0 Answers0