Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.9K Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Retrieving historic weather data (max temperature)

Posted 2 years ago

Hi;

I am trying to retrieve the historic maximum daily temperature in Egypt (Cario Egypt) on a specific date without any success - see attached notebook.

Since I am new at using the Wolfram Repository, I am sure it is something that I am doing incorrectly.

Thanks,

Mitch Sandlin

Attachments:
POSTED BY: Mitchell Sandlin
4 Replies
Posted 2 years ago

Hi Mitchell

Forecast data is only available for dates in the future (hence forecast).

WeatherForecastData[Entity["City", {"Cairo", "Cairo", "Egypt"}], "MaxTemperature", Tomorrow]

For dates in the past use WeatherData

WeatherData[Entity["City", {"Cairo", "Cairo", "Egypt"}], "MaxTemperature",
  {{2021, 10, 1}, {2021, 10, 20}, "Day"}]
POSTED BY: Rohit Namjoshi

Hi Rohit;

Thank you so much for the information. It was extremely helpful. However, the solution you provided created a couple of small questions, regarding the "Tomorrow" keyword and working with TimeSeries, that I am hoping you can help me with - please see attached notebook.

Thanks again,

Mitch Sandlin

Attachments:
POSTED BY: Mitchell Sandlin
Posted 2 years ago
POSTED BY: Rohit Namjoshi
Posted 2 years ago

I just noticed that the notebook you attached was also trying to convert the TimeSeries to a Dataset. Here is one way to do that

AssociationThread[{"Date", "Temperature"}, #] & // 
  Map[#, ts["DatePath"] ] & // Dataset
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard