Online:
Visits:
Stories:
Profile image
Story Views

Now:
Last Hour:
Last 24 Hours:
Total:

Fun with MetOffice API’s

Wednesday, November 18, 2015 8:50
% of readers think this story is Fact. Add your two cents.

(Before It's News)

As a data scientist I often have to extract data from RESTful API’s this was something I’m admittedly not very good at.

So I decided to look at the MetOffice Datapoint API  which provides weather information in the United Kingdom. You can visit that website to get your own API key if you wish.

Being from near Newry in Northern Ireland I decided to write a simple API call to extract data from that API.

The aim of this short gist is just to illustrate how you’d write a short OOP friendly snippet in Python.

In the future, I’ll write up something on how to mock out this API since that’s a big interest for me. Pytest looks like one of the best ways to do that.

These kinds of API’s are of interest if your model depends on weather information – which a lot of models do.

Thanks to Maciej Kula for providing some much needed code review.



Source: https://peadarcoyle.wordpress.com/2015/11/18/fun-with-metoffice-apis/

Report abuse

Comments

Your Comments
Question   Razz  Sad   Evil  Exclaim  Smile  Redface  Biggrin  Surprised  Eek   Confused   Cool  LOL   Mad   Twisted  Rolleyes   Wink  Idea  Arrow  Neutral  Cry   Mr. Green

Top Stories
Recent Stories

Register

Newsletter

Email this story
Email this story

If you really want to ban this commenter, please write down the reason:

If you really want to disable all recommended stories, click on OK button. After that, you will be redirect to your options page.