A KDL-driven weather data scraper.
- An InfluxDB instance
- Clone repo
- Write configuration
- Run
npm start
weather-mon uses KDL for its instructions, broken out into the following groups:
Refer to the example config for the expected structure, and kdl.dev for syntax.
The scraper expects a KDL document named config.kdl
in the project root. If you want to load a different KDL document, you can pass in a custom path via the CONFIG_PATH
variable at runtime.
setting | description | required | default |
---|---|---|---|
environment |
not used anymore. this was for the (removed) logger. | ||
name |
this is used to identify the scraper with the NWS API | yes | 'weather-mon' |
setting | description | required | default |
---|---|---|---|
token |
The API token for the scraper. Needs to have write access for the bucket . |
yes | |
endpoint |
The URL for the InfluxDB instance. It can include a port. | yes | |
org |
The name of the InfluxDB organization | yes | |
bucket |
The name of the InfluxDB bucket where your data is going to land | yes |
setting | description | required | default |
---|---|---|---|
ua_email |
The user-agent email required by the NWS API. | yes | |
gauges |
A list of NOAA river gauge IDs. | ||
stations |
A list of NWS weather stations. |
setting | description | required | default |
---|---|---|---|
apikey |
The auth token for the Airnow AQI API | yes |
This is a list of postal codes with the following properties:
setting | description | required | default |
---|---|---|---|
offset |
The timezone offset for the postal code. Needed to record the date correctly. | yes |
setting | description | required | default |
---|---|---|---|
token |
The PAT for the Tempest Weather API. | yes | |
stations |
A list of station IDs to scrape. |
Weather data: https://www.weather.gov/documentation/services-web-api
River data: https://water.weather.gov/ahps/
AQI data: https://docs.airnowapi.org/
UVI data: https://www.epa.gov/enviro/web-services
Tempest: https://apidocs.tempestwx.com/reference/quick-start