Project link =>https://dragon04.streamlit.app/
The Location Prediction App is a web application built with Streamlit and Folium that visualizes geographic coordinates and provides predictive modeling for location-based data. The app allows users to click on a world map to select a location, and then uses a machine learning model to predict and display nearby locations based on the selected coordinates.
- Interactive map rendering using Folium.
- Clickable map to select a location.
- Predictive modeling using LightGBM for latitude and longitude predictions.
- Visualization of model outputs on the map.
To run this project locally, you'll need to set up your environment and install the necessary dependencies. Follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/location-prediction-app.git cd location-prediction-app
-
Set up a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Prepare your data:
Ensure that you have the
new.csv
data file in the same directory as the script. This file should contain latitude and longitude columns along with other features used for prediction.
-
Run the Streamlit app:
streamlit run app.py
-
Access the app:
Open your web browser and navigate to
local host
. -
Interact with the app:
- Click on the map to select a location.
- The app will display the coordinates of the clicked location.
- The model will predict nearby locations and update the map with the predicted points.
app.py
: Main Streamlit application script.new.csv
: Data file used for training the machine learning model.requirements.txt
: List of Python packages required for the project.model_latitude.txt
andmodel_longitude.txt
: Saved LightGBM models for latitude and longitude predictions.
The project requires the following Python packages:
pandas
numpy
math
lightgbm
scikit-learn
streamlit
folium
streamlit_folium
These packages are listed in the requirements.txt
file.
This project is licensed under the MIT License - see the LICENSE file for details.
- Streamlit - For providing a powerful tool to build interactive web applications.
- Folium - For creating interactive maps.
- LightGBM - For the gradient boosting framework used for predictive modeling.
For any questions or issues, please open an issue on this repository or contact me at [[email protected]].