Group Abstract Group Abstract

Message Boards Message Boards

1
|
8.1K Views
|
4 Replies
|
7 Total Likes
View groups...
Share
Share this post:

The nearest weather stations to the Equator?

Posted 5 years ago
POSTED BY: Alex Teymouri
4 Replies
Posted 5 years ago

Hi Alex,

Equator and Arctic are not locations. If you intend to use WeatherData then what matters is the closest station that WeatherData has data for.

stations = WeatherData[];
positions = EntityValue[stations, "Position"];
stationPositions = AssociationThread[stations -> positions] // DeleteMissing;

minLatitude = MinimalBy[stationPositions, Abs@#["Latitude"] &, 2]
(* <|Entity["WeatherStation", "FCOM"] -> GeoPosition[{-0.017, 15.65}], 
     Entity["WeatherStation", "SBMQ"] -> GeoPosition[{0.033, -51.05}]|> *)

(* Closest to the north pole *)
maxLatitude = MaximalBy[stationPositions, #["Latitude"] &, 2]
(* <|Entity["WeatherStation", "CYLT"] -> GeoPosition[{82.518, -62.281}], 
     Entity["WeatherStation", "CZLT"] -> GeoPosition[{82.5, -62.333}]|> *)

GeoListPlot[Values@{minLatitude, maxLatitude},
 GeoGridLines -> Automatic]

enter image description here

POSTED BY: Rohit Namjoshi
Posted 5 years ago

Alex,

To get the weather stations closest to the poles the syntax is quite simple. Using {latitude, longitude} specifications for the pole:

North pole

In[1]:= northPoleStations = WeatherData[{{90, 0}, 2}]
Out[1]= {Entity["WeatherStation", "CYLT"], Entity["WeatherStation", "CZLT"]}

In[2]:= #["Coordinates"] & /@ northPoleStations
Out[2]= {{82.518, -62.281}, {82.5, -62.333}}

South pole

In[3]:= southPoleStations = WeatherData[{{-90, 0}, 2}]
Out[3]= {Entity["WeatherStation", "NZSP"], Entity["WeatherStation", "WMO89314"]}

In[4]:= #["Coordinates"] & /@ southPoleStations
Out[4]= {{-90., 0.}, {-84.599, -115.811}}
POSTED BY: Hans Milton
Posted 5 years ago
POSTED BY: Rohit Namjoshi

Rohit and Hans,

Thank you so much for the excellent solutions.

I tried to find air temperature data for the hottest and coldest place in the world based on Wikipedia. enter image description here

(*World Highest Temperature*)

In[50]:= GeoPosition["36d 27m N, 116\[Degree] 51'W"] // N

Out[50]= GeoPosition[{36.45, -116.85}]

In[51]:= WeatherData[{36.45`, -116.85`}]

In[52]:= GeoListPlot[WeatherData[{36.45`, -116.85`}], 
 GeoBackground -> GeoStyling["Satellite"]]

data = WeatherData["KDRA", 
  "Temperature", {{1911, 1, 1}, {2020, 12, 25}, "Day"}]
ListLinePlot[data["Values"]] 

(*World Lowest Temperature*)

In[57]:= GeoPosition["77d 32m S, 106\[Degree] 40'E"] // N

Out[57]= GeoPosition[{-77.5333, 106.667}]

WeatherData[{-77.53, 106.66}]

In[61]:= GeoListPlot[WeatherData[{-77.53, 106.66}], 
 GeoBackground -> Automatic]

In[64]:= data = 
 WeatherData["WMO89606", 
  "Temperature", {{1911, 1, 1}, {2020, 12, 25}, "Day"}]
ListLinePlot[data["Values"]] 

I couldn't get data from 1911 ?! Also, How do I find out if this data has missing data or not?

POSTED BY: M.A. Ghorbani
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard