-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
🚀Added Gmplot #745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
🚀Added Gmplot #745
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8563924
Added Gmplot
Lakhankumawat f6cfbff
Update README
Lakhankumawat bab120c
Update main.py
Lakhankumawat 466b983
Update main.py
Lakhankumawat 7389587
Update README.md
Lakhankumawat 6c9c50b
Add CSV file
Lakhankumawat 1dcce19
Update main.py
Lakhankumawat 12a545c
Update LatLong.csv
Lakhankumawat 640be4c
Update README.md
Lakhankumawat 5484ec6
Changes made
Lakhankumawat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
28.6600,77.2300 | ||
18.9667,72.8333 | ||
22.5411,88.3378 | ||
12.9699,77.5980 | ||
13.0825,80.2750 | ||
17.3667,78.4667 | ||
18.5196,73.8553 | ||
23.0300,72.5800 | ||
21.1700,72.8300 | ||
26.8470,80.9470 | ||
26.9167,75.8667 | ||
26.4725,80.3311 | ||
25.1500,82.5800 | ||
21.1539,79.0831 | ||
28.6667,77.4167 | ||
22.7206,75.8472 | ||
22.3000,73.2000 | ||
17.7333,83.3167 | ||
23.2500,77.4167 | ||
18.6278,73.8131 | ||
25.6100,85.1414 | ||
30.9083,75.8486 | ||
27.1800,78.0200 | ||
19.2502,73.1602 | ||
9.9197,78.1194 | ||
22.8000,86.1833 | ||
20.0000,73.7833 | ||
28.4333,77.3167 | ||
19.8800,75.3200 | ||
22.2969,70.7984 | ||
28.9900,77.7000 | ||
23.1667,79.9333 | ||
19.1800,72.9633 | ||
23.7928,86.4350 | ||
25.4550,81.8400 | ||
25.3189,83.0128 | ||
34.0911,74.8061 | ||
31.6167,74.8500 | ||
27.8800,78.0800 | ||
19.3000,73.0667 | ||
26.2150,78.1931 | ||
21.2167,81.4333 | ||
22.5900,88.3100 | ||
23.3556,85.3347 | ||
16.5167,80.6167 | ||
30.7353,76.7911 | ||
12.3086,76.6531 | ||
21.2379,81.6337 | ||
25.1800,75.8300 | ||
28.3640,79.4150 | ||
26.2918,73.0168 | ||
11.0000,76.9667 | ||
26.1500,91.7700 | ||
26.1667,91.7667 | ||
17.6833,75.9167 | ||
10.8269,78.6928 | ||
15.3600,75.1250 | ||
31.3256,75.5792 | ||
20.2644,85.8281 | ||
19.3000,72.8500 | ||
28.8418,78.7568 | ||
16.7000,74.2333 | ||
8.5000,76.8997 | ||
29.9640,77.5460 | ||
17.9756,79.6011 | ||
11.6500,78.1667 | ||
20.5500,74.5500 | ||
9.9667,76.2833 | ||
26.7611,83.3667 | ||
13.9304,75.5600 | ||
11.1075,77.3398 | ||
16.3000,80.4500 | ||
22.2492,84.8828 | ||
12.8703,74.8806 | ||
19.1500,77.3333 | ||
20.4500,85.8667 | ||
19.9500,79.3000 | ||
30.3180,78.0290 | ||
23.5500,87.3200 | ||
23.6833,86.9667 | ||
21.7650,72.1369 | ||
20.9333,77.7500 | ||
14.4333,79.9667 | ||
26.4680,74.6390 | ||
8.7289,77.7081 | ||
28.0181,73.3169 | ||
23.8333,91.2667 | ||
23.1828,75.7772 | ||
25.4486,78.5696 | ||
19.2167,73.1500 | ||
14.4667,75.9167 | ||
32.7333,74.8500 | ||
15.8667,74.5000 | ||
17.3333,76.8333 | ||
22.4700,70.0700 | ||
20.9000,74.7833 | ||
24.7500,85.0167 | ||
21.0167,75.5667 | ||
15.8222,78.0350 | ||
24.5833,73.6833 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Description | ||
- You have been provided with a [`CSV`](https://www.bigcommerce.com/ecommerce-answers/what-csv-file-and-what-does-it-mean-my-ecommerce-business/#:~:text=A%20CSV%20is%20a%20comma,Microsoft%20Excel%20or%20Google%20Spreadsheets.)(comma separated value) file in which the **latitudes** and **longitudes** of a specific area are written | ||
_So_ we can track the whole route of a person by reading values of that file on Google Maps and create an Image containing route or location . | ||
_OR_ Just point the location on the map . | ||
|
||
# Details | ||
- API Used [`gmplot`](https://github.com/gmplot/gmplot/wiki) | ||
- Library Used [`csv`](https://docs.python.org/3/library/csv.html) | ||
|
||
# What to do | ||
1. Take CSV file input **or** any latitudes or longitudes | ||
2. plot the map | ||
3. give output in html file format | ||
|
||
# Commands to use | ||
|
||
| Command | README | | ||
| ------ | ------ | | ||
| `pip install gmplot` | [Gmplot/PyPI](https://pypi.org/project/gmplot/) | | ||
|
||
|
||
# Outcome | ||
 | ||
|
||
|
||
## Author : [Lakhan Kumawat](https://github.com/Lakhankumawat) | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import csv | ||
from gmplot import gmplot #importing | ||
|
||
Path=input("Enter the path of your csv file , with filename and extension : ") | ||
Zoom=int(input("Enter your zoom level (less value zoom out , large value zoom in ) : ")) | ||
|
||
x=0 #for central coordinates x and y | ||
y=0 | ||
|
||
with open(Path,'r') as f: | ||
reader=csv.reader(f) | ||
k=0 | ||
for row in reader: | ||
lat=float(row[0]) | ||
long=float(row[1]) | ||
x+=lat | ||
y+=long | ||
|
||
gmap = gmplot.GoogleMapPlotter(x/(100), y/(100),Zoom) #Zoom level and here total number of coordinates we're taking average | ||
|
||
|
||
with open(Path,'r') as f: | ||
reader=csv.reader(f) | ||
k=0 | ||
for row in reader: | ||
lat=float(row[0]) | ||
long=float(row[1]) | ||
|
||
if k==0: | ||
gmap.marker(lat, long, 'green') | ||
k=1 | ||
else: | ||
gmap.marker(lat,long,'blue') | ||
k=0 | ||
|
||
gmap.marker(lat,long,'red') | ||
print("Done! Check file Output.html") | ||
gmap.draw("Output.html") |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upload the CSV to be used in the script for testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my code has some bugs i will resolve them in a day or two and will notify you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, make sure to update it by tomorrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually i m out of town these days i will be back in 3 days so it would be great sir if you wait , please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh okay, I will put the hold label for now.