검색결과 리스트
openprocessing에 해당되는 글 1건
- 2016.04.14 Openweather API 2
글
스터디/Processing
2016. 4. 14. 22:48
Openweather API
1. openweathermap API에서 현재 날씨 불러오기
도시 이름으로 불러오기
도시 ID로 불러오기
위치값으로 불러오기
http://api.openweathermap.org/data/2.5/weather?lat=36.321388&lon=127.419724
우편주소로 불러오기
http://api.openweathermap.org/data/2.5/weather?zip=305701,kr
디폴트 모드는 javascript를 위한 JSON이므로 주소 뒤에 xml로 불러오는 부분 추가
&mode=xml
화씨를 섭씨로 바꾸는 부분
&units=metric
대전 현재 날씨
+ 160428 추가
APIkey 를 별도로 신청해서 기입해야하는 방식으로 바뀜
http://openweathermap.org/appid#get
가입후 무료 API key 신청 후 할당받은 키를 코드 맨 뒤에 &APPID=12345838 이런 식으로 추가해주면 됨
2. 날씨 예보
오늘 예보 : weather부분을 forecast/daily 로 교체
5일 예보 : weather부분을 forecast 로 교체
3. Parameters:
-
city -
temperature-
temperature.valueTemperature -
temperature.minMinimum temperature at the moment of calculation. This is deviation from 'temp' that is possible for large cities and megalopolises geographically expanded (use these parameter optionally). -
temperature.maxMaximum temperature at the moment of calculation. This is deviation from 'temp' that is possible for large cities and megalopolises geographically expanded (use these parameter optionally). -
temperature.unitUnit of measurements. Possilbe valure is Celsius, Kelvin, Fahrenheit.
-
-
humidity-
humidity.valueHumidity value -
humidity.unit%
-
-
pressure-
pressure.valuePressure value -
pressure.unithPa
-
-
wind-
wind.speed-
wind.speed.valueWind speed, mps -
wind.speed.nameType of the wind
-
-
wind.direction-
wind.direction.valueWind direction, degrees (meteorological) -
wind.direction.codeCode of the wind direction. Possilbe value is WSW, N, S etc. -
wind.direction.nameFull name of the wind direction.
-
-
-
clouds-
clouds.valueCloudiness -
clouds.nameName of the cloudiness
-
-
visibility-
visibility.valueVisibility, meter
-
-
precipitation-
precipitation.valuePrecipitation, mm -
precipitation.modePossible values are 'no", name of weather phenomena as 'rain', 'snow'
-
-
weather-
weather.numberWeather condition id -
weather.valueWeather condition name -
weather.iconWeather icon id
-
-
lastupdate-
lastupdate.valueLast time when data was updated
-
4. 주요 도시
Daegu
1835329
Seoul
1835848
Daejeon
1835235
'스터디 > Processing' 카테고리의 다른 글
| [Processing] openCV를 활용한 트래킹 영역 설정 및 왜곡 보정 (0) | 2016.10.21 |
|---|---|
| [Processing] OpenCV를 활용한 Shape Detection (1) | 2016.10.21 |
| [Processing] Computer vision for processing (Daniel Shiffman) (0) | 2016.10.04 |
RECENT COMMENT