I'm attempting to get the current conditions from a NWS station using the new api (api.weather.gov). This is the station in question:
https://w1.weather.gov/xml/current_obs/display.php?stid=KMKJHowever when I query the API:
https://api.weather.gov/stations/KMKJ/observations/latestI often only get a partial set of data (partial in that many fields may have a value of
null). Even the temperature may be null from time to time.
I'm trying to figure out how in the world to make use of this. Getting all the observations returns a really large data set. I don't think NWS intends for us to get that big data set and iterate it to find a full set of values we need. The other option is for me to store the data on my end and just update whatever fields I happen to get. Neither of those is a very good option. I really only need latest temperature and wind speed.
Anyone else dealing with this as well?
Probably not very useful, but here is an output with next to no data (pretty much just visibility):
{
"@context": ["https:\/\/raw.githubusercontent.com\/geojson\/geojson-ld\/master\/contexts\/geojson-base.jsonld", {
"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\/stations\/KMKJ\/observations\/2018-11-30T00:15:00+00:00",
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-81.34, 36.9]
},
"properties": {
"@id": "https:\/\/api.weather.gov\/stations\/KMKJ\/observations\/2018-11-30T00:15:00+00:00",
"@type": "wx:ObservationStation",
"elevation": {
"value": 780,
"unitCode": "unit:m"
},
"station": "https:\/\/api.weather.gov\/stations\/KMKJ",
"timestamp": "2018-11-30T00:15:00+00:00",
"rawMessage": "KMKJ 300015Z AUTO 00000KT 10SM OVC021 06\/01 A3005 RMK AO2 T00600005",
"textDescription": "Cloudy",
"icon": "https:\/\/api.weather.gov\/icons\/land\/night\/ovc?size=medium",
"presentWeather": [],
"temperature": {
"value": null,
"unitCode": "unit:degC",
"qualityControl": "qc:Z"
},
"dewpoint": {
"value": null,
"unitCode": "unit:degC",
"qualityControl": "qc:Z"
},
"windDirection": {
"value": null,
"unitCode": "unit:degree_(angle)",
"qualityControl": "qc:Z"
},
"windSpeed": {
"value": null,
"unitCode": "unit:m_s-1",
"qualityControl": "qc:Z"
},
"windGust": {
"value": null,
"unitCode": "unit:m_s-1",
"qualityControl": "qc:Z"
},
"barometricPressure": {
"value": null,
"unitCode": "unit:Pa",
"qualityControl": "qc:Z"
},
"seaLevelPressure": {
"value": null,
"unitCode": "unit:Pa",
"qualityControl": "qc:Z"
},
"visibility": {
"value": 16090,
"unitCode": "unit:m",
"qualityControl": "qc:C"
},
"maxTemperatureLast24Hours": {
"value": null,
"unitCode": "unit:degC",
"qualityControl": null
},
"minTemperatureLast24Hours": {
"value": null,
"unitCode": "unit:degC",
"qualityControl": null
},
"precipitationLastHour": {
"value": null,
"unitCode": "unit:m",
"qualityControl": "qc:Z"
},
"precipitationLast3Hours": {
"value": null,
"unitCode": "unit:m",
"qualityControl": "qc:Z"
},
"precipitationLast6Hours": {
"value": null,
"unitCode": "unit:m",
"qualityControl": "qc:Z"
},
"relativeHumidity": {
"value": null,
"unitCode": "unit:percent",
"qualityControl": "qc:C"
},
"windChill": {
"value": null,
"unitCode": "unit:degC",
"qualityControl": "qc:V"
},
"heatIndex": {
"value": null,
"unitCode": "unit:degC",
"qualityControl": "qc:V"
},
"cloudLayers": [{
"base": {
"value": 640,
"unitCode": "unit:m"
},
"amount": "OVC"
}
]
}
}