data_go_kr 0.0.2
data_go_kr: ^0.0.2 copied to clipboard
Unofficial client for Korean public data portal (data.go.kr) open APIs: service key encoding, JSON and XML parsing, typed errors, and paging.
0.0.2 #
- Add
KmaBaseTime.latest, which returns the newestbase_dateandbase_timea KMA service has published. Each service has its own schedule: the village forecast publishes eight times a day ten minutes after each slot, the nowcast every hour at 40 minutes past, and the ultra short forecast every hour at 45 minutes past. Times are computed in Korea Standard Time whatever the device time zone is. - Add
KmaSkyandKmaPrecipitationfor theSKYandPTYcodes, including the codes only the ultra short forecast uses. - Add
kmaCategory, which describes category codes such asTMPandPOPwith their Korean label and unit.
0.0.1 #
- Initial release.
DataGoKrClient.getcalls any data.go.kr open API, percent-encodes the service key, adds paging parameters, and parses both JSON and XML answers.DataGoKrClient.paginatestreams rows across pages, followingtotalCount.DataGoKrResponseexposes rows,totalCount,pageNo,numOfRows, and the service result code.DataGoKrExceptionreportsunauthorized_key,rate_limit,invalid_parameter,unknown_service,service_error,http_error,timeout, andinvalid_response, covering the portal's XML and JSON error envelopes as well as theapi.odcloud.krshape.KmaGridconverts a latitude and longitude to the weather forecast grid cell (nx,ny) that KMA services require, and back to the cell center.