eigan / yr-php-library

Small php library for the norwegian weather service Yr.
18 stars 4 forks source link

How to get month wise air and water temperature. #11

Closed riteshkhatri closed 5 years ago

riteshkhatri commented 6 years ago

Hello, I need to display month wise air and water temperature so how can i get current years monthly air and water temperatures. Like, January : 20(Celsius) Air temperature , 20(Celsius) water temperature February : 20(Celsius) Air temperature , 20(Celsius) water temperature

eigan commented 6 years ago

Hello @riteshkhatri!

Unfortunately we don't support water temperature in this library (open for PR).

Looks like you can get the temperatures in XML format from here: https://om.yr.no/badetemperatur/badetemperatur.xml

riteshkhatri commented 6 years ago

Ohh, but i want this periodically by month like yr.no statistics portion, if you can help,

image_qi

and i want to display it like this

image_eu

eigan commented 6 years ago

I don't think Yr actually provides temperature for that far into the future. I know for sure it doesnt give you previous months though.

riteshkhatri commented 6 years ago

Oh then what to do now i need current year all the months air and water average temperatures. is there any one else can provide? any help will be appreciated. Then how they can get this?in this url link

image_8d

please help. sorry for my bad english and thank you sooo much for quick reply.i am searching for this till two days but no success. :(

eigan commented 6 years ago

Then how they can get this?

Take a look at this api recently released by Meteorologisk institutt. https://frost.met.no/index.html

The Frost API provides free access to MET Norway's archive of historical weather and climate data. These data include quality controlled daily, monthly, and yearly measurements of temperature, precipitation, and wind data

Meteorologisk institutt (MET) provides the data for this library.

Maybe its just for Norway, Iam not sure. You might find other services by using Google: https://www.google.com/search?q=historical+temperature+data+api

riteshkhatri commented 6 years ago

ohkey thank you so much. :)