{"id":24019558,"url":"https://github.com/thekartikeyamishra/interactivelocationmapping","last_synced_at":"2026-04-28T16:39:57.414Z","repository":{"id":271405589,"uuid":"913336093","full_name":"thekartikeyamishra/InteractiveLocationMapping","owner":"thekartikeyamishra","description":"The Interactive Location Mapping Tool is a Python-based application that allows users to generate an interactive map for a specified location. Using the folium library for map visualization and geopy for geocoding, the tool fetches the latitude and longitude of a location and displays it on an interactive map.","archived":false,"fork":false,"pushed_at":"2025-01-07T13:47:48.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T14:41:26.686Z","etag":null,"topics":["folium","geopy","googlecolab","ipython","jyputer-notebook","python"],"latest_commit_sha":null,"homepage":"https://youtu.be/WKuUtX7_cSA","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thekartikeyamishra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-07T13:42:36.000Z","updated_at":"2025-01-07T14:20:29.000Z","dependencies_parsed_at":"2025-01-08T21:46:01.329Z","dependency_job_id":null,"html_url":"https://github.com/thekartikeyamishra/InteractiveLocationMapping","commit_stats":null,"previous_names":["thekartikeyamishra/interactivelocationmapping"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekartikeyamishra%2FInteractiveLocationMapping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekartikeyamishra%2FInteractiveLocationMapping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekartikeyamishra%2FInteractiveLocationMapping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekartikeyamishra%2FInteractiveLocationMapping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thekartikeyamishra","download_url":"https://codeload.github.com/thekartikeyamishra/InteractiveLocationMapping/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240757546,"owners_count":19852776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["folium","geopy","googlecolab","ipython","jyputer-notebook","python"],"created_at":"2025-01-08T11:24:22.148Z","updated_at":"2026-04-28T16:39:57.381Z","avatar_url":"https://github.com/thekartikeyamishra.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Interactive Location Mapping Tool**\n\n## **Overview**\n\nThe **Interactive Location Mapping Tool** is a Python-based application that allows users to generate an interactive map for a specified location. Using the **`folium`** library for map visualization and **`geopy`** for geocoding, the tool fetches the latitude and longitude of a location and displays it on an interactive map.\n\nThis tool is particularly useful for:\n- Visualizing specific locations on a map.\n- Geocoding locations to fetch latitude and longitude.\n- Educational purposes for understanding geocoding and map visualizations.\n\n---\n\n## **Features**\n\n1. **Interactive Map**:\n   - Generates a map using the `folium` library centered on the specified location.\n   - Zoom functionality allows you to explore the surrounding area.\n\n2. **Location Geocoding**:\n   - Converts a location name (e.g., city, landmark) into latitude and longitude using `geopy`.\n\n3. **Custom Markers**:\n   - Places a marker on the map to highlight the location.\n\n4. **User-Friendly Input**:\n   - Accepts a location name as input and instantly processes it.\n\n---\n\n\n## **Installation Instructions**\n\n### Step 1: Clone the Repository\nFirst, clone the repository to your local machine:\n```bash\ngit clone https://github.com/thekartikeyamishra/InteractiveLocationMapping.git\ncd InteractiveLocationMapping\n```\n\n### Step 2: Set Up a Virtual Environment (Optional)\nIt’s recommended to create a virtual environment to manage dependencies:\n```bash\npython -m venv .venv\nsource .venv/bin/activate       # On Windows: .venv\\Scripts\\activate\n```\n\n### Step 3: Install Dependencies\nInstall the required Python libraries:\n```bash\npip install -r requirements.txt\n```\n\nThe `requirements.txt` file includes:\n```\nfolium\ngeopy\nIPython\n```\n\n---\n\n## **How to Use**\n\n### Step 1: Run the Script\nExecute the `map_tool.py` script:\n```bash\npython map_tool.py\n```\n\n### Step 2: Enter a Location\n- The program will prompt you to enter a location. For example:\n  ```\n  Enter your location: Eiffel Tower, Paris\n  ```\n\n### Step 3: View the Map\n- If the location is valid, an interactive map will be displayed in your browser.\n- A marker will indicate the exact location.\n\n### Step 4: Handle Errors\n- If the location cannot be found, the program will display an error message:\n  ```\n  Location not found. Try again!!\n  ```\n\n---\n\n## **Code Walkthrough**\n\n### 1. **Geocoding with `geopy`**:\nThe **`Nominatim`** geocoder fetches the latitude and longitude for the entered location:\n```python\ngeolocator = Nominatim(user_agent=\"geoapi\")\nlocation = geolocator.geocode(location_name)\n```\n\n### 2. **Map Visualization with `folium`**:\nThe `folium.Map` object creates an interactive map centered at the fetched coordinates:\n```python\nmap_object = folium.Map(location=[latitude, longitude], zoom_start=12)\n```\n\n### 3. **Adding Markers**:\nA marker is added to highlight the location on the map:\n```python\nmarker = folium.Marker([latitude, longitude], popup=location_name)\nmarker.add_to(map_object)\n```\n\n### 4. **Displaying the Map**:\nThe map is displayed interactively in the Jupyter Notebook or browser:\n```python\ndisplay(HTML(map_object._repr_html_()))\n```\n\n---\n\n## **Example**\n\n### Input:\n```\nEnter your location: Times Square, New York\n```\n\n### Output:\n- A map centered on **Times Square** with a marker indicating its exact location.\n\n---\n\n## **Error Handling**\n\n1. If the location is invalid or not found:\n   ```\n   Location not found. Try again!!\n   ```\n\n2. If the `folium` library or other dependencies are not installed, follow the installation instructions above.\n\n---\n\n## **Potential Enhancements**\n\n1. **Multiple Locations**:\n   - Extend the tool to accept multiple locations and plot them simultaneously.\n\n2. **Save Map as HTML**:\n   - Add functionality to save the generated map as an HTML file for offline use.\n\n3. **Location Search**:\n   - Integrate a search bar for real-time map updates.\n\n4. **Route Mapping**:\n   - Enhance the tool to display routes between two or more locations.\n\n---\n\n## **Use Cases**\n\n1. **Travel Planning**:\n   - Visualize landmarks, cities, or any custom locations for trip planning.\n\n2. **Education**:\n   - Teach concepts of geocoding and interactive maps.\n\n3. **Custom Mapping Applications**:\n   - Build tools to visualize geographical data for various applications.\n\n---\n\n## **Contribute**\n\nContributions are welcome! To contribute:\n1. Fork the repository.\n2. Create a new branch:\n   ```bash\n   git checkout -b feature-name\n   ```\n3. Make changes and commit:\n   ```bash\n   git commit -m \"Add new feature\"\n   ```\n4. Push the branch and open a pull request:\n   ```bash\n   git push origin feature-name\n   ```\n\n---\n\n## **Support**\n\nIf you find this project useful, give it a ⭐ on GitHub: [Interactive Location Mapping Tool](https://github.com/thekartikeyamishra/InteractiveLocationMapping).\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthekartikeyamishra%2Finteractivelocationmapping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthekartikeyamishra%2Finteractivelocationmapping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthekartikeyamishra%2Finteractivelocationmapping/lists"}