Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

In the WL example below, WeatherData[] returns an undated list of values when I add the annotation "NonMetricValue."

WeatherData["New York City", "MeanTemperature", {{2013,12,1},{2013,12,12},"Day"}]

{{{2013,12,1},5.5},{{2013,12,2},6.06},{{2013,12,3},4.94},{{2013,12,4},6.5}, {{2013,12,5},9.17},{{2013,12,6},11.56},{{2013,12,7},3.22},{{2013,12,8},0.11}, {{2013,12,9},0.22},{{2013,12,10},2.22},{{2013,12,11},-0.72}, {{2013,12,12},-1.22}}

WeatherData["New York City", "MeanTemperature", 
     {{2013,12,1},{2013,12,12},"Day"}, "NonMetricValue"]

{41.9,42.91,40.89,43.7,48.51,52.81,37.8,32.2,32.4,36.,30.7,29.8}

This seems like a bug, since a proper effect would change only the values. Aside from that, is this a syntax problem (am I doing it wrong)? I would like to be able to get a date list of temperature in Fahrenheit directly from WeatherData[].

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

You should use the form "DateNonMetricValue". E.g.

WeatherData["New York City", "MeanTemperature", {{2013, 12, 
   1}, {2013, 12, 12}, "Day"}, "DateNonMetricValue"]

The result is then:

{{{2013, 12, 1}, 41.9}, {{2013, 12, 2}, 42.91}, {{2013, 12, 3}, 40.89}, {{2013, 12, 4}, 43.7}, {{2013, 12, 5}, 48.51}, {{2013, 12, 6}, 52.81}, {{2013, 12, 7}, 37.8}, {{2013, 12, 8}, 32.2}, {{2013, 12, 9}, 32.4}, {{2013, 12, 10}, 36.}, {{2013, 12, 11}, 30.7}, {{2013, 12, 12}, 29.8}}

share|improve this answer
2  
Thanks. I didn't see this annotation in the documentation. Is it just me, or are these curated data annotations/options poorly documented? –  George Wolfe Dec 14 '13 at 15:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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