Message Boards Message Boards

0
|
6679 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

TimeSeries results - output format (v9 vs v10)

Posted 11 years ago

On the current build for the Pi, executing WeatherData["London", "Temperature", {2014,10,10}] results in a 'TimeSeries' representation and the elements are 'Quantities'

enter image description here

On earlier versions the result was a list representation

enter image description here

Is there a cross-version way of getting the result in the same format (either would be fine)? i.e. both versions would execute the same expression to return the same format

POSTED BY: Steve Lloyd
data = WeatherData["London", "Temperature", {2014, 10, 10}];

Transpose[{data["Dates"],  QuantityMagnitude /@ data["Values"]}] // Normal

gives

{{{2014,10,10,0,20,0.},13.},{{2014,10,10,0,50,0.},13.},{{2014,10,10,1,20,0.},12.},{{2014,10,10,1,50,0.},12.},{{2014,10,10,2,20,0.},12.},{{2014,10,10,2,50,0.},12.},{{2014,10,10,3,20,0.},12.},{{2014,10,10,3,50,0.},12.},{{2014,10,10,4,20,0.},12.},{{2014,10,10,4,50,0.},11.},{{2014,10,10,5,20,0.},11.},{{2014,10,10,5,50,0.},11.},{{2014,10,10,6,20,0.},12.},{{2014,10,10,6,50,0.},12.},{{2014,10,10,7,20,0.},13.},{{2014,10,10,7,50,0.},13.},{{2014,10,10,8,20,0.},14.},{{2014,10,10,8,50,0.},14.},{{2014,10,10,9,20,0.},15.},{{2014,10,10,9,50,0.},16.},{{2014,10,10,10,20,0.},17.},{{2014,10,10,10,50,0.},17.},{{2014,10,10,11,50,0.},16.},{{2014,10,10,12,20,0.},17.},{{2014,10,10,12,50,0.},15.},{{2014,10,10,13,20,0.},16.},{{2014,10,10,13,50,0.},17.},{{2014,10,10,14,20,0.},17.},{{2014,10,10,14,50,0.},17.},{{2014,10,10,15,20,0.},17.},{{2014,10,10,15,50,0.},17.},{{2014,10,10,16,20,0.},17.},{{2014,10,10,16,50,0.},16.},{{2014,10,10,17,20,0.},16.},{{2014,10,10,17,50,0.},15.},{{2014,10,10,18,20,0.},15.},{{2014,10,10,18,50,0.},15.},{{2014,10,10,19,20,0.},15.},{{2014,10,10,19,50,0.},14.},{{2014,10,10,20,20,0.},14.},{{2014,10,10,20,50,0.},14.},{{2014,10,10,21,20,0.},14.},{{2014,10,10,21,50,0.},14.},{{2014,10,10,22,20,0.},13.},{{2014,10,10,22,50,0.},13.},{{2014,10,10,23,20,0.},13.},{{2014,10,10,23,50,0.},13.}}
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract