Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zbycz/which-country
Static API for fast country lookup
https://github.com/zbycz/which-country
Last synced: 26 days ago
JSON representation
Static API for fast country lookup
- Host: GitHub
- URL: https://github.com/zbycz/which-country
- Owner: zbycz
- License: mit
- Created: 2023-12-11T19:21:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-12T10:15:43.000Z (7 months ago)
- Last Synced: 2024-05-13T10:30:58.575Z (7 months ago)
- Language: Shell
- Size: 98.8 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# which-country DEPREACTED
Static API for fast country lookupThe downloaded data itself follows the license of OpenStreetMap, which is [ODbL](https://opendatacommons.org/licenses/odbl/1-0/).
**INFO**
More info about algorithms at [`/create` folder](create/). But after all this idea is not ideal, it generates eg 122MB of files which has to be hosted somewhere. It would be better to use utfgrid / codegrid ([lib](https://github.com/hlaw/codegrid-js)), which generates just 1.5MB for whole world, but the generator script is lost and the code is quite old.
Similar projects
----------------- https://country.is/ IP to Country code
- http://api.geonames.org/countryCodeJSON?lat=49.03&lng=10.2&username=demo
- https://maps.googleapis.com/maps/api/geocode/json?latlng=11.2742848,75.8013801&key=YOUR_API_KEY_HEREBETTER:
- https://github.com/hlaw/codegrid-js
- https://github.com/mapbox/utfgrid-spec
- https://openlayers.org/en/latest/examples/utfgrid.html
- fetches 35kb for world, then 100-300kb for tile
- tile storage = 10 MB, zip = 1.5 MB
- npm pkg https://github.com/QuinsZouls/react-codegrid
- approximate tz lookup in 7kB - for inspiration: https://github.com/photostructure/tz-lookup