-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b782ce7
Showing
8 changed files
with
479 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"deno.enable": true, | ||
"deno.unstable": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
export interface NOAACordinate { | ||
id: string; | ||
type: string; | ||
geometry: Geometry; | ||
properties: NOAACordinateProperties; | ||
} | ||
|
||
export interface Geometry { | ||
type: string; | ||
coordinates: number[]; | ||
} | ||
|
||
export interface NOAACordinateProperties { | ||
"@id": string; | ||
"@type": string; | ||
cwa: string; | ||
forecastOffice: string; | ||
gridId: string; | ||
gridX: number; | ||
gridY: number; | ||
forecast: string; | ||
forecastHourly: string; | ||
forecastGridData: string; | ||
observationStations: string; | ||
relativeLocation: RelativeLocation; | ||
forecastZone: string; | ||
county: string; | ||
fireWeatherZone: string; | ||
timeZone: string; | ||
radarStation: string; | ||
} | ||
|
||
export interface RelativeLocation { | ||
type: string; | ||
geometry: Geometry; | ||
properties: RelativeLocationProperties; | ||
} | ||
|
||
export interface RelativeLocationProperties { | ||
city: string; | ||
state: string; | ||
distance: DistanceClass; | ||
bearing: DistanceClass; | ||
} | ||
|
||
export interface DistanceClass { | ||
unitCode: string; | ||
value: number; | ||
} | ||
|
||
export interface NOAAForecast { | ||
type: string; | ||
geometry: ForecastGeometry; | ||
properties: Properties; | ||
} | ||
|
||
export interface ForecastGeometry { | ||
type: string; | ||
coordinates: Array<Array<number[]>>; | ||
} | ||
|
||
export interface Properties { | ||
updated: string; | ||
units: string; | ||
forecastGenerator: string; | ||
generatedAt: string; | ||
updateTime: string; | ||
validTimes: string; | ||
elevation: Elevation; | ||
periods: Period[]; | ||
} | ||
|
||
export interface Elevation { | ||
unitCode: string; | ||
value: number; | ||
} | ||
|
||
export interface Period { | ||
number: number; | ||
name: string; | ||
startTime: string; | ||
endTime: string; | ||
isDaytime: boolean; | ||
temperature: number; | ||
temperatureUnit: TemperatureUnit; | ||
temperatureTrend: null | string; | ||
windSpeed: string; | ||
windDirection: string; | ||
icon: string; | ||
shortForecast: string; | ||
detailedForecast: string; | ||
} | ||
|
||
export enum TemperatureUnit { | ||
F = "F", | ||
C = "C", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/tlaceby/weather | ||
|
||
go 1.19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"@context": [ | ||
"https://geojson.org/geojson-ld/geojson-context.jsonld", | ||
{ | ||
"@version": "1.1", | ||
"wx": "https://api.weather.gov/ontology#", | ||
"s": "https://schema.org/", | ||
"geo": "http://www.opengis.net/ont/geosparql#", | ||
"unit": "http://codes.wmo.int/common/unit/", | ||
"@vocab": "https://api.weather.gov/ontology#", | ||
"geometry": { "@id": "s:GeoCoordinates", "@type": "geo:wktLiteral" }, | ||
"city": "s:addressLocality", | ||
"state": "s:addressRegion", | ||
"distance": { "@id": "s:Distance", "@type": "s:QuantitativeValue" }, | ||
"bearing": { "@type": "s:QuantitativeValue" }, | ||
"value": { "@id": "s:value" }, | ||
"unitCode": { "@id": "s:unitCode", "@type": "@id" }, | ||
"forecastOffice": { "@type": "@id" }, | ||
"forecastGridData": { "@type": "@id" }, | ||
"publicZone": { "@type": "@id" }, | ||
"county": { "@type": "@id" } | ||
} | ||
], | ||
"id": "https://api.weather.gov/points/42.8,-106.298", | ||
"type": "Feature", | ||
"geometry": { "type": "Point", "coordinates": [-106.298, 42.8] }, | ||
"properties": { | ||
"@id": "https://api.weather.gov/points/42.8,-106.298", | ||
"@type": "wx:Point", | ||
"cwa": "RIW", | ||
"forecastOffice": "https://api.weather.gov/offices/RIW", | ||
"gridId": "RIW", | ||
"gridX": 187, | ||
"gridY": 92, | ||
"forecast": "https://api.weather.gov/gridpoints/RIW/187,92/forecast", | ||
"forecastHourly": "https://api.weather.gov/gridpoints/RIW/187,92/forecast/hourly", | ||
"forecastGridData": "https://api.weather.gov/gridpoints/RIW/187,92", | ||
"observationStations": "https://api.weather.gov/gridpoints/RIW/187,92/stations", | ||
"relativeLocation": { | ||
"type": "Feature", | ||
"geometry": { "type": "Point", "coordinates": [-106.32058, 42.8436499] }, | ||
"properties": { | ||
"city": "Casper", | ||
"state": "WY", | ||
"distance": { "unitCode": "wmoUnit:m", "value": 5191.2816909879 }, | ||
"bearing": { "unitCode": "wmoUnit:degree_(angle)", "value": 159 } | ||
} | ||
}, | ||
"forecastZone": "https://api.weather.gov/zones/forecast/WYZ020", | ||
"county": "https://api.weather.gov/zones/county/WYC025", | ||
"fireWeatherZone": "https://api.weather.gov/zones/fire/WYZ280", | ||
"timeZone": "America/Denver", | ||
"radarStation": "KRIW" | ||
} | ||
} |
Oops, something went wrong.