Getting Survey123 to auto-populate fields with weather parameters

760
3
Jump to solution
05-08-2023 08:22 AM
JoseBarrios1
Occasional Contributor III

Hello Community,

I'm working on a survey that requires to collect several weather parameters (Temp, wind speed/direction, cloud cover, rain and tide) and I was wondering if anyone has done anything like that using the NOAA National Weather Service (NWS) API. (api.weather.gov). There is a sample on connect using the openweather api that works great, however the parameters that is pulling are not accurate for the Caribbean. Any help or suggestions will be greatly appreciated!

Thanks,

JB

0 Kudos
1 Solution

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

@JoseBarrios1 I think that your approach to present a list of known stations is great. It will simplify the survey greatly. Since you are working in a well-known area, you may even want to create a polygon layer so you can take the location from the user and get the ID from the polygon layer.

I noticed you wanted tide info but I did not find it myself. I see that you can navigate the NOAA website and find it so I hope you can get it working soon.  There is a lot of info from NOAA. I think people in the Survey123 community will appreciate knowing about the research your are doing. 

View solution in original post

3 Replies
IsmaelChivite
Esri Notable Contributor

Hi @JoseBarrios1 

I tweaked the OpenWeather sample to make it work against the NOAA service. The XLSForm and associated JS file are attached.  I hope this helps you get started. From my initial tests, it does not seem like the NOAA service gives you anything for the Caribbean. It looks as if the service only works for locations within the US.

JoseBarrios1
Occasional Contributor III

Saludos Ismael

Thanks you so much for taking time from your busy schedule to answer my question!. It work great, with the limitation that  the the API attributes does not have the  tide information and it is probably using a regional sensor to provide a local parameter.  I found a NOAA site that provide direct links to their weather stations but I'm not sure how to target those specific areas. Looking at http request, it seems that is using the station ID to pull the local weather parameter. Here the info provided by the closest station to the research area: https://tidesandcurrents.noaa.gov/stationhome.html?id=9759110#obs.  and the link for their web services are: https://tidesandcurrents.noaa.gov/gis-data-portal/ 

and the stations id: https://opendap.co-ops.nos.noaa.gov/stations/index.jsp

There are several stations around the research area (see attached pic) , I was wondering if I should change the workflow to pull a list a known station ID's and then use that ID to pull the weather parameters for that station so I can get accurate local weather parameters. Thanks once again for your providing your expertise and support! I know that many folks are also looking on how to accomplish this and I will share the final form template  in the  Connect community for the benefit of others! Thanks once again for your support! It is amazing what we can do with Survey123, awesome product!

Cheers,

JB

noaa1.png

 noaa2.png

 

0 Kudos
IsmaelChivite
Esri Notable Contributor

@JoseBarrios1 I think that your approach to present a list of known stations is great. It will simplify the survey greatly. Since you are working in a well-known area, you may even want to create a polygon layer so you can take the location from the user and get the ID from the polygon layer.

I noticed you wanted tide info but I did not find it myself. I see that you can navigate the NOAA website and find it so I hope you can get it working soon.  There is a lot of info from NOAA. I think people in the Survey123 community will appreciate knowing about the research your are doing.