time-series

How to convert to a time series and plot a dataframe with each day as a variable or column?

一曲冷凌霜 提交于 2020-03-24 00:17:12
问题 I am trying to get a plot of the number of Cov-19 in Italy over time, and came across this repository in GitHub, and tried to subset the data for Italy as such: require(RCurl) require(foreign) x = getURL("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv") corona = read.csv(text = x, sep =",",header = T) str(corona) Italy <- corona[,corona$Country.Region=='Italy'] Italy <- corona[corona$Country

Resample time series data multiple variables

≯℡__Kan透↙ 提交于 2020-03-21 06:57:12
问题 I have some time series data (making some up) one variable is value and the other is Temperature import numpy as np import pandas as pd np.random.seed(11) rows,cols = 50000,2 data = np.random.rand(rows,cols) tidx = pd.date_range('2019-01-01', periods=rows, freq='T') df = pd.DataFrame(data, columns=['Temperature','Value'], index=tidx) Question , How do I resample the data per day in a separate pandas df named daily_summary with 3 columns each containing: the daily maximum value the hour the

How to use deep learning models for time-series forecasting?

柔情痞子 提交于 2020-03-18 12:19:24
问题 I have signals recorded from machines (m1, m2, so on) for 28 days. (Note: each signal in each day is 360 length long). machine_num, day1, day2, ..., day28 m1, [12, 10, 5, 6, ...], [78, 85, 32, 12, ...], ..., [12, 12, 12, 12, ...] m2, [2, 0, 5, 6, ...], [8, 5, 32, 12, ...], ..., [1, 1, 12, 12, ...] ... m2000, [1, 1, 5, 6, ...], [79, 86, 3, 1, ...], ..., [1, 1, 12, 12, ...] I want to predict the signal sequence of each machine for next 3 days. i.e. in day29 , day30 , day31 . However, I don't

Transforming a dataframe into a TS in R [duplicate]

此生再无相见时 提交于 2020-03-15 09:38:07
问题 This question already has answers here : How to convert dataframe into time series? (5 answers) Closed 10 days ago . I've been trying to transform a dataframe I put together into a Time Series, but for some reason it doesn't work. I am very new to R. x<-Sales_AEMBG%>% + select(Ecriture.DatEcr, Crédit, Mapping) > names(x)<-c("Dates","Revenue","Mapping") > str(x) Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 15167 obs. of 3 variables: $ Dates : POSIXct, format: "2016-01-02" "2016-01-02" "2016-01-02

Transforming a dataframe into a TS in R [duplicate]

允我心安 提交于 2020-03-15 09:32:29
问题 This question already has answers here : How to convert dataframe into time series? (5 answers) Closed 10 days ago . I've been trying to transform a dataframe I put together into a Time Series, but for some reason it doesn't work. I am very new to R. x<-Sales_AEMBG%>% + select(Ecriture.DatEcr, Crédit, Mapping) > names(x)<-c("Dates","Revenue","Mapping") > str(x) Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 15167 obs. of 3 variables: $ Dates : POSIXct, format: "2016-01-02" "2016-01-02" "2016-01-02

Transforming a dataframe into a TS in R [duplicate]

一曲冷凌霜 提交于 2020-03-15 09:32:28
问题 This question already has answers here : How to convert dataframe into time series? (5 answers) Closed 10 days ago . I've been trying to transform a dataframe I put together into a Time Series, but for some reason it doesn't work. I am very new to R. x<-Sales_AEMBG%>% + select(Ecriture.DatEcr, Crédit, Mapping) > names(x)<-c("Dates","Revenue","Mapping") > str(x) Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 15167 obs. of 3 variables: $ Dates : POSIXct, format: "2016-01-02" "2016-01-02" "2016-01-02

Dummyfication of a column/variable [duplicate]

久未见 提交于 2020-03-15 05:57:28
问题 This question already has answers here : Generate a dummy-variable (16 answers) Closed 2 years ago . I'm designing a neural Network in R. For that I have to prepare my data and have imported a table. For example: time hour Money day 1: 20000616 1 9.35 5 2: 20000616 2 6.22 5 3: 20000616 3 10.65 5 4: 20000616 4 11.42 5 5: 20000616 5 10.12 5 6: 20000616 6 7.32 5 Now I need a dummyfication. My final table should look like this: time Money day 1 2 3 4 5 6 1: 20000616 9.35 5 1 0 0 0 0 0 2: 20000616

How to plot a time-series to study frequency of items?

雨燕双飞 提交于 2020-03-05 06:06:32
问题 I would need to plot through time same values to see how frequency changes. In particular posts generated from different users through time. I have a dataset like the following: GENDER POST DATE COUNTER 0 men (post 103) 36 43 1 men (post 109) 38 2 2 men (post 116) 41 12 3 men (post 119) 42 32 4 men (post 124) 44 2 .. ... ... ... ... 82 women (post 83) 29 34 83 women (post 86) 30 2 84 women (post 86) 65 9 85 women (post 91) 32 5 86 women (post 99) 35 5 where DATE is numerical (sequential

How to plot a time-series to study frequency of items?

泪湿孤枕 提交于 2020-03-05 06:06:07
问题 I would need to plot through time same values to see how frequency changes. In particular posts generated from different users through time. I have a dataset like the following: GENDER POST DATE COUNTER 0 men (post 103) 36 43 1 men (post 109) 38 2 2 men (post 116) 41 12 3 men (post 119) 42 32 4 men (post 124) 44 2 .. ... ... ... ... 82 women (post 83) 29 34 83 women (post 86) 30 2 84 women (post 86) 65 9 85 women (post 91) 32 5 86 women (post 99) 35 5 where DATE is numerical (sequential

How to use ARIMA.SIM with an existing TimeSeries

北慕城南 提交于 2020-03-05 03:11:28
问题 I am trying to use arima.sim to plot it and then Add fractdiff.sim to the plot. I am able to use arima.sim but I don't know how to specify the time series I want to use ( Total_TimeSeries ) : arima.sim(list(c(-0.7684),c(0.7113)), 120, 10, 0.1) the output of the previous code work but give me a plot and I don't understand from witch data : In fact I would like to do arima.sim in the same way than arima (using Total_TimeSeries ) : arima(Total_TimeSeries, order=c(1,1,1),seasonal = list(order = c