All Questions

28
votes
3answers
32396 views

Using JFreeChart to display recent changes in a time series

How can I use JFreeChart to display just the most recent data in a continually updated time series? Addenda: A complete, working example that incorporates the accepted answer is shown here. See also ...
194
votes
4answers
253327 views

Plotting two variables as lines using ggplot2 on the same graph

A very newbish question, but say I have data like this: test_data <- data.frame( var0 = 100 + c(0, cumsum(runif(49, -20, 20))), var1 = 150 + c(0, cumsum(runif(49, -10, 10))), date = ...
17
votes
5answers
8914 views

Reshaping time series data from wide to tall format (for plotting)

I have a data frame containing multiple time series of returns, stored in columns. The first column contains dates, and subsequent columns are independent time series each with a name. The column hea...
46
votes
7answers
54204 views

Pandas: rolling mean by time interval

I'm new to Pandas.... I've got a bunch of polling data; I want to compute a rolling mean to get an estimate for each day based on a three-day window. As I understand from this question, the rolling_* ...
71
votes
2answers
34991 views

How to get a vertical geom_vline to an x-axis of class date?

Even though I found Hadley's post in the google group on POSIXct and geom_vline, I could not get it done. I have a time series from and would like to draw a vertical line for years 1998, 2005 and 2010...
64
votes
2answers
29274 views

How to parse milliseconds?

How do I use strptime or any other functions to parse time stamps with milliseconds in R? time[1] # [1] "2010-01-15 13:55:23.975" strptime(time[1], format="%Y-%m-%d %H:%M:%S.%f") # [1] NA strptime(ti...
46
votes
2answers
83426 views

How to calculate moving average using NumPy?

There seems to be no function that simply calculates the moving average on numpy/scipy, leading to convoluted solutions. My question is two-fold: What's the easiest way to (correctly) implement a m...
25
votes
7answers
24324 views

Insert rows for missing dates/times

I am new to R but have turned to it to solve a problem with a large data set I am trying to process. Currently I have a 4 columns of data (Y values) set against minute-interval timestamps (month/day/y...
84
votes
14answers
61816 views

Peak signal detection in realtime timeseries data

Update: The best performing algorithm so far is this one. This question explores robust algorithms for detecting sudden peaks in real-time timeseries data. Consider the following dataset: p = [...
27
votes
3answers
15755 views

Apache Spark Moving Average

I have a huge file in HDFS having Time Series data points (Yahoo Stock prices). I want to find the moving average of the Time Series how do I go about writing the Apache Spark job to do that .

Previous Next