Message Boards Message Boards

WeatherData function results in "Missing[Not Available]"

Posted 8 years ago

We are using Mathematica 8 to extract historical weather data for use in Excel models. In the last month, our code has stopped working in a way that implies we can't access anything but current conditions.

Taken directly from the examples in the Function Navigator:

WeatherData[{45, -90}, "WindSpeed"]

returns a valid answer, but

WeatherData["KABQ", "Pressure", {2008, 3}]

returns the error "Missing[NotAvailable]". The same holds true for many variations of properties that include some sort of time component.

Has something changed in the last month that prevents us from accessing this weather data, such as "your version has been deprecated", or is there a more logical reason why it worked last month but not this month?

As an aside: I work in IT and support engineers who use Mathematica. I am not personally knowledgeable about the use of this software, but have enough programming skill to understand the code.

POSTED BY: Ryan Dey
5 Replies
Posted 8 years ago

The weather data appears to be back in operation this morning, with our original code once again working properly. The examples cited above all return valid data as well. It looks like Wolfram has restored the third-party API process they are using to collect this data.

Of course, I didn't discover this until I had already worked out the WolframAlpha commands Timothy pointed me to. Our engineer needed just temperature for a one month period, so I used the following command to get the data needed (airport changed to protect the innocent).

WolframAlpha["temperature at KBOS from 9/1/2016 to 10/1/2016", {{"TemperatureChart:WeatherData", 1}, "ComputableData"}]

Thanks for the help, Timothy. I really appreciate you taking the time to assist me. I definitely enjoyed digging into a new programming language as well.

POSTED BY: Ryan Dey
Posted 8 years ago

Excellent information! I've verified I can pull some historical weather data for my local city. I'm waiting to hear back from my engineer as to what data sets and the time range he needs, and I'll see if I can generate the information through a Wolfram Alpha call.

POSTED BY: Ryan Dey
Posted 8 years ago

Thanks for the information, Timothy. I'm glad to at least know it's not an issue with our version or computing environment. I had seen the $Failed result several times as well, but believe it was due to poorly formatted input data (getting dates right, etc).

I look forward to hearing the response from Wolfram. It sounds like it might be a server-side issue with how the data is collected, processed, or served to Mathematica.

POSTED BY: Ryan Dey

Well (deep subject) ... depending on how you view this, it is either a good option to move forward or a rather alarming indication of the fragility of the Wolfram curated data stack (disappointing just to consider the amount of documentation that is obsolete yet part of every installation and online login).

Thank you for contacting Wolfram Technical Support.

I understand the WeatherData failed to get the history data.

This is an issue caused by third-party APIs. At this moment, we cannot guarantee to fix the issue immediately. Instead, a workaround will be using WolframAlpha to get the historical data.

A simple example about getting data from WolframAlpha page can be found at: http://support.wolfram.com/kb/7357

I hope this can help.

I was able to generate a plot from 2007 for a nearby weather station following the suggested example (Replace YOURCITY with your actual city name).

WolframAlpha["YOURCITY weather 2007"]

I then needed to use the option in the WolframAlpha pod to generate code to get computable data (Again see the example cited above for details--the subsequent generated code is below). After that it is just a matter of parsing the data as needed. Hope this helps. It is CASE:3744966 in case anyone else wants to provide related feedback.

{WolframAlpha[
  "YOURCITY weather 2007", {{"WeatherCharts:WeatherData", 1}, 
   "ComputableData"}], 
 WolframAlpha[
  "YOURCITY weather 2007", {{"WeatherCharts:WeatherData", 2}, 
   "ComputableData"}], 
 WolframAlpha[
  "YOURCITY weather 2007", {{"WeatherCharts:WeatherData", 3}, 
   "ComputableData"}], 
 WolframAlpha[
  "YOURCITY weather 2007", {{"WeatherCharts:WeatherData", 4}, 
   "ComputableData"}], 
 WolframAlpha[
  "YOURCITY weather 2007", {{"WeatherCharts:WeatherData", 5}, 
   "ComputableData"}]}
POSTED BY: Timothy Ewing

Same issue using Mathematica 11.0.1 - Most of the examples for WeatherData[...] and the associated "See Also" functions result in either Missing[Not Available] or $Failed.

***Update: From ref/WeatherData -> Details -> Weather station properties: DateRange (start and end dates for available station observation data)

But, WeatherData::notprop: "DateRange" is not a known property for WeatherData. Use WeatherData["Properties"] for a list of properties.

And, WeatherData["Properties"] does not include DateRange, so it seems to indicate that all the curated historical data has been removed from the function?

***Update 2: This featured example does not work: Compare Two Models of Wind Speeds (Reported as a bug, will follow up here after receiving a response)

POSTED BY: Timothy Ewing
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