2
$\begingroup$

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

$\endgroup$
  • $\begingroup$ 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! $\endgroup$ – Dr. belisarius Dec 5 '14 at 15:29
1
$\begingroup$

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"

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.