Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This app reads Alert data from The Weather Company. It uses JSON data from https://api.weather.com/v3/alerts and requires a subscription. It uses data accessed via the Weather Company Max Solution Data Package - Basic.

You can learn about updates to the app in the The Weather Company Alerts Reader Release Notes

Create Your Instance

The first time you launch the reader you will be prompted to create a new instance. You will need to provide a few pieces of information starting with:

Instance Name: this can be anything you want it to be.

Setup

image-20240208-152617.png

Changes made will apply the next time the reader runs. The main piece of setup you need to do is to apply your API key and then select the language. The language option affects the text fields.
The Content Group should be selected so that the alerts are accessible to the correct users.

The option to Request country data when 5 or more states or provinces used is designed as a means to be more efficient with calls to the Alerts API. The app can request data for an individual area, state/province or an entire country in a single request. However if there are many alerts - the results may be paged and the app may have to make multiple requests for the data to receive it all.

Save changes by using the File menu - Save All option

Locations

You add and remove locations to be updated by the reader using the Locations tab.

Adding Locations

To add a new location you can search using:

  • City or town name (Atlanta, GA)

  • Airport Code

    • IATA code (ATL)

    • ICAO code (KATL)

  • Geocode (33.74,-84.39)

image-20240206-155907.png

image-20240206-160756.png
  1. Type the city name, airport code or geocode into the search box

  2. Press the Search button or the Enter key.

  3. The reader will lookup a list of possible matches and display them in the dropdown list below the search box.

  4. Select the appropriate location and click the

    1. Add Location button to retrieve alerts specific to that locations area.

    2. Add Province/State button to retrieve alerts that apply the location’s entire province/state

  5. It will default to putting the alerts into a Alert Group of the same name as the location

    1. You can edit this by simply clicking on the name of the Alert Group in the locations grid and typing in a new name for the Alert Group.

Add a Province or State

You can add an entire province or state instead of only specific locations to retrieve alerts.

  1. Search for any location within the province/state.

  2. Select a valid location from the drop down list

  3. Click the Add Province/State button

image-20240206-160341.png

Editing Alert Groups for Locations

You edit the Alert Group for a locations alerts by

  1. clicking on the name of the Alert Group in the locations grid

  2. typing in a new name for the Alert Group

The next time the app runs it will create the new Alert Group if it doesn’t exist in the Content Group yet and then will put the alerts into the new Alert Group.

Example

If you don’t want Telegraph Creek to have it’s own Alert Group you can change it to put the alerts into a Northern BC content group instead.

image-20240206-160627.pngimage-20240206-160527.png

Save changes by using the File menu - Save All option

Filtering

You can limit which types of alerts are saved by selecting the Severity and Significances that you want.

image-20240206-161111.png

Save changes by using the File menu - Save All option

You selections are applied the next time the app retrieves new data.

Old Alerts

The app will automatically remove any old alerts that are no longer available in the data feed when it runs.

Sample Alert

Dynamic Fields

image-20240208-214443.png

Logs

You can enable Debug logs in the Help - Logs menus to get more information about what API calls are being made and which alerts are being filtered out.

Code Block
2024-02-06	10:50:45	Info: 	TWC Alerts Reader Launched - Version 1.0.4.0
2024-02-06	10:50:45	Info: 	Debug logging is enabled.
2024-02-06	10:50:45	Info: 	Warnings logging is enabled.
2024-02-06	10:50:45	Info: 	Performance logging is disabled.
2024-02-06	11:14:04	Debug: 	Pulling data for Ontario from: https://api.weather.com/v3/alerts/headlines?adminDistrictCode=ON:CA&language=en-CA&format=json&apiKey=apiKey
2024-02-06	11:14:04	Debug: 	Found 4 alerts for Ontario after applying filters.
2024-02-06	11:14:04	Debug: 	Pulling data for Quebec from: https://api.weather.com/v3/alerts/headlines?adminDistrictCode=QC:CA&language=en-CA&format=json&apiKey=apiKey
2024-02-06	11:14:04	Debug: 	Found 0 alerts for Quebec after applying filters.
2024-02-06	11:14:04	Debug: 	Preparing to delete 7 alerts. DELETE FROM `story` WHERE sourceID = 81 AND `ID` IN (4771,4772,4773,4774,4775,4776,4777);
2024-02-06	11:14:04	Info: 	Deleted 7 old alerts.

API URLs Used

Alert Headlines

The alert headlines end point (https://ibm.co/v3WAHa) is currently providing all the data (Summary, Type and dynamic field values) for the alerts with the exception of the long descriptive text (saved as the Text of the alert).

To access the weather alert headlines - the app uses one of the following to get a list of alerts:

Alert Details

The alert details end point (https://ibm.co/v3WADa) is called for each alert to get the long text description.

To access the alert details the app uses:

Locations

To search for locations (https://ibm.co/v3LPaS) the app uses one or more of the following:

API Request Counting

As far as making the best use of your available API limits you should be aware of the following:

  1. The app helps with this by retrieving all the alerts in 1 request instead of multiple requests for:

    • an entire province when there are multiple locations within a province

    • an entire country when there are multiple provinces represented by all the locations

  2.  The efficiency of requesting a larger area is limited by the volume of total alerts available

    • If there are too many alerts to be returned in a single request then the app has to ask for the “next page” of results

      • This limit is based on the size of the response which is 1Mb of data and based on some recent sample results would mean about 500 alerts per “page”

  3. To provide the full length detail in the Alert requires one api call per alert that is saved in the database.

    1. To reduce the number of saved alerts - choose only the specific Severity and Significances you want on the the Filter tab in the app.

image-20240213-182143.pngImage Added