Skip to content

Commit b946a36

Browse files
committed
地图功能初步使用streamlit_folium实现
1 parent 66a2733 commit b946a36

File tree

4 files changed

+67
-35
lines changed

4 files changed

+67
-35
lines changed

log_merge

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
, ('2023-08-29 07:07', 7, '40.13152', '116.31581', '北京昌平区沙河水库南岸', 1)
1010
, ('2023-08-29 07:00', 3, '39.88808', '116.41726', '天坛公园', 1)
1111
, ('2023-08-29 06:00', 1, '40.08035', '116.18233', '三星庄后河', 1)
12-
, ('2023-08-29 06:52', '10', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
12+
, ('2023-08-29 06:52', '10', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区)', 0)
1313
, ('2023-08-29 06:39', '3', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
1414
, ('2023-08-29 05:55', '5', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
1515
],
@@ -31,7 +31,7 @@
3131
, ('2023-08-29 08:00', 1, '39.96833', '116.37080', '北京师范大学', 1)
3232
, ('2023-08-29 07:07', 7, '40.13152', '116.31581', '北京昌平区沙河水库南岸', 1)
3333
, ('2023-08-29 08:38', '0', 39.9636777, 116.3682016, '北京师范大学 (Beijing Normal University)', 0)
34-
, ('2023-08-29 06:52', '15', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
34+
, ('2023-08-29 06:52', '15', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
3535
, ('2023-08-29 06:39', '6', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
3636
, ('2023-08-29 05:55', '8', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
3737
],
@@ -47,7 +47,7 @@
4747
, ('2023-08-29 07:07', 3, '40.13152', '116.31581', '北京昌平区沙河水库南岸', 1)
4848
, ('2023-08-29 06:00', 1, '40.08035', '116.18233', '三星庄后河', 1)
4949
, ('2023-08-29 08:38', '1', 39.9636777, 116.3682016, '北京师范大学 (Beijing Normal University)', 0)
50-
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
50+
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
5151
, ('2023-08-29 06:39', '3', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
5252
, ('2023-08-29 05:55', '4', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
5353
],
@@ -98,7 +98,7 @@
9898
, ('2023-08-29 07:20', 10, '40.13746', '116.30048', '巩华城半岛(北沙河南岸)', 1)
9999
, ('2023-08-29 07:07', 7, '40.13152', '116.31581', '北京昌平区沙河水库南岸', 1)
100100
, ('2023-08-29 07:00', 1, '40.13700', '116.33631', '北京沙河水库', 1)
101-
, ('2023-08-29 06:52', '6', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
101+
, ('2023-08-29 06:52', '6', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
102102
, ('2023-08-29 06:39', '17', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
103103
],
104104
'白腹鹞':
@@ -153,7 +153,7 @@
153153
, ('2023-08-29 07:00', 10, '39.88808', '116.41726', '天坛公园', 1)
154154
, ('2023-08-29 06:00', 1, '40.08035', '116.18233', '三星庄后河', 1)
155155
, ('2023-08-29 08:38', '2', 39.9636777, 116.3682016, '北京师范大学 (Beijing Normal University)', 0)
156-
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
156+
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
157157
, ('2023-08-29 06:39', '16', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
158158
, ('2023-08-29 05:55', '10', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
159159
],
@@ -178,7 +178,7 @@
178178
, ('2023-08-29 07:07', 1, '40.13152', '116.31581', '北京昌平区沙河水库南岸', 1)
179179
, ('2023-08-29 07:00', 1, '40.13700', '116.33631', '北京沙河水库', 1)
180180
, ('2023-08-29 06:00', 1, '40.08035', '116.18233', '三星庄后河', 1)
181-
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
181+
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
182182
],
183183
'普通鸬鹚':
184184
[('2023-08-29 10:00', 1, '40.56338', '117.00051', '密云区不老屯镇学各庄村', 1)
@@ -204,7 +204,7 @@
204204
, ('2023-08-29 07:07', 2, '40.13152', '116.31581', '北京昌平区沙河水库南岸', 1)
205205
, ('2023-08-29 07:00', 5, '39.88808', '116.41726', '天坛公园', 1)
206206
, ('2023-08-29 06:00', 1, '40.08035', '116.18233', '三星庄后河', 1)
207-
, ('2023-08-29 06:52', '6', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
207+
, ('2023-08-29 06:52', '6', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
208208
, ('2023-08-29 06:39', '3', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
209209
, ('2023-08-29 05:55', '6', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
210210
],
@@ -239,7 +239,7 @@
239239
, ('2023-08-29 07:00', 3, '39.88808', '116.41726', '天坛公园', 1)
240240
, ('2023-08-29 06:00', 1, '40.08035', '116.18233', '三星庄后河', 1)
241241
, ('2023-08-29 08:38', '5', 39.9636777, 116.3682016, '北京师范大学 (Beijing Normal University)', 0)
242-
, ('2023-08-29 06:52', '10', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
242+
, ('2023-08-29 06:52', '10', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
243243
, ('2023-08-29 06:39', '7', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
244244
, ('2023-08-29 05:55', '30', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
245245
],
@@ -285,7 +285,7 @@
285285
, ('2023-08-29 07:00', 30, '39.88808', '116.41726', '天坛公园', 1)
286286
, ('2023-08-29 06:00', 1, '40.08035', '116.18233', '三星庄后河', 1)
287287
, ('2023-08-29 08:38', '3', 39.9636777, 116.3682016, '北京师范大学 (Beijing Normal University)', 0)
288-
, ('2023-08-29 06:52', '30', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
288+
, ('2023-08-29 06:52', '30', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
289289
, ('2023-08-29 06:39', '18', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
290290
, ('2023-08-29 05:55', '30', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
291291
],
@@ -295,7 +295,7 @@
295295
, ('2023-08-29 08:00', 1, '40.03490', '116.39863', '奥森北园', 1)
296296
, ('2023-08-29 07:07', 6, '40.13152', '116.31581', '北京昌平区沙河水库南岸', 1)
297297
, ('2023-08-29 06:00', 1, '40.08035', '116.18233', '三星庄后河', 1)
298-
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
298+
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
299299
, ('2023-08-29 06:39', '4', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
300300
],
301301
'绿头鸭':
@@ -326,15 +326,15 @@
326326
'戴胜':
327327
[('2023-08-29 08:00', 2, '40.08224', '116.48129', '北京温榆河公园-东园', 1)
328328
, ('2023-08-29 07:20', 5, '40.13746', '116.30048', '巩华城半岛(北沙河南岸)', 1)
329-
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
329+
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
330330
],
331331
'星头啄木鸟':
332332
[('2023-08-29 08:00', 1, '40.08224', '116.48129', '北京温榆河公园-东园', 1)
333333
, ('2023-08-29 08:00', 6, '39.79734', '116.80400', '通州区西集镇榆林庄村', 1)
334334
, ('2023-08-29 08:00', 1, '40.02881', '116.39158', '奥林匹克森林公园北园', 1)
335335
, ('2023-08-29 08:00', 1, '40.03490', '116.39863', '奥森北园', 1)
336336
, ('2023-08-29 07:07', 3, '40.13152', '116.31581', '北京昌平区沙河水库南岸', 1)
337-
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
337+
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
338338
, ('2023-08-29 06:39', '1', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
339339
],
340340
'大斑啄木鸟':
@@ -357,7 +357,7 @@
357357
[('2023-08-29 08:00', 2, '40.08224', '116.48129', '北京温榆河公园-东园', 1)
358358
, ('2023-08-29 07:20', 10, '40.13746', '116.30048', '巩华城半岛(北沙河南岸)', 1)
359359
, ('2023-08-29 07:07', 6, '40.13152', '116.31581', '北京昌平区沙河水库南岸', 1)
360-
, ('2023-08-29 06:52', '3', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
360+
, ('2023-08-29 06:52', '3', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
361361
, ('2023-08-29 06:39', '5', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
362362
],
363363
'黄腰柳莺':
@@ -370,7 +370,7 @@
370370
, ('2023-08-29 08:00', 1, '40.03490', '116.39863', '奥森北园', 1)
371371
, ('2023-08-29 07:22', 1, '39.98354', '116.43429', '对外经济贸易大学', 1)
372372
, ('2023-08-29 07:00', 10, '39.88808', '116.41726', '天坛公园', 1)
373-
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
373+
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
374374
, ('2023-08-29 06:39', '3', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
375375
, ('2023-08-29 05:55', '3', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
376376
],
@@ -388,7 +388,7 @@
388388
, ('2023-08-29 07:07', 1, '40.13152', '116.31581', '北京昌平区沙河水库南岸', 1)
389389
, ('2023-08-29 07:00', 1, '40.13700', '116.33631', '北京沙河水库', 1)
390390
, ('2023-08-29 06:00', 1, '40.08035', '116.18233', '三星庄后河', 1)
391-
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
391+
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
392392
, ('2023-08-29 05:55', '1', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
393393
],
394394
'灰头绿啄木鸟':
@@ -399,19 +399,19 @@
399399
, ('2023-08-29 07:07', 2, '40.13152', '116.31581', '北京昌平区沙河水库南岸', 1)
400400
, ('2023-08-29 07:00', 1, '40.13700', '116.33631', '北京沙河水库', 1)
401401
, ('2023-08-29 07:00', 1, '39.88808', '116.41726', '天坛公园', 1)
402-
, ('2023-08-29 06:52', '3', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
402+
, ('2023-08-29 06:52', '3', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
403403
, ('2023-08-29 06:39', '2', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
404404
, ('2023-08-29 05:55', '1', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
405405
],
406406
'黑枕黄鹂':
407407
[('2023-08-29 08:00', 1, '39.79734', '116.80400', '通州区西集镇榆林庄村', 1)
408-
, ('2023-08-29 06:52', '6', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
408+
, ('2023-08-29 06:52', '6', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
409409
],
410410
'银喉长尾山雀':
411411
[('2023-08-29 08:00', 8, '39.79734', '116.80400', '通州区西集镇榆林庄村', 1)
412412
, ('2023-08-29 07:07', 4, '40.13152', '116.31581', '北京昌平区沙河水库南岸', 1)
413413
, ('2023-08-29 06:00', 1, '40.08035', '116.18233', '三星庄后河', 1)
414-
, ('2023-08-29 06:52', '5', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
414+
, ('2023-08-29 06:52', '5', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
415415
, ('2023-08-29 06:39', '6', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
416416
],
417417
'乌鹟':
@@ -482,7 +482,7 @@
482482
],
483483
'黑尾蜡嘴雀':
484484
[('2023-08-29 07:22', 1, '39.98354', '116.43429', '对外经济贸易大学', 1)
485-
, ('2023-08-29 06:52', '5', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
485+
, ('2023-08-29 06:52', '5', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
486486
, ('2023-08-29 06:39', '1', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
487487
],
488488
'蚁䴕':
@@ -525,49 +525,49 @@
525525
],
526526
'麻雀(树麻雀)':
527527
[('2023-08-29 08:38', '40', 39.9636777, 116.3682016, '北京师范大学 (Beijing Normal University)', 0)
528-
, ('2023-08-29 06:52', '20', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
528+
, ('2023-08-29 06:52', '20', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
529529
, ('2023-08-29 06:39', '102', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
530530
, ('2023-08-29 05:55', '100', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
531531
, ('2023-08-29 08:38', '40', 39.9636777, 116.3682016, '北京师范大学 (Beijing Normal University)', 0)
532-
, ('2023-08-29 06:52', '20', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
532+
, ('2023-08-29 06:52', '20', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
533533
, ('2023-08-29 06:39', '102', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
534534
, ('2023-08-29 05:55', '100', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
535535
],
536536
'四声杜鹃':
537-
[('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
537+
[('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
538538
, ('2023-08-29 05:55', '2', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
539-
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
539+
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
540540
, ('2023-08-29 05:55', '2', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
541541
], '大嘴乌鸦
542542
/丛林鸦':
543-
[('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
543+
[('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
544544
, ('2023-08-29 05:55', '2', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
545-
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
545+
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
546546
, ('2023-08-29 05:55', '2', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
547547
],
548548
'淡脚柳莺':
549-
[('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
550-
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
549+
[('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
550+
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
551551
],
552552
'灰椋鸟':
553-
[('2023-08-29 06:52', '4', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
553+
[('2023-08-29 06:52', '4', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
554554
, ('2023-08-29 06:39', '16', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
555555
, ('2023-08-29 05:55', '8', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
556-
, ('2023-08-29 06:52', '4', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
556+
, ('2023-08-29 06:52', '4', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
557557
, ('2023-08-29 06:39', '16', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)
558558
, ('2023-08-29 05:55', '8', 40.0800771, 116.38726, '霍营(40.08, 116.387)', 0)
559559
],
560560
'未识别的Motacilla属鹡鸰':
561-
[('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
562-
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
561+
[('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
562+
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
563563
],
564564
'普通朱雀':
565-
[('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
566-
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
565+
[('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
566+
, ('2023-08-29 06:52', '2', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
567567
],
568568
'未识别的Emberiza属鹀':
569-
[('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
570-
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) the pagoda hill(military control zone)', 0)
569+
[('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
570+
, ('2023-08-29 06:52', '1', 39.8603259, 116.1638264, '槐树岭槐园(军事管理区) ', 0)
571571
],
572572
'赤麻鸭':
573573
[('2023-08-29 06:39', '2', 40.1312977, 116.3079643, '沙河水库 (Shahe Reservoir)', 0)

main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
else:
2424
merge[i] += info[i]
2525

26+
f = open('./test.db','w+')
27+
f.write(str(merge))
28+
f.close()
2629
print(merge)
2730

2831
# sp = 'lewduc1'

streamlit_app.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import folium
2+
import streamlit as st
3+
4+
from streamlit_folium import st_folium
5+
6+
m = folium.Map(location=[39.97364, 116.36218], zoom_start=16)
7+
8+
f = open('./test.db','r')
9+
merge = eval(f.read())
10+
f.close()
11+
12+
print('opening database...')
13+
14+
for spp in merge:
15+
for obs in merge[spp]:
16+
print(obs)
17+
comName = spp
18+
obsDt = obs[0]
19+
howManyStr = obs[1]
20+
loc = [obs[2],obs[3]]
21+
locName = obs[4]
22+
folium.Marker(
23+
loc, popup=f"{obsDt}\n{locName}", tooltip=comName
24+
).add_to(m)
25+
26+
# call to render Folium map in Streamlit
27+
# st_data = st_folium(m)
28+
st_data = st_folium(m, width=1200)

test.db

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)