Git Product home page Git Product logo

yodeck-basic-nws-weather's Introduction

Basic NWS Weather for YoDeck

This shows current conditions and the forecast for three days (including the current day).

Note: This is still very much a work-in-progres.
Use at your own risk.

It is not as customizable as the default YoDeck weather app, but it's MUCH faster to load, and seems to have more-reliable forecasts.

When adding this app, it should be configured to use Chromium to render properly and as a Semi-static app to avoid hitting NWS API limits.

To get local data, the NWS API needs four separate pieces of the information:

  1. The Office ID for your local NWS Office
  2. The grid coordinates within that office's area of responsibility
  3. The Weather Station ID for the nearest weather station
  4. The Radar Station ID for the nearest radar service.

To find this information, start from Google Maps and right-click on your location. This will show you lattitude and longitude coordinates, and if you click them it will copy them to the clipboard. From here, you can visit the following address in a browser:

https://api.weather.gov/points/{lattitude,longitude_from_google}

(Google's coordinates will have a space between Lat and Long that must be removed.)

Do this correctly and you will see a bunch of text in the browser in JSON format which includes values like this:

"gridId": "AAA",
"gridX": 01,
"gridY": 02,

The actual value from gridID is the Office ID needed for the App, and gridX and gridY are the grid coordinates (entered as 01,02).

To find the station, load a similar page at the following address using the data just collected:

https://api.weather.gov/gridpoints/{GID}/{x},{y}/stations

Look for JSON properties with the form "stationIdentifier": "AAAA". The "AAAA" code is the station ID. You should have several of these in the results, but there is also a name property that will help you choose the most appropriate option.

For the Radar Station ID, start at the main NWS web site and search for your location. On the page for your area, there will be a link for your local forcast office. On the page for your local forecast office there will be a Radar link that shows a menu when you hover with the mouse. Click the Local Standard Radar (low bandwidth) option. The page the loads will show the Radar Station ID in the address bar.

This was built to mimic a specific prior layout, but does allow for some customization by exposing a configuration option to provide your own CSS styles. It's also a good idea to use this as just one item at the bottom of a larger layout, to include things like a location label or company logo.

Finally, please note when testing that YoDecks seems to not correctly call init_widge() with the configured items in a basic web preview. You have to actually show this on a real monitor/player to see what it really looks like.

yodeck-basic-nws-weather's People

Contributors

jcoehoorn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.