thomp / noaa Goto Github PK
View Code? Open in Web Editor NEWView an NOAA weather forecast for a specific geographic location.
License: GNU General Public License v3.0
View an NOAA weather forecast for a specific geographic location.
License: GNU General Public License v3.0
The truncated form of "This Afternoon", "Th", is potentially confusing, as it suggests Thursday. Develop an approach which addresses the larger issue this represents (e.g., "Thanksgiving" also is an issue). One approach would be to rely on the start-time value (e.g., "2018-11-25T18:00:00-08:00") to identify "today". Another approach would be to check the NAME value against the set of days of the week -- if not a member of the set, then look to plan B.
Desirable to be able to easily transition between different views of the forecast. For starters, implement a toggle between a short/concise view and a long/descriptive view.
As the subject indicates...
I can confirm that if I visit the URI below in a browser, it shows JSON data, but noaa
fails with this error:
[error] request--callback: peculiar error
data: "(:num-redirects 0 :url-effective \"https://nominatim.openstreetmap.org/search?q=New York City&limit=1&format=json\")"
symbol-status: error
E Error response: (error . "exited abnormally with code 3
")
response: #s(request-response nil nil "(:num-redirects 0 :url-effective \"https://nominatim.openstreetmap.org/search?q=New York City&limit=1&format=json\")" (error . "exited abnormally with code 3
") error "https://nominatim.openstreetmap.org/search?q=New York City&limit=1&format=json" nil (:parser buffer-string :error #[128 "\300�\301\"A@\300�\302\"A@\300�\303\"A@\300�\304\"A@\305\306�\"\210\305\307�\"\210\305\310�\"\210\305\311�\"\207" [plist-member :data :error-thrown :response :symbol-status message "data: %S " "symbol-status: %S " "E Error response: %S " "response: %S "] 8 "
(fn &key DATA ERROR-THROWN RESPONSE SYMBOL-STATUS &allow-other-keys)"] :status-code ((500 lambda (&rest _) (message "500: from openstreetmap"))) :success noaa--osm-callback :url "https://nominatim.openstreetmap.org/search?q=New York City&limit=1&format=json" :response #0 :encoding utf-8) #<killed buffer> "" nil curl)
This line seems to reference an old forecast endpoint which would operate on lat/long. It now seems to require resolution from lat/long to a grid:
Here's the code line in question: https://github.com/thomp/noaa/blob/master/noaa.el#L452
The error returned from NOAA is
'/points/36.7478,-119.771/forecast' is not a valid resource path
More documentation on the NOAA API:
https://www.weather.gov/documentation/services-web-api?prevfmt=application%2Fcap%2Bxml&prevopt=area%3DMN
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.