Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

NOAA Weather API - Climate Normals

javila
7 - Meteor

Hi everyone,

 

Feel like this may be a question relevant to a lot of us. I'm looking to pull annual zip code level data on climate normals from NOAA. However, when I go to access the data it looks like there's nothing there regardless of whether I try and look at yearly, monthly, or daily and the API appears to be working correctly. I tried pulling location categories and data types in addition to the data itself and keep getting the same result. Workflow is below sans my token.

 

alteryx_climate_api_snap.PNG

 

Does anybody have experience doing something along these lines? Am I doing something incorrectly, or if not, does anybody have recommendations on where I can find data like this? I read through a ton of other community posts and can't quite figure it out. 

 

Thanks in advance for the support!!

 

You guys rock,

 

 

Javi

6 REPLIES 6
Inactive User
Not applicable

Your URL is incorrect. Anything following the endpoint is a variable and cannot use a "/". You must use a Question mark, "?". I tried it for https://www.ncdc.noaa.gov/cdo-web/api/v2/locationcategories?NORMAL_MLY and it worked first try.

javila
7 - Meteor

That's odd as in their documentation it seems to explicitly tell you to use a "/" to fetch more information about a location category specific to a dataset like CLIM_REG (see screenshot below). 

 

I really appreciate the input but what I'm trying to do is pull in zip level data from the NORMAL_ANN and NORMAL_MLY datasets. I was thinking something like this URL might work:

https://www.ncdc.noaa.gov/cdo-web/api/v2/data?datasetid=NORMAL_ANN&locationcategories=ZIP

 

But no luck. It's my first time using this api so if its something simple please bear with me. 

 

Or if that's not possible to pull that for all zips at once, I guess I'll have to create a macro to go through and pull that data for each zip then aggregate it. Just trying to find the simplest solution. 

alteryx_climate_api_snap2.PNG

 

 

Nate1
8 - Asteroid

Hi @javila,

 

If you open the data tab on the documentation, locationcategories isn't a valid additional parameter. You can string together multiple zips in one call. Depending on how much data you are pulling back your idea for a macro might still be a better idea.

 

Good Luck!

javila
7 - Meteor

Thanks guys! Should have probably spent more time in the documentation. But I got it sorted out and created a batch macro (attached). Still needs a little ironing out but works for the most part. 

 

Image result for if it works 50% of the time it works every time meme

SGriggs
7 - Meteor

Hi Javila,

 

Where do you put your token ID within the macro? When I run it I get a message that says "token parameter is required'

SGriggs
7 - Meteor

Nevermind.... its in the web connector ... duh

Labels