WeatherData and TimeSeriesModelFit

with

city = CityData[{"Bremerhaven", "Bremen", "Germany"}];


and

BHVTemperatureData = WeatherData[city, "MeanTemperature", {{2000}, {2013}, "Month"}];


I get a TimeSeries object with 168 data points. These points are months and therefore these data should be uniformly spaced (12 per year). But

tsm = TimeSeriesModelFit[BHVTemperatureData];


gives the message "The data is not uniformly spaced ...".

Questions: a) Can this unexpected message be explained? b) Is there a way to retrieve a list of points in time/data from the TimeSeries object to exlain what is saved in this object type?

Best regards Volker

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Dec 5 '14 at 15:29

1 Answer

At least on V9:

DateDifference @@@ Partition[BHVTemperatureData[[All, 1]], 2, 1]
(* {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ... *)


Shows that the data is not "equally spaced"

• In mma10 this statement produces a long error message "Part::partd ...". Did they change the data structure of this type? Dec 5 '14 at 13:52
• @Volker Can't test it here,but perhaps something like DateDifference @@@ Partition[BHVTemperatureData["Times"], 2, 1] Dec 5 '14 at 14:24
• thanks, that works. I would never found this solution. Are you a relative of the famous east-roman general of the 6th century? Dec 5 '14 at 15:04
• @Volker I am him Dec 5 '14 at 15:28