I need to connect to OpenWeatherMap using their API and the SAS-system. The API can be called using the following adress api.openweathermap.org/data/2.5/weather?q=London,uk&APPID=XXXXXXXXXXXXX
I have ealier connected to another API using:
filename dst url 'http://api.statbank.dk/v1/data/AUS08/CSV?OMR%C3%85DE=*&SAESONFAK=*&Tid=*';
data AUS08_0;
infile dst dlm=';' encoding="ANY";
format område $50. SAESONFAK $50. Tid $50. SAESONFAK $50. indhold $50.;
input Område SAESONFAK tid indhold;
run;
I thus thought I could use a similar code, but without any luck. The output from the API-call is given by:
{"coord":{"lon":-0.13,"lat":51.51},"weather":[{"id":701,"main":"Mist","description":"mist","icon":"50n"}],"base":"stations","main":{"temp":271.31,"pressure":1033,"humidity":64,"temp_min":268.15,"temp_max":274.15},"visibility":10000,"wind":{"speed":1.5,"deg":110},"clouds":{"all":0},"dt":1480447200,"sys":{"type":1,"id":5088,"message":0.0031,"country":"GB","sunrise":1480405363,"sunset":1480434929},"id":2643743,"name":"London","cod":200}
Can anybody help me here?