Notice
Recent Posts
Recent Comments
Link
«   2025/06   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Archives
Today
Total
관리 메뉴

따릉이

[날씨 API] 기온, 풍속, 강수량, 습도, 미세먼지, 초미세먼지, 오존 본문

파이썬

[날씨 API] 기온, 풍속, 강수량, 습도, 미세먼지, 초미세먼지, 오존

ObserverPoa 2021. 7. 6. 10:59

1. 기온, 풍속, 강수량, 습도 (최대 15일 예보, 1시간 단위)

https://www.visualcrossing.com/resources/documentation/weather-api/timeline-weather-api/

 

Timeline Weather API – Visual Crossing Weather

The Timeline Weather API is the simplest and most powerful way to retrieve weather data. You can request data over any time window including windows that span the past, present, and future. The API will take care of the combining historical observations, c

www.visualcrossing.com

[응답에서 사용할 데이터]

days[i].datetime : 예보 날짜 (해당 위치의 timezone)

days[i].hours[j].datetime: 예보 시간 (해당 위치의 timezone)

days[i].hours[j].temp: 온도

days[i].hours[j].windspeed: 풍속

days[i].hours[j].precip: 강수량

days[i].hours[j].precipprob: 강수확률

days[i].hours[j].humidity: 습도 (%)

 

예시 https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/37.61950861037027%2C127.05806240064898?unitGroup=metric&key=34G7QLYW3LZ22PMRTCNPC9QJ9&include=fcst%2Chours 

 

 

2. 미세먼지, 초미세먼지, 오존 (최대 5일 예보, 1시간 단위)

https://openweathermap.org/api/air-pollution

 

Air Pollution - OpenWeatherMap

Air Pollution API Home API Air Pollution API

openweathermap.org

[응답에서 사용할 데이터]

list[i].dt: 예보 날짜와 시간 (Unix, UTC) => 변환 필요

list[i].components.pm10: 미세먼지

list[i].components.pm2_5: 초미세먼지

list[i].components.o3: 오존

 

예시

https://api.openweathermap.org/data/2.5/air_pollution/forecast?lat=37.61950861037027&lon=127.05806240064898&appid=30f7c1dfa1ab45fb3b7653f7f557a378 

 

Comments