Skip to content

dcluna/flask-whereareyou

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Where Are You?

This is a Flask mini-app to play with geolocation data and to learn more about web dev in Python. All city data comes from GeoNames dump data. To run, type in the app directory:

python app.py
  • Available routes:
    • /cities: Shows all cities loaded from the database.
    • /countries Shows all countries loaded from the database.
    • /nearest.json Shows nearest cities to a latitude/longitude pair, in JSON format.
    • index Shows a map with the nearest cities, given latitude and longitude parameters.
  • Required parameters: latitude, longitude: I hope they’re self-explanatory :)
  • Optional parameters:
    • sort Accepts a value of ‘nearest’ (default) or ‘population’. Sorts the cities by “nearness” or population size.
    • size Size of the bounding box used to search nearest cities.
    • num Maximum number of cities retrieved.

About

Flask mini-app for nearest city search

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published