[SciPy-User] scikits.timeseries: How to define frequency of15minutes
Dharhas Pothina
Dharhas.Pothina@twdb.state.tx...
Fri Apr 16 09:58:52 CDT 2010
I had this question about custom frequencies when I first started using the timeseries package about a year or so ago and I think the answer was that you couldn't do custom frequencies because the underlying code is in C and a custom frequency would involve modifying that code.
You could probably write a function that takes your custom frequency and loops through the dates in the timeseries and checks if they exist and returns false if there are any missing. I'm not sure if anything like that already exists.
- dharhas
>>> Georges Schutz <georges.schutz@internet.lu> 4/16/2010 8:30 AM >>>
Thanks Dharhas,
This is a way to process, I checked it out rapidly and it seams OK at
least for my tests.
But if I got it right it removes the possibility to do basic sampling
error checking based on missing_dates(). I will have to do this by other
means. I had a look at the "steps" attribute of a DateArray which will
give me a list that I can filter to find out if there are missing dates
within a series.
Is a user defined frequency not possible?
Georges Schutz
On 16/04/2010 14:33, Dharhas Pothina wrote:
> Hi George,
>
> For the 15 minute data you can use the minutely frequency and for the 30 second frequency you can use the second frequency, for the 2hr, 6hr use the hourly frequency. That is what I do when analyzing data from data loggers. Or if you are pulling in multiple datasets and want to treat them all the same just use the highest frequency you expect to see for all of them (in this case seconds)
>
> You will end up with a timeseries with missing dates which is fine for most work. Some of the timeseries toolkit functions however choke on this and you have to use the fill_missing_dates function to fill them. This will insert the missing dates at the frequency you chose earlier and mask those values. It makes the timeseries a lot larger because of all the masked values but will work for any analysis you are doing.
>
> - dharhas
>
>>>> Georges Schutz<georges.schutz@internet.lu> 4/16/2010 4:35 AM>>>
> I have a data logger giving me a value all 15 minutes. I would like to
> use DateArray from scikits.timeseries to handle this time series.
> I do not see how to define a frequency that is out of the specified
> constants. Is there a possibility?
>
> If I use the guess_freq() on that time data it returns 8000 ('T') which
> is a minutely frequency. Using this the has_missing_dates() gave me a
> True what is obvious as it checks for a resolution of one minute.
>
> The situation is the same for other timeseries that I have with a
> frequency of 30 seconds or 2 hours, 6 hours, ...
>
> As I am new to the use of scikits.timeseries and scipy in general so I
> may have missed an obvious way to do this.
>
> Thanks for your help
>
> Georges Schutz
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
_______________________________________________
SciPy-User mailing list
SciPy-User@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user
More information about the SciPy-User
mailing list