User data input validation ideas?

My app is the noaa_buoy app. It relies on a little parser api I run on a VPS. The app lets a user type in a buoy_id that they can find from this noaa page : National Data Buoy Center
The only issue is that not every buoy is a “swell” sensing buoy, so if a user picks a buoy that doesn’t have this information, they’ll just get an error. The list of valid buoys is too long to allow for app selection via dropdown. I’m trying to find the best way of helping the user know that the buoy is not compatible. Since I have control of the little api parser I can send back any custom json. Currently if there is an error the app will display “bad station” , “error”. Maybe better wording or some sort of in app warning with extra information in it ?

How about instead of returning “error” or “bad station” you could return “no swell”? Of if you wanted an in app notification, you could send back “no swell sensor”?

I don’t know how errors are presented in Tidbyt apps through the Android or iOS apps, but if that’s a thing that can be displayed, you could have it tell the user something like “The buoy chosen does not have a swell sensor. Please choose another buoy.” Tapping “OK” would send you back to the station ID input area.

No idea if that’s a possibility, but if that’s the only issue that could cause a problem, then letting the user know it’s an issue with the chosen buoy and not the app as a whole is probably the way to go.

Hopefully that made sense!

I really like this one. I too have been having trouble getting this one to work, with a few different buoys across the NOAA’s site. I’m not sure it tells us which buoys have swell data, so for me at least it’s just a guessing game.

In order to tell if there is swell data you need to click on the buoy and see what data is shown. I think I’ll update the app and the api to display whatever data is available and allow the user to specify what type of data is preferred but if that data is not available it will just display what is available. For example if swell data is not available just display the wind data or temperature data.

I’ve also discovered that noaa publishes the data as rss too so eventually I can put the data retrieval code directly in the starlark program and can do away with relying on my external api.

Yeah, it turns out the dozen or so buoys I checked just don’t have swell data. I entered Wiamea Bay and of course it worked, so maybe it’s just not a super common thing outside of surf spots? I know next to nothing about buoy data; truthfully I wanted to use this module as kind of a way to think fondly of places I’ve been that are on the water. Having the module show other data like temp, etc, would be great if you can crack it.