Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d7288b5

Browse files
Merge pull request avinashkranjan#745 from Lakhankumawat/gmplot
🚀Added Gmplot
2 parents ab83470 + 5484ec6 commit d7288b5

File tree

3 files changed

+166
-0
lines changed

3 files changed

+166
-0
lines changed

‎Gmplot-Track the Route/LatLong.csv‎

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
28.6600,77.2300
2+
18.9667,72.8333
3+
22.5411,88.3378
4+
12.9699,77.5980
5+
13.0825,80.2750
6+
17.3667,78.4667
7+
18.5196,73.8553
8+
23.0300,72.5800
9+
21.1700,72.8300
10+
26.8470,80.9470
11+
26.9167,75.8667
12+
26.4725,80.3311
13+
25.1500,82.5800
14+
21.1539,79.0831
15+
28.6667,77.4167
16+
22.7206,75.8472
17+
22.3000,73.2000
18+
17.7333,83.3167
19+
23.2500,77.4167
20+
18.6278,73.8131
21+
25.6100,85.1414
22+
30.9083,75.8486
23+
27.1800,78.0200
24+
19.2502,73.1602
25+
9.9197,78.1194
26+
22.8000,86.1833
27+
20.0000,73.7833
28+
28.4333,77.3167
29+
19.8800,75.3200
30+
22.2969,70.7984
31+
28.9900,77.7000
32+
23.1667,79.9333
33+
19.1800,72.9633
34+
23.7928,86.4350
35+
25.4550,81.8400
36+
25.3189,83.0128
37+
34.0911,74.8061
38+
31.6167,74.8500
39+
27.8800,78.0800
40+
19.3000,73.0667
41+
26.2150,78.1931
42+
21.2167,81.4333
43+
22.5900,88.3100
44+
23.3556,85.3347
45+
16.5167,80.6167
46+
30.7353,76.7911
47+
12.3086,76.6531
48+
21.2379,81.6337
49+
25.1800,75.8300
50+
28.3640,79.4150
51+
26.2918,73.0168
52+
11.0000,76.9667
53+
26.1500,91.7700
54+
26.1667,91.7667
55+
17.6833,75.9167
56+
10.8269,78.6928
57+
15.3600,75.1250
58+
31.3256,75.5792
59+
20.2644,85.8281
60+
19.3000,72.8500
61+
28.8418,78.7568
62+
16.7000,74.2333
63+
8.5000,76.8997
64+
29.9640,77.5460
65+
17.9756,79.6011
66+
11.6500,78.1667
67+
20.5500,74.5500
68+
9.9667,76.2833
69+
26.7611,83.3667
70+
13.9304,75.5600
71+
11.1075,77.3398
72+
16.3000,80.4500
73+
22.2492,84.8828
74+
12.8703,74.8806
75+
19.1500,77.3333
76+
20.4500,85.8667
77+
19.9500,79.3000
78+
30.3180,78.0290
79+
23.5500,87.3200
80+
23.6833,86.9667
81+
21.7650,72.1369
82+
20.9333,77.7500
83+
14.4333,79.9667
84+
26.4680,74.6390
85+
8.7289,77.7081
86+
28.0181,73.3169
87+
23.8333,91.2667
88+
23.1828,75.7772
89+
25.4486,78.5696
90+
19.2167,73.1500
91+
14.4667,75.9167
92+
32.7333,74.8500
93+
15.8667,74.5000
94+
17.3333,76.8333
95+
22.4700,70.0700
96+
20.9000,74.7833
97+
24.7500,85.0167
98+
21.0167,75.5667
99+
15.8222,78.0350
100+
24.5833,73.6833

‎Gmplot-Track the Route/README.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Description
2+
- 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
3+
_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 .
4+
_OR_ Just point the location on the map .
5+
6+
# Details
7+
- API Used [`gmplot`](https://github.com/gmplot/gmplot/wiki)
8+
- Library Used [`csv`](https://docs.python.org/3/library/csv.html)
9+
10+
# What to do
11+
1. Take CSV file input **or** any latitudes or longitudes
12+
2. plot the map
13+
3. give output in html file format
14+
15+
# Commands to use
16+
17+
| Command | README |
18+
| ------ | ------ |
19+
| `pip install gmplot` | [Gmplot/PyPI](https://pypi.org/project/gmplot/) |
20+
21+
22+
# Outcome
23+
![Screenshot (41)](https://user-images.githubusercontent.com/55774240/113260040-6dadab00-92eb-11eb-97ef-ee2772e22a3f.png)
24+
25+
26+
## Author : [Lakhan Kumawat](https://github.com/Lakhankumawat)
27+
28+

‎Gmplot-Track the Route/main.py‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import csv
2+
from gmplot import gmplot #importing
3+
4+
Path=input("Enter the path of your csv file , with filename and extension : ")
5+
Zoom=int(input("Enter your zoom level (less value zoom out , large value zoom in ) : "))
6+
7+
x=0 #for central coordinates x and y
8+
y=0
9+
10+
with open(Path,'r') as f:
11+
reader=csv.reader(f)
12+
k=0
13+
for row in reader:
14+
lat=float(row[0])
15+
long=float(row[1])
16+
x+=lat
17+
y+=long
18+
19+
gmap = gmplot.GoogleMapPlotter(x/(100), y/(100),Zoom) #Zoom level and here total number of coordinates we're taking average
20+
21+
22+
with open(Path,'r') as f:
23+
reader=csv.reader(f)
24+
k=0
25+
for row in reader:
26+
lat=float(row[0])
27+
long=float(row[1])
28+
29+
if k==0:
30+
gmap.marker(lat, long, 'green')
31+
k=1
32+
else:
33+
gmap.marker(lat,long,'blue')
34+
k=0
35+
36+
gmap.marker(lat,long,'red')
37+
print("Done! Check file Output.html")
38+
gmap.draw("Output.html")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /