Author Topic: Custom Forecast Verbiage?  (Read 747 times)

0 Members and 1 Guest are viewing this topic.

Offline bartbird

  • Member
  • *
  • Posts: 1
    • Best Disc Golf Discs
Custom Forecast Verbiage?
« on: September 11, 2017, 03:57:57 PM »
What would be the best way to set-up a website/page that shows current weather information at the user's location (or a zip they enter) with custom descriptions I choose?

For example, if the forecasted humidity is over XX%, I may want it the say "The humidity will be high today", or if it is below XX% I may want it to say "No humidity concerns today"

Thank you in advance for your help! The members here amaze me with their knowledge!!  =D>

Offline stanleyjenkins

  • Software Developer / Forecaster
  • Member
  • *
  • Posts: 14
  • Software Developer, Forecaster
    • Fantasy Blizzard
Re: Custom Forecast Verbiage?
« Reply #1 on: November 01, 2017, 07:19:51 AM »
This is a little more complex than you might think. First and foremost, you'll need a source to obtain current conditions for a given location. If you're in the US, the NWS has web services you can call to obtain current conditions of a given station; however, knowing which station is closest to the zip they entered is tricky. You'll need to know the latitude and longitude of the station and the zipcode to determine the closest station.

Getting it to display "The humidly will be high today" is the easy part. That's just a simple conditional statement once you have the humidity value.