1 year ago
#377535
Iurie Gritco
Get current location and find the nearest station based on CSV with latitude and longitude
We have an university assignment, where we have to make a python script, make a database if needed, to solve a task.
The task itself is that we have a CSV file with different stations with latitute and longtitude, and we need to find the closest one to the user.
We don't need to have a user interface, simple menu in python script will be enough.
I think about to just create python script with simple menu like.
- Get info about the app.
- Find the nearest location.
So, I need to find a way how to get a current user location who is running the script, and based on that provide him with the nearest station, using Haversine Distance Equation. I aslo got inspired by this article. https://medium.com/analytics-vidhya/finding-nearest-pair-of-latitude-and-longitude-match-using-python-ce50d62af546.
Any recommendations how to do that, or how to enhance the idea are more then weolcome! The main point is to get the nearest station based on where you run the script.
I just got information about the problem rigth now, and we did some simple pythons crips, using CSV files in the past.
python
mysql
location
nearest-neighbor
0 Answers
Your Answer