![]() |
![]() ![]() |
![]() |
nilovsergey |
![]()
Post
#1
|
Newbie ![]() Group: Members Posts: 11 Joined: 15-July 23 Member No.: 28,988 ![]() |
I need to get precipitation/UV index values from openweathermap api.
I managed to read data from one call 3 (https://openweathermap.org/api/one-call-3#example) Problem is that in resulting data nothing like "precipitation" or "UV index" - but I see them in response description in link above. and I asked at https://openweathermap.org/support-centre : QUOTE Retrieving data with one call 3 I wonder 1) wich level of precipitation is considered as dangerous ? But actually I do not see “precipitation” key in “current” data I retrieve 2) wich level of UV index(I suppose that “uvi” index in “current” data I retrieve) is considered as dangerous ? And the answer of the bot : QUOTE The OpenWeather One Call API 3.0 does not directly specify which level of precipitation is considered dangerous within the documentation provided. Since the "precipitation" key is not explicitly mentioned in the "current" data section of the One Call API 3.0 documentation, it might not be directly available or might be included under different conditions or parameters. For assessing dangerous levels of precipitation, it typically depends on the context, such as the rate of precipitation over time and the specific conditions of an area (e.g., prone to flooding). It's advisable to consult local weather advisories for specific thresholds of dangerous precipitation levels. Regarding the UV index ("uvi" in the "current" data), the UV Index scale recommended by the World Health Organization is as follows: Low: 0 to 2 Moderate: 3 to 5 High: 6 to 7 Very High: 8 to 10 Extreme: 11+ A UV index of 6 or above is generally considered "high" and can be dangerous, especially without proper skin protection. Prolonged exposure during times when the UV index is 6 or higher can increase the risk of skin damage and other harmful effects. It's recommended to take protective measures such as wearing sunscreen, sunglasses, and protective clothing when the UV index reaches high levels. For more information on how to interpret the UV index and take appropriate precautions, it's advisable to refer to health or meteorological organizations' guidelines. For more detailed information and to access the full documentation, please visit: this link With request I got next data : CODE stdClass Object ( [dt] => 1735127066 [sunrise] => 1735113933 [sunset] => 1735142145 [temp] => 282.26 [feels_like] => 280.26 [pressure] => 1033 [humidity] => 92 [dew_point] => 281.03 [uvi] => 0.58 [clouds] => 100 [visibility] => 10000 [wind_speed] => 3.6 [wind_deg] => 250 [weather] => Array ( [0] => stdClass Object ( [id] => 804 [main] => Clouds [description] => overcast clouds [icon] => 04d ) ) ) I have “uvi” key with value and no “precipitation”/“rain” keys. From the bot answer that is not clear in which cases these keys “precipitation”/“rain” are in returned data. I am trying to google “Weather 25 december high precipitation” - trying to find a city with high precipitation - but no success yet. A lot of links to my city : https://prnt.sc/1EdrQmCKHnNV Any hints how to find a city with high precipitation in a world? Then I would use in one call 3 request... |
diana85pope |
![]()
Post
#2
|
Group: Members Posts: 1 Joined: 18-February 25 Member No.: 29,392 ![]() |
You can use these cities in your One Call API 3.0 request to check for precipitation data. Here's an example of how to make the request: curl -X GET "https://api.openweathermap.org/data/3.0/onecall?lat=25.0&lon=91.0&exclude=minutely,hourly,daily,alerts&appid=YOUR_API_KEY"
Replace lat and lon with the coordinates of the city you are interested in, and YOUR_API_KEY with your OpenWeatherMap API key. |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 19th March 2025 - 01:23 AM |