time-series

Table design for multiple time series data

五迷三道 提交于 2020-06-17 07:45:22
问题 I have more than 200 separate time series data(each represent one variable) that I gather from different sources/REST API calls. The frequency of each variable is different. Example temperature data is coming at very high frequency, but status data is very less frequent. I am looking for suggestions for scalable table design to store these data. If I store all the data in one table with timestamp being the key, I think the table will have so much nulls. 回答1: Based on your description, my

similar to seaborn's hue function in plotly?

风格不统一 提交于 2020-06-17 01:53:43
问题 geo1 = go.Scatter( x=geo['Year'], y=geo['Number'], mode='lines', marker=dict(color=geo['Geographical region'],size=4, showscale=False), name='geo', showlegend=True) data = [geo1] layout = dict( title='Working VISA in UK by Regions', xaxis=dict(title='Year'), yaxis=dict(title='Number'), showlegend=True) fig = dict(data=data, layout=layout) iplot(fig) The result shows: what I want is to use a similar function as 'hue' in seaborn: how to do the plotly coding by regions in different colors? 回答1:

How to plot simple vertical line with abline() in R?

可紊 提交于 2020-06-16 07:08:30
问题 I'm unable to add a vertical, or horizontal line to my graph. I feel I'm missing something very simple, but I can't seem to find it. I've copied some examples from the internet but it won't work. What am I doing wrong? This is what I'm trying: library(quantmod) getSymbols("^FTSE", src="yahoo", from=as.Date('2004-01-01'), to=as.Date('2013-01-01'), periodicity="weekly") plot(FTSE$FTSE.Close) abline(v='2008-01-01', col="red") I've also tried: abline(h = 5000, col="red") and abline(h = mean(FTSE

Time series classification - Preparing data

♀尐吖头ヾ 提交于 2020-06-13 10:46:06
问题 Looking for help on preparing input data for time series classification. The data is from a bunch of users who need to be classified. I want to Use LSTMs(plan to implement via Keras, with Tenserflow backend). I have data in two formats. Which is the right way to feed to RNNs for classification? Any help regrading the input shape would be of great help. Format 1 UserID TimeStamp Duration Label 1 2020:03:01:00:00 10 0 1 2020:03:01:01:00 0 0 1 2020:03:01:02:00 100 0 1 2020:03:01:03:00 15 0 1

Time series classification - Preparing data

徘徊边缘 提交于 2020-06-13 10:44:51
问题 Looking for help on preparing input data for time series classification. The data is from a bunch of users who need to be classified. I want to Use LSTMs(plan to implement via Keras, with Tenserflow backend). I have data in two formats. Which is the right way to feed to RNNs for classification? Any help regrading the input shape would be of great help. Format 1 UserID TimeStamp Duration Label 1 2020:03:01:00:00 10 0 1 2020:03:01:01:00 0 0 1 2020:03:01:02:00 100 0 1 2020:03:01:03:00 15 0 1

How to detect a sudden change in a time series plot in Pandas

时间秒杀一切 提交于 2020-06-12 08:27:12
问题 I am trying to "detect" a sudden drop in velocity in a series and I'm not sure how to capture it. The details and code are below: This is a snippet of the Series that I have along with the code to produce it: velocity_df.velocity.car1 Index velocity 200 17.9941 201 17.9941 202 18.4031 203 18.4031 Here is a plot of the entire series I'm trying to detect the sudden drop from 220 to 230-40 and save that out as a Series that looks like this: Index velocity 220 14.927 221 14.927 222 14.927 223 14

Preserve timestamp after decomposing xts in R

冷暖自知 提交于 2020-06-11 05:15:12
问题 I have an xts timeseries called hourplot in R with a period of 24 (hourly data) over two weeks, indexed by timestamp objects of POSIXlt class, like the following: > dput(hourplot) structure(c(1, 1, 1, 1, 1, 1, 1.11221374045802, 1.3368, 1.18, 1.0032, 1, 1, 1, 1, 1, 1, 1.0736, 1.2536, 1, 1.0032, 1.1856, 1.0048, 1, 1, 1, 1, 1, 1, 1, 1, 1.04045801526718, 1.20229007633588, 1.00229007633588, 1, 1, 1, 1, 1, 1, 1, 1.1152, 1.008, 1, 1, 1.2648, 1.1832, 1, 1, 1, 1, 1, 1, 1, 1.0424, 1.2952, 1.6496, 1

Multidimensional/multivariate dynamic time warping (DTW) library/code in Python

那年仲夏 提交于 2020-06-09 18:05:54
问题 I am working on a time series data. The data available is multi-variate. So for every instance of time there are three data points available. Format: | X | Y | Z | So one time series data in above format would be generated real time. I am trying to find a good match of this real time generated time series within another time series base data, which is already stored (which is much larger in size and was collected at a different frequency). If I apply standard DTW to each of the series (X,Y,Z)

Using time and numerical value in conditional statements to create categorical column python

99封情书 提交于 2020-06-03 19:29:54
问题 I'm trying to execute if statement using time and numerical value to make a new column categorical column Condition - if time is between 05:00:00 and 19:00:00 and t_value > 0 & t_value <=13 then classify as "C" else "IC" If time is not in the range then classify as NA Example Input t_value 2020-05-17 00:00:00 0 2020-05-17 01:00:00 0 2020-05-17 02:00:00 0 2020-05-17 03:00:00 0 2020-05-17 04:00:00 0 2020-05-17 05:00:00 0 2020-05-17 06:00:00 0 2020-05-17 07:00:00 8 2020-05-17 08:00:00 9 2020-05

Using time and numerical value in conditional statements to create categorical column python

旧街凉风 提交于 2020-06-03 19:28:21
问题 I'm trying to execute if statement using time and numerical value to make a new column categorical column Condition - if time is between 05:00:00 and 19:00:00 and t_value > 0 & t_value <=13 then classify as "C" else "IC" If time is not in the range then classify as NA Example Input t_value 2020-05-17 00:00:00 0 2020-05-17 01:00:00 0 2020-05-17 02:00:00 0 2020-05-17 03:00:00 0 2020-05-17 04:00:00 0 2020-05-17 05:00:00 0 2020-05-17 06:00:00 0 2020-05-17 07:00:00 8 2020-05-17 08:00:00 9 2020-05