Understanding the Result from openweathermap in Json format

9.6k views Asked by At

I have to get weather forecast for 7 days of a particular location(with postal code 94042). For this I make a HTTP request like this:

http://api.openweathermap.org/data/2.5/forecast/daily?q=94042&mode=json&units=metric&cnt=7

The result of the query is a long string in Json format. I did not post the result as it is messy, you can click the link to view the result:

There are some parts of the result about which I am confused.

  1. What does the dt field in the beginning of every element of the array list signify?

  2. What does the second last field deg of every element in the array list signify?

  3. What does the last field clouds followed by an integer signify? I thought description about clouds was covered in the main field?

1

There are 1 answers

2
jojo On BEST ANSWER

Explanation of the parameters: http://openweathermap.org/weather-data#current

dt: Data receiving time (in unix, UTC format). dt is the time of data receiving in unixtime GMT (greenwich mean time). To convert this value, use a 3rd-party library like momentjs.com or refer to this answer on how to convert it: https://stackoverflow.com/a/847196/3412545

deg: Wind direction (in degrees, meteorological)

clouds: cloudiness also known as cloud cover (in %)