Time series data axis, in R - r

I have nearly a quarter of a million data rows like below.
it consists of readings at 15-minute intervals over 7 years.
Propertimeseries <- ts(Proper)
plot.ts(Propertimeseries)
The above code is what I used to get the graphs below.
I want to have basically the line plot that can be seen on the bottom section of the graph with reading value on the y axis and the date on one x-axis. with a secondary x-axis going from 00:15:00 to 00:00:00 for each day.
Any help would be more than appreciated!
Thank you
EDIT*
#dcruvolo
this is the output for dput()
enter code here[3

Related

Graph time series in seconds with dygraph

I get data from a device recording roughly every 8 to 10 ms. Here is how the raw data looks like (with Time in seconds):
> data
Time Raw
1 0.004061294 0.7384716
2 0.012264294 1.9172491
3 0.020467294 2.2663045
4 0.028670294 1.1509293
5 0.037858294 1.6099277
6 0.048030294 0.7834101
...
The file is very long, and I would like to inspect it first with a scrollable x-axis. Therefore, I treated this data as a time series and used the dygraphs package to visualize it.
data_ts <- as.ts(data$Raw)
dygraph(ts_data, main="Raw signal") %>%
dyRangeSelector()
The result is great, but I would like to be able to see the values of the x-axis in seconds (or miliseconds). So far, nothing is displayed and I can't wrap my head around the problem. I guess it may have something to do with the fact that I haven't specified the unit of the time series. Or that my data does not fit the requirement of a time series, since the time intervals are slightly irregular.
Thanks for your help!
Any other solutions that would allow to scroll the x-axis are also welcome.

Plot occurrences over time in R from a dataset of H:M:S timestamps

I'm trying to plot, essentially, a timeline. I have two lists of timestamps in %H:%M:%S format, and I want to show them as occurrences over an x-axis of continuous time from 0 to 8 minutes.
Everything I can find is either a specialized package for a timeline that bins data by year instead of showing it continuously scatterplot style, or it requires a y-axis. I'm not plotting a function, so I don't have a y-axis, just two lines made up of dots something like this: mock excel plot. I got this by putting in fake values for the missing axis. It's also vertical instead of horizontal, but that's easily fixed.
I'm trying to show all the times in those 8 minutes a person pronounced an S and all the times she deleted it so I can see if she starts deleting more as time goes on.
Edit: here's some of my data as requested.
s deleted s pronounced
0:02:32 0:00:49
0:04:01 0:00:50
0:04:02 0:00:51
0:04:10 0:00:56
0:04:11 0:00:58
0:04:44 0:00:59
0:05:59 0:01:09
0:06:03 0:01:10
0:06:31 0:01:12
0:06:33 0:05:59
0:06:40 0:06:00
0:06:06
0:06:06
0:06:32
0:06:43
0:06:44
0:06:47
0:06:51
0:06:52
0:07:10
0:07:14

Weekly time series plot in R

I am trying to create a plot of weekly data. Though this is not the exact problem I am having it illustrates it well. Basically imagine you want to make a plot of 1,2,....,7 for for 7 weeks from Jan 1 2015. So basically my plot should just be a line that trends upward but instead I get 7 different lines. I tried the code (and some other to no avail). Help would be greatly appreciated.
startDate = "2015-01-01"
endDate = "2015-02-19"
y=c(1,2,3,4,5,6,7)
tsy=ts(y,start=as.Date(startDate),end=as.Date(endDate))
plot(tsy)
You are plotting both the time and y together as individual plots.
Instead use:
plot(y)
lines(y)
Also, create a date column based on the specifics you gave which will be a time series. From here you can add the date on the x-axis to easily see how your variable changes over time.
To make your life easier I think your first step should be to create a (xts) time series object (install/load the xts-package), then it is a piece of cake to plot, subset or do whatever you like with the series.
Build your vector of dates as a sequence with start/end date:
seq( as.Date("2011-07-01"), by=1, len=7)
and your data vector: 1:7
a one-liner builds and plots the above time series object:
plot(as.xts(1:7,order.by=seq( as.Date("2011-07-01"), by=1, len=7)))

How to create a data readable by R given raw data of dates and daily rainfall(in mm)?

I have dates ranging from 1970 to 1990 with observations of daily rainfall (in mm) in that period. How do I write/convert these data into something like "data(rain)" so that I can carry out further statistical calculations?
the dates are also a major problem. I would like to use the daily rainfall as y axis and dates as x axis.
I can do it the long way with rainfall in this manner:
rainfall<-c(20,23,25,30,38,24....) which is too long considering i have a lot of observations,
but how do i write the x axis of daily dates?
Please help??

R graphics plotting a linegraph with date/time horizontally along x-axis

I want to get a linegraph in R which has Time along x and temperature along y.
Originally I had the data in dd/mm/yyyy hh:mm format, with a time point every 30 minutes.
https://www.dropbox.com/s/q35y1rfila0va1h/Data_logger_S65a_Ania.csv
Since I couldn't find a way of reading this into R, I formatted the data to make it into dd/mm/yyyy and added a column 'time' with 1-48 for all the time points for each day
https://www.dropbox.com/s/65ogxzyvuzteqxv/temp.csv
This is what I have so far:
temp<-read.csv("temp.csv",as.is=T)
temp$date<-as.Date(temp$date, format="%d/%m/%Y")
#inputting date in correct format
plot(temperature ~ date, temp, type="n")
#drawing a blank plot with axes, but without data
lines(temp$date, temp$temperature,type="o")
#type o is a line overlaid on top of points.
This stacks the points up vertically, which is not what I want, and stacks all the time points (1-48) for each day all together on the same date.
Any advice would be much appreciated on how to get this horizontal, and ordered by time as well as date.

Resources