How to download historical weather data for a long period of time

  • 1
  • Question
  • Updated 6 years ago
I need to download daily historical weather data for over 50 weather stations over a period of 20 years. I am therefore looking for an efficient way of doing this, because as I'm sure you can imagine downloading the data day by day would be extremely time consuming. I only need daily not hourly data. Is there an easier way of doing this?
Photo of hannahmdrew

hannahmdrew

  • 1 Post
  • 0 Reply Likes

Posted 6 years ago

  • 1
Photo of En0c

En0c

  • 6 Posts
  • 0 Reply Likes
I am not an admin, just a programmer

Assuming that you have a plan and an API key to make thousands of calls:

Write a simple for loop and serialization string.

Here's the way that you might do this for a single item (using java)

http://ideone.com/h6XY5

Then once you have the data as object variables just use an executor service to feed in zip codes (or weather stations, whatever) to your object constructor, and write that out to a database or an XML file for each, with each day being a value in the XML sheet.