-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geocoding location lookup #4
Commits on Aug 1, 2018
-
I've made it so that we can look up locations and fetch the closest station. This adds a dependency of `geopy`. This ignores several edge cases. Namely, it assumes a flat earth with rectangular coordinates corresponding to the latitude and longitude. I am assuming these edge cases will not be noticeable. Expected behavior: ``` user: !noaa tide 8722588 scubot: <a listing for station #8722588> user: !noaa tide 32.8548228,-79.9614
Configuration menu - View commit details
-
Copy full SHA for 1958bd3 - Browse repository at this point
Copy the full SHA 1958bd3View commit details -
I improved the regular expression for matching latitude/longitude coordinate pairs to remove an edge case where they were separated by only a comma and no space. To continue the expected behavior listing on the previous commit: ``` user: !noaa tide 8722588 scubot: <listing for station #8722588> user: !noaa tide "33.6926725,-78.8841985" scubot: <listing for station #8661000, Myrtle Beach, SC> user: !noaa tide "Myrtle Beach, SC" scubot: <listing for station #8661000, Myrtle Beach, SC> ```
Configuration menu - View commit details
-
Copy full SHA for e23bd35 - Browse repository at this point
Copy the full SHA e23bd35View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34a27fc - Browse repository at this point
Copy the full SHA 34a27fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 658b559 - Browse repository at this point
Copy the full SHA 658b559View commit details -
Configuration menu - View commit details
-
Copy full SHA for eba1fe9 - Browse repository at this point
Copy the full SHA eba1fe9View commit details -
Configuration menu - View commit details
-
Copy full SHA for ea6f24f - Browse repository at this point
Copy the full SHA ea6f24fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ab27c4 - Browse repository at this point
Copy the full SHA 2ab27c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e3e738 - Browse repository at this point
Copy the full SHA 2e3e738View commit details -
Remove erroneous
self
referenceStatic methods decorated with `@staticmethod` aren't attached to a class instance and therefore aren't (and indeed can't be) passed a reference to `self`
Configuration menu - View commit details
-
Copy full SHA for ef2457f - Browse repository at this point
Copy the full SHA ef2457fView commit details
Commits on Aug 2, 2018
-
Configuration menu - View commit details
-
Copy full SHA for e2a3df1 - Browse repository at this point
Copy the full SHA e2a3df1View commit details
Commits on Aug 3, 2018
-
Initial fetch from NOAA instead of geocoding API
I've found the NOAA website's listing for the latitude and longitude of their stations. This removes a great deal of strain from the geocoding API, which is good because our initial fetch was extremely taxing on the geocoder. It will still be necessary to merge this branch with the branch that has database caching, as NOAA's response times result in the globe taking several hours to initialize.
Configuration menu - View commit details
-
Copy full SHA for 37306db - Browse repository at this point
Copy the full SHA 37306dbView commit details -
Merge pull request #1 from suclearnub/master
Adding basic station caching
Configuration menu - View commit details
-
Copy full SHA for a77cd8e - Browse repository at this point
Copy the full SHA a77cd8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for fb1b095 - Browse repository at this point
Copy the full SHA fb1b095View commit details -
Merge pull request #2 from hxtk/hxtk-scraped-geocoding
Geocoding from NOAA instead of nominatim
Configuration menu - View commit details
-
Copy full SHA for 0e304d3 - Browse repository at this point
Copy the full SHA 0e304d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba876de - Browse repository at this point
Copy the full SHA ba876deView commit details -
Dependency Injection of database
The object structure prior to this change did not make it easy to isolate the `StationGlobe` class, whether for testing or prefetching the database cache. I have separated it using dependency injection patterns. NOTE: This breaks the initialization on L150. Waiting for @suclearnub to provide more information on the NOAA.module_db object scope to fix that
Configuration menu - View commit details
-
Copy full SHA for 96ac94d - Browse repository at this point
Copy the full SHA 96ac94dView commit details -
Dependency injection initialization
Fix initialization of the updated `StationGlobe` object from the previous commit. Also I've moved the work into a method to eliminate import side effects.
Configuration menu - View commit details
-
Copy full SHA for 401063a - Browse repository at this point
Copy the full SHA 401063aView commit details -
Merge pull request #3 from hxtk/database-dependency-injection
Dependency Injection of database
Configuration menu - View commit details
-
Copy full SHA for a7c57ca - Browse repository at this point
Copy the full SHA a7c57caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 34c4817 - Browse repository at this point
Copy the full SHA 34c4817View commit details -
TinyDB was incompatible with the `Station` object so I created serialization methods to convert between it and a standard Python dictionary.
Configuration menu - View commit details
-
Copy full SHA for e8af027 - Browse repository at this point
Copy the full SHA e8af027View commit details -
Configuration menu - View commit details
-
Copy full SHA for d9c5acb - Browse repository at this point
Copy the full SHA d9c5acbView commit details -
Configuration menu - View commit details
-
Copy full SHA for ff9ed80 - Browse repository at this point
Copy the full SHA ff9ed80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4fcfd06 - Browse repository at this point
Copy the full SHA 4fcfd06View commit details -
Scraper was parsing latitude and longitude incorrectly. Search always returned the last station, regardless of which one was closest. Both of those issues have been resolved in this commit.
Configuration menu - View commit details
-
Copy full SHA for ec9d505 - Browse repository at this point
Copy the full SHA ec9d505View commit details