Reduce size of st.map data points for latitude and longitude

Summary

I am building a real-time dashboard that plot latitude and longitude using st.map(df).

Steps to reproduce

I was following this example here.
Code snippet:

import streamlit as st
import pandas as pd
import numpy as np

data = [[-33.71205471, 29.19017682], [-33.81205471, 29.11017682], [-34.71205471, 29.49017682]]
df = pd.DataFrame(data, columns=['Latitude', 'Longitude'])

st.map(df)

Actual behavior:

The plot works as intended but the data points are too large to distinguish between movements in latititude and longitude. Movements in lat and long have a 7 decimal place granularity (e.g. lat=166.1577634).

Expected behavior:

Here is an example in AWS QuickSight of how the points should look.

Any ideas how to reduce the size of the map circles for each respective data point?

Thanks!

looks like there is no solution here. i guess i will need to abandon streamlit and go back to dash…
too bad.

Hi @Ross_Dickinson and @richcatena, welcome to the community! :wave:

Just chiming in to say that, among other features, the next release or two will introduce a feature that lets you customize the color, marker size, and lat/lon columns in st.map. :smile:

Our commitment to getting this feature released is found on our public roadmap: https://roadmap.streamlit.app/#may-jul-2023

You can also follow the development of this feature via the PR: Add support for latitude, longitude, color, and size args in st.map

In the meantime, I can explain why st.map is currently not flexible and show you how you can work around the limitation until the next Streamlit release:


st.map is a wrapper around st.pydeck_chart to quickly create scatterplot charts on top of a map, with auto-centering and auto-zoom. Being a thin wrapper around st.pydeck_chart, it isn’t designed to be very flexible.

For anything more involved, such as customizing the scatter plot point radius, we recommend using pydeck to create your map and pass the pydeck object to st.pydeck_chart.

Here’s an example of using pydeck and st.pydeck_chart to customize the radius of points:

The solution is to pass a positive value to the get_radius param of pdk.Layer.

sample_gps_data.csv

29,2022:07:21 05:03:46.745(UTC+0),36.4813495,127.2945385,72.817
59,2022:07:21 05:03:47.735(UTC+0),36.4813168,127.2944629,71.763
89,2022:07:21 05:03:48.725(UTC+0),36.481284,127.2943893,70.528
119,2022:07:21 05:03:49.825(UTC+0),36.4812515,127.2943216,68.925
149,2022:07:21 05:03:50.760(UTC+0),36.4812212,127.2942593,67.867
179,2022:07:21 05:03:51.750(UTC+0),36.4811971,127.294207,67.077
209,2022:07:21 05:03:52.740(UTC+0),36.4811754,127.2941616,66.243
239,2022:07:21 05:03:53.730(UTC+0),36.4811562,127.2941236,65.456
269,2022:07:21 05:03:54.775(UTC+0),36.4811402,127.2940937,64.759
299,2022:07:21 05:03:55.765(UTC+0),36.4811283,127.2940725,64.056
329,2022:07:21 05:03:56.755(UTC+0),36.4811197,127.2940629,62.69
359,2022:07:21 05:03:57.745(UTC+0),36.481113,127.2940591,61.639
389,2022:07:21 05:03:58.735(UTC+0),36.4811079,127.2940583,60.493
419,2022:07:21 05:03:59.780(UTC+0),36.4811038,127.2940576,59.573
449,2022:07:21 05:04:00.770(UTC+0),36.4810982,127.2940578,58.528
479,2022:07:21 05:04:01.815(UTC+0),36.4810932,127.2940582,57.633
509,2022:07:21 05:04:02.750(UTC+0),36.4810894,127.2940576,56.628
539,2022:07:21 05:04:03.740(UTC+0),36.4810867,127.2940563,55.724
569,2022:07:21 05:04:04.785(UTC+0),36.4810811,127.2940569,55.045
599,2022:07:21 05:04:05.775(UTC+0),36.4810772,127.2940565,54.25
629,2022:07:21 05:04:06.765(UTC+0),36.4810704,127.2940569,53.174
659,2022:07:21 05:04:07.755(UTC+0),36.4810662,127.2940553,52.031
689,2022:07:21 05:04:08.855(UTC+0),36.481061,127.2940548,51.093
719,2022:07:21 05:04:09.790(UTC+0),36.4810567,127.2940544,50.275
749,2022:07:21 05:04:10.780(UTC+0),36.4810531,127.294054,49.399
779,2022:07:21 05:04:11.770(UTC+0),36.4810476,127.2940509,48.696
809,2022:07:21 05:04:12.760(UTC+0),36.4810403,127.294043,47.996
839,2022:07:21 05:04:13.750(UTC+0),36.4810336,127.2940335,47.29
869,2022:07:21 05:04:14.850(UTC+0),36.4810282,127.2940274,46.581
899,2022:07:21 05:04:15.785(UTC+0),36.4810232,127.2940227,45.885
929,2022:07:21 05:04:16.775(UTC+0),36.4810153,127.2940131,45.292
959,2022:07:21 05:04:17.765(UTC+0),36.4810034,127.2939954,44.929
989,2022:07:21 05:04:18.755(UTC+0),36.4809852,127.293967,44.48
1019,2022:07:21 05:04:19.745(UTC+0),36.4809635,127.2939255,44.119
1049,2022:07:21 05:04:20.845(UTC+0),36.4809388,127.2938716,43.706
1079,2022:07:21 05:04:21.780(UTC+0),36.4809087,127.2938066,43.343
1109,2022:07:21 05:04:22.770(UTC+0),36.4808783,127.2937405,43.08
1139,2022:07:21 05:04:23.760(UTC+0),36.4808453,127.2936735,42.555
1169,2022:07:21 05:04:24.750(UTC+0),36.4808099,127.2936042,41.87
1199,2022:07:21 05:04:25.795(UTC+0),36.480774,127.2935325,41.359
1229,2022:07:21 05:04:26.785(UTC+0),36.4807347,127.2934514,40.812
1259,2022:07:21 05:04:27.775(UTC+0),36.4806972,127.2933711,40.225
1289,2022:07:21 05:04:28.765(UTC+0),36.4806581,127.2932865,39.912
1319,2022:07:21 05:04:29.755(UTC+0),36.4806178,127.2932,39.643
1349,2022:07:21 05:04:30.800(UTC+0),36.4805758,127.2931113,39.265
1379,2022:07:21 05:04:31.790(UTC+0),36.4805341,127.29302,38.994
1409,2022:07:21 05:04:32.780(UTC+0),36.48049,127.292921,38.857
1439,2022:07:21 05:04:33.770(UTC+0),36.4804515,127.2928232,38.93
1469,2022:07:21 05:04:34.760(UTC+0),36.4804101,127.2927248,38.759
1499,2022:07:21 05:04:35.805(UTC+0),36.4803679,127.2926259,38.636
1529,2022:07:21 05:04:36.795(UTC+0),36.4803227,127.2925199,38.574
1559,2022:07:21 05:04:37.785(UTC+0),36.4802797,127.2924193,38.473
1589,2022:07:21 05:04:38.775(UTC+0),36.4802391,127.2923217,38.505
1619,2022:07:21 05:04:39.765(UTC+0),36.4802024,127.2922265,38.727
1649,2022:07:21 05:04:40.810(UTC+0),36.4801659,127.2921341,38.838
1679,2022:07:21 05:04:41.800(UTC+0),36.4801291,127.2920381,39.036
1709,2022:07:21 05:04:42.790(UTC+0),36.4800946,127.2919479,39.145
1739,2022:07:21 05:04:43.780(UTC+0),36.4800581,127.2918535,39.232
1769,2022:07:21 05:04:44.770(UTC+0),36.4800187,127.291755,39.325
1799,2022:07:21 05:04:45.815(UTC+0),36.4799763,127.2916524,39.288
1829,2022:07:21 05:04:46.805(UTC+0),36.4799273,127.2915393,39.137
1859,2022:07:21 05:04:47.850(UTC+0),36.4798811,127.2914253,39.429
1889,2022:07:21 05:04:48.785(UTC+0),36.4798322,127.2913078,39.808
1919,2022:07:21 05:04:49.830(UTC+0),36.4797841,127.2911852,40.096
1949,2022:07:21 05:04:50.820(UTC+0),36.4797317,127.2910601,39.915
1979,2022:07:21 05:04:51.865(UTC+0),36.4796738,127.2909268,39.584
2009,2022:07:21 05:04:52.800(UTC+0),36.4796189,127.2907989,39.34
2039,2022:07:21 05:04:53.790(UTC+0),36.4795632,127.2906724,39.305
2069,2022:07:21 05:04:54.780(UTC+0),36.4795086,127.2905424,39.235
2099,2022:07:21 05:04:55.825(UTC+0),36.47945,127.2904033,39.31
2129,2022:07:21 05:04:56.815(UTC+0),36.479394,127.2902702,39.26
2159,2022:07:21 05:04:57.860(UTC+0),36.4793366,127.2901376,39.224
2189,2022:07:21 05:04:58.795(UTC+0),36.4792795,127.2900044,39.159
2219,2022:07:21 05:04:59.785(UTC+0),36.4792235,127.289871,39.136
2249,2022:07:21 05:05:00.830(UTC+0),36.4791673,127.2897429,39.238
2279,2022:07:21 05:05:01.820(UTC+0),36.4791091,127.2896133,39.269
2309,2022:07:21 05:05:02.810(UTC+0),36.4790587,127.2894882,39.263
2339,2022:07:21 05:05:03.800(UTC+0),36.4790047,127.2893611,39.282
2369,2022:07:21 05:05:04.845(UTC+0),36.478949,127.2892332,39.504
2399,2022:07:21 05:05:05.835(UTC+0),36.478895,127.2891058,39.691
2429,2022:07:21 05:05:06.825(UTC+0),36.4788361,127.2889722,39.777
2459,2022:07:21 05:05:07.815(UTC+0),36.4787809,127.2888432,39.765
2489,2022:07:21 05:05:08.805(UTC+0),36.4787211,127.2887164,40.666
2519,2022:07:21 05:05:09.795(UTC+0),36.4786658,127.2885878,40.818
2549,2022:07:21 05:05:10.840(UTC+0),36.4786104,127.2884575,40.832
2579,2022:07:21 05:05:11.830(UTC+0),36.4785506,127.2883188,41.014
2609,2022:07:21 05:05:12.820(UTC+0),36.4784941,127.2881874,41.126
2639,2022:07:21 05:05:13.810(UTC+0),36.4784382,127.2880556,41.166
2669,2022:07:21 05:05:14.800(UTC+0),36.4783814,127.2879239,41.229
2699,2022:07:21 05:05:15.900(UTC+0),36.4783265,127.28779,41.21
2729,2022:07:21 05:05:16.835(UTC+0),36.4782659,127.2876497,41.579
2759,2022:07:21 05:05:17.825(UTC+0),36.4782092,127.2875153,41.607
2789,2022:07:21 05:05:18.815(UTC+0),36.4781518,127.2873815,41.768
2819,2022:07:21 05:05:19.805(UTC+0),36.4780941,127.2872467,41.664
2849,2022:07:21 05:05:20.850(UTC+0),36.4780378,127.2871122,41.707
2879,2022:07:21 05:05:21.840(UTC+0),36.4779808,127.2869775,41.649
2909,2022:07:21 05:05:22.830(UTC+0),36.4779201,127.2868357,41.504
2939,2022:07:21 05:05:23.820(UTC+0),36.477863,127.2867011,41.321
2969,2022:07:21 05:05:24.810(UTC+0),36.47781,127.2865641,41.208
2999,2022:07:21 05:05:25.855(UTC+0),36.4777577,127.2864266,41.063
3029,2022:07:21 05:05:26.845(UTC+0),36.4777002,127.2862829,40.89
3059,2022:07:21 05:05:27.835(UTC+0),36.4776469,127.2861464,40.73
3089,2022:07:21 05:05:28.825(UTC+0),36.4775926,127.2860096,40.516
3119,2022:07:21 05:05:29.815(UTC+0),36.4775367,127.2858737,40.404
3149,2022:07:21 05:05:30.860(UTC+0),36.4774788,127.2857385,40.21
3179,2022:07:21 05:05:31.850(UTC+0),36.4774168,127.2855958,39.879
3209,2022:07:21 05:05:32.840(UTC+0),36.4773586,127.2854605,39.658
3239,2022:07:21 05:05:33.885(UTC+0),36.4773008,127.2853253,39.553
3269,2022:07:21 05:05:34.820(UTC+0),36.4772464,127.2851893,39.824
3299,2022:07:21 05:05:35.920(UTC+0),36.4771893,127.2850552,39.684
3329,2022:07:21 05:05:36.855(UTC+0),36.4771313,127.2849211,39.687
3359,2022:07:21 05:05:37.900(UTC+0),36.4770716,127.284778,39.597
3389,2022:07:21 05:05:38.835(UTC+0),36.4770149,127.2846429,39.555
3419,2022:07:21 05:05:39.825(UTC+0),36.4769575,127.2845085,39.455
3449,2022:07:21 05:05:40.870(UTC+0),36.4768995,127.2843739,39.297
3479,2022:07:21 05:05:41.860(UTC+0),36.476839,127.2842321,39.193
3509,2022:07:21 05:05:42.850(UTC+0),36.476782,127.284097,39.021
3539,2022:07:21 05:05:43.840(UTC+0),36.4767243,127.2839633,38.96
3569,2022:07:21 05:05:44.830(UTC+0),36.4766683,127.2838308,38.996
3599,2022:07:21 05:05:45.875(UTC+0),36.4766135,127.2837007,38.863
3629,2022:07:21 05:05:46.865(UTC+0),36.4765584,127.2835738,38.9
3659,2022:07:21 05:05:47.910(UTC+0),36.4765021,127.2834373,38.974
3689,2022:07:21 05:05:48.845(UTC+0),36.4764473,127.2833078,38.914
3719,2022:07:21 05:05:49.890(UTC+0),36.4763904,127.283176,38.791
3749,2022:07:21 05:05:50.880(UTC+0),36.4763348,127.2830426,38.705
3779,2022:07:21 05:05:51.870(UTC+0),36.476277,127.2829004,38.793
3809,2022:07:21 05:05:52.860(UTC+0),36.4762212,127.2827649,38.766
3839,2022:07:21 05:05:53.850(UTC+0),36.4761646,127.2826295,38.685
3869,2022:07:21 05:05:54.840(UTC+0),36.4761085,127.2824956,38.75
3899,2022:07:21 05:05:55.830(UTC+0),36.4760533,127.2823644,38.8
3929,2022:07:21 05:05:56.875(UTC+0),36.4759926,127.2822268,38.757
3959,2022:07:21 05:05:57.865(UTC+0),36.4759348,127.282095,38.753
3989,2022:07:21 05:05:58.910(UTC+0),36.4758752,127.2819632,38.84
4019,2022:07:21 05:05:59.845(UTC+0),36.4758134,127.2818325,38.971
4049,2022:07:21 05:06:00.835(UTC+0),36.4757483,127.2817036,38.99
4079,2022:07:21 05:06:01.880(UTC+0),36.4756794,127.2815701,39.078
4109,2022:07:21 05:06:02.870(UTC+0),36.4756139,127.2814468,39.043
4139,2022:07:21 05:06:03.860(UTC+0),36.4755479,127.2813299,39.612
4169,2022:07:21 05:06:04.850(UTC+0),36.4754828,127.2812137,41.094
4199,2022:07:21 05:06:05.895(UTC+0),36.4754115,127.2810968,41.77
4229,2022:07:21 05:06:06.885(UTC+0),36.4753341,127.2809709,42.047
4259,2022:07:21 05:06:07.875(UTC+0),36.4752596,127.2808538,42.545
4289,2022:07:21 05:06:08.865(UTC+0),36.4751844,127.2807379,42.95
4319,2022:07:21 05:06:09.855(UTC+0),36.4751075,127.2806204,43.138
4349,2022:07:21 05:06:10.900(UTC+0),36.47503,127.2805051,43.368
4379,2022:07:21 05:06:11.890(UTC+0),36.4749489,127.280388,44.186
4409,2022:07:21 05:06:12.880(UTC+0),36.4748728,127.2802786,45.749
4439,2022:07:21 05:06:13.870(UTC+0),36.474797,127.2801631,46.573
4469,2022:07:21 05:06:14.860(UTC+0),36.4747196,127.2800454,46.831
4499,2022:07:21 05:06:15.960(UTC+0),36.4746425,127.2799297,47.187
4529,2022:07:21 05:06:16.895(UTC+0),36.4745618,127.2798063,47.574
4559,2022:07:21 05:06:17.940(UTC+0),36.4744861,127.2796899,48.035
4589,2022:07:21 05:06:18.875(UTC+0),36.4744114,127.2795767,49.14
4619,2022:07:21 05:06:19.865(UTC+0),36.4743253,127.27945,46.661
4649,2022:07:21 05:06:20.855(UTC+0),36.4742533,127.2793396,48.261
4679,2022:07:21 05:06:21.955(UTC+0),36.474176,127.2792196,47.983
4709,2022:07:21 05:06:22.890(UTC+0),36.4741085,127.2791131,48.116
4739,2022:07:21 05:06:23.935(UTC+0),36.474043,127.2790129,48.024
4769,2022:07:21 05:06:24.870(UTC+0),36.4739831,127.278921,48.404
4799,2022:07:21 05:06:25.915(UTC+0),36.4739265,127.2788343,48.727
4829,2022:07:21 05:06:26.960(UTC+0),36.4738736,127.2787512,48.815
4859,2022:07:21 05:06:27.895(UTC+0),36.4738206,127.2786688,48.801
4889,2022:07:21 05:06:28.940(UTC+0),36.473779,127.2786108,52.161
4919,2022:07:21 05:06:29.875(UTC+0),36.4737238,127.2785344,49.626
4949,2022:07:21 05:06:30.865(UTC+0),36.4736675,127.2784613,47.896
4979,2022:07:21 05:06:31.910(UTC+0),36.4736196,127.2784028,48.355
5009,2022:07:21 05:06:32.900(UTC+0),36.4735726,127.2783438,49.429
5039,2022:07:21 05:06:33.890(UTC+0),36.4735337,127.2782891,51.373
5069,2022:07:21 05:06:34.935(UTC+0),36.4735034,127.2782477,55.96
5099,2022:07:21 05:06:35.870(UTC+0),36.4734752,127.2782086,59.816
5129,2022:07:21 05:06:36.915(UTC+0),36.4734468,127.2781706,62.888
5159,2022:07:21 05:06:37.905(UTC+0),36.4734163,127.2781281,65.355
5189,2022:07:21 05:06:38.895(UTC+0),36.4733828,127.2780803,66.813
5219,2022:07:21 05:06:39.885(UTC+0),36.4733468,127.2780289,68.783
5249,2022:07:21 05:06:40.985(UTC+0),36.4733055,127.2779697,70.256
5279,2022:07:21 05:06:41.920(UTC+0),36.4732633,127.277904,71.762
5309,2022:07:21 05:06:42.910(UTC+0),36.4732188,127.2778354,74.475
5339,2022:07:21 05:06:43.900(UTC+0),36.473173,127.2777621,75.681
5369,2022:07:21 05:06:44.890(UTC+0),36.4731255,127.2776822,76.289
5399,2022:07:21 05:06:45.880(UTC+0),36.4730757,127.2776017,77.098
5429,2022:07:21 05:06:46.925(UTC+0),36.4730186,127.2775114,76.965
5459,2022:07:21 05:06:47.915(UTC+0),36.4729629,127.2774191,78.21
5489,2022:07:21 05:06:48.905(UTC+0),36.4729056,127.2773271,78.389
5519,2022:07:21 05:06:49.895(UTC+0),36.4728484,127.2772352,78.193
5549,2022:07:21 05:06:51.000(UTC+0),36.4727921,127.2771459,78.095
5579,2022:07:21 05:06:51.985(UTC+0),36.4727338,127.2770518,77.206
5609,2022:07:21 05:06:52.920(UTC+0),36.4726729,127.276959,77.487
5639,2022:07:21 05:06:53.910(UTC+0),36.4726184,127.276872,78.047
5669,2022:07:21 05:06:54.900(UTC+0),36.4725736,127.276786,78.876
5699,2022:07:21 05:06:55.890(UTC+0),36.4725213,127.2766998,78.208
5729,2022:07:21 05:06:56.935(UTC+0),36.4724694,127.2766125,78.962
5759,2022:07:21 05:06:57.925(UTC+0),36.4724168,127.2765265,79.87
5789,2022:07:21 05:06:58.915(UTC+0),36.4723622,127.2764401,81.443
5819,2022:07:21 05:06:59.905(UTC+0),36.4723041,127.2763445,82.183
5849,2022:07:21 05:07:00.895(UTC+0),36.472244,127.2762475,83.036
5879,2022:07:21 05:07:01.940(UTC+0),36.4721825,127.2761492,84.887
5909,2022:07:21 05:07:02.930(UTC+0),36.4721255,127.2760576,86.543
5939,2022:07:21 05:07:03.920(UTC+0),36.4720662,127.2759643,87.243
5969,2022:07:21 05:07:04.910(UTC+0),36.4720092,127.2758726,87.906
5999,2022:07:21 05:07:05.955(UTC+0),36.4719562,127.2757736,88.407
6029,2022:07:21 05:07:06.945(UTC+0),36.471904,127.2756756,89.006
6059,2022:07:21 05:07:07.935(UTC+0),36.4718614,127.2755858,89.985
6089,2022:07:21 05:07:08.925(UTC+0),36.4718277,127.2754997,91.517
6119,2022:07:21 05:07:09.915(UTC+0),36.471796,127.2754133,92.215
6149,2022:07:21 05:07:10.905(UTC+0),36.4717631,127.2753249,91.625
6179,2022:07:21 05:07:11.950(UTC+0),36.4717312,127.2752439,91.306
6209,2022:07:21 05:07:12.940(UTC+0),36.4716992,127.2751622,90.231
6239,2022:07:21 05:07:13.930(UTC+0),36.471671,127.275093,89.882
6269,2022:07:21 05:07:14.920(UTC+0),36.4716469,127.2750303,87.615
6299,2022:07:21 05:07:15.910(UTC+0),36.4716314,127.2749678,84.515
6329,2022:07:21 05:07:16.955(UTC+0),36.4716267,127.27491,82.358
6359,2022:07:21 05:07:17.945(UTC+0),36.4716322,127.274861,81.41
6389,2022:07:21 05:07:18.935(UTC+0),36.4716477,127.2748225,81.329
6419,2022:07:21 05:07:19.925(UTC+0),36.4716735,127.2747906,81.185
6449,2022:07:21 05:07:20.915(UTC+0),36.471703,127.2747681,80.615
6479,2022:07:21 05:07:21.960(UTC+0),36.4717313,127.2747475,78.476
6509,2022:07:21 05:07:22.950(UTC+0),36.4717687,127.2747215,75.101
6539,2022:07:21 05:07:23.940(UTC+0),36.4718148,127.2746956,72.37
6569,2022:07:21 05:07:24.930(UTC+0),36.4718702,127.2746688,70.709
6599,2022:07:21 05:07:25.920(UTC+0),36.4719312,127.2746403,69.421
6629,2022:07:21 05:07:27.020(UTC+0),36.4719985,127.2746069,67.487
6659,2022:07:21 05:07:27.955(UTC+0),36.4720754,127.2745665,65.219
6689,2022:07:21 05:07:28.945(UTC+0),36.4721473,127.2745297,63.373
6719,2022:07:21 05:07:29.935(UTC+0),36.4722164,127.2744959,62.152
6749,2022:07:21 05:07:30.925(UTC+0),36.4722796,127.2744645,60.962
6779,2022:07:21 05:07:31.970(UTC+0),36.4723347,127.274435,59.399
6809,2022:07:21 05:07:32.960(UTC+0),36.4723835,127.2744013,58.519
6839,2022:07:21 05:07:33.950(UTC+0),36.472428,127.2743687,58.24
6869,2022:07:21 05:07:34.940(UTC+0),36.4724768,127.2743299,57.397
6899,2022:07:21 05:07:35.930(UTC+0),36.4725321,127.2742941,56.616
6929,2022:07:21 05:07:36.975(UTC+0),36.4725938,127.274257,56.175
6959,2022:07:21 05:07:38.020(UTC+0),36.472667,127.2742139,55.536
6989,2022:07:21 05:07:38.955(UTC+0),36.4727395,127.2741724,55.222
7019,2022:07:21 05:07:39.945(UTC+0),36.4728293,127.2741212,54.67
7049,2022:07:21 05:07:40.935(UTC+0),36.4729196,127.2740693,54.298
7079,2022:07:21 05:07:41.925(UTC+0),36.4730096,127.2740195,54.361
7109,2022:07:21 05:07:42.970(UTC+0),36.4731093,127.2739656,53.934
7139,2022:07:21 05:07:43.960(UTC+0),36.4732068,127.2739146,53.64
7169,2022:07:21 05:07:44.950(UTC+0),36.473302,127.2738653,53.461
7199,2022:07:21 05:07:45.940(UTC+0),36.4733875,127.27382,52.966
7229,2022:07:21 05:07:46.930(UTC+0),36.4734645,127.2737776,52.375
7259,2022:07:21 05:07:47.975(UTC+0),36.473518,127.2737463,52.009
7289,2022:07:21 05:07:48.965(UTC+0),36.4735701,127.2737156,51.54
7319,2022:07:21 05:07:49.955(UTC+0),36.4736064,127.2736929,51.3
7349,2022:07:21 05:07:50.945(UTC+0),36.4736341,127.273674,50.922
7379,2022:07:21 05:07:52.045(UTC+0),36.4736529,127.2736603,50.666
7409,2022:07:21 05:07:52.980(UTC+0),36.4736647,127.2736515,50.122
7439,2022:07:21 05:07:53.970(UTC+0),36.4736719,127.273645,50.066
7469,2022:07:21 05:07:54.960(UTC+0),36.4736768,127.2736412,49.672
7499,2022:07:21 05:07:55.950(UTC+0),36.473678,127.2736402,48.984
7529,2022:07:21 05:07:57.050(UTC+0),36.4736791,127.273638,48.474
7559,2022:07:21 05:07:57.985(UTC+0),36.4736885,127.2736318,48.121
7589,2022:07:21 05:07:58.975(UTC+0),36.4737049,127.2736204,47.933
7619,2022:07:21 05:07:59.965(UTC+0),36.4737202,127.27361,47.587
7649,2022:07:21 05:08:00.955(UTC+0),36.4737341,127.2736004,47.26
7679,2022:07:21 05:08:02.000(UTC+0),36.4737473,127.2735915,46.991
7709,2022:07:21 05:08:02.990(UTC+0),36.4737607,127.2735823,46.89
7739,2022:07:21 05:08:03.980(UTC+0),36.4737735,127.2735731,46.936
7769,2022:07:21 05:08:04.970(UTC+0),36.4737886,127.2735656,46.918
7799,2022:07:21 05:08:05.960(UTC+0),36.4738076,127.2735597,46.961
7829,2022:07:21 05:08:07.005(UTC+0),36.4738307,127.2735596,46.786
7859,2022:07:21 05:08:08.050(UTC+0),36.4738544,127.2735663,46.364
7889,2022:07:21 05:08:08.985(UTC+0),36.473877,127.2735799,45.556
7919,2022:07:21 05:08:09.975(UTC+0),36.4738972,127.2735995,44.911
7949,2022:07:21 05:08:10.965(UTC+0),36.4739176,127.2736264,44.53
7979,2022:07:21 05:08:11.955(UTC+0),36.4739392,127.2736634,44.198
8009,2022:07:21 05:08:13.000(UTC+0),36.4739649,127.2737156,43.899
8039,2022:07:21 05:08:14.045(UTC+0),36.4739969,127.2737756,43.535
8069,2022:07:21 05:08:14.980(UTC+0),36.4740357,127.2738404,42.985
8099,2022:07:21 05:08:15.970(UTC+0),36.4740756,127.2739107,42.678
8129,2022:07:21 05:08:17.015(UTC+0),36.4741159,127.2739884,42.188
8159,2022:07:21 05:08:18.005(UTC+0),36.4741581,127.2740773,41.59
8189,2022:07:21 05:08:19.000(UTC+0),36.474199,127.2741667,41.161
8219,2022:07:21 05:08:20.040(UTC+0),36.4742416,127.2742586,40.885
8249,2022:07:21 05:08:20.975(UTC+0),36.4742849,127.2743529,40.763
8279,2022:07:21 05:08:21.965(UTC+0),36.4743291,127.2744492,40.595
8309,2022:07:21 05:08:23.010(UTC+0),36.4743764,127.2745519,40.482
8339,2022:07:21 05:08:24.000(UTC+0),36.4744222,127.2746508,40.386
8369,2022:07:21 05:08:24.990(UTC+0),36.4744668,127.2747453,40.831
8399,2022:07:21 05:08:26.035(UTC+0),36.4745117,127.2748417,40.665
8429,2022:07:21 05:08:27.080(UTC+0),36.4745548,127.274931,40.465
8459,2022:07:21 05:08:28.015(UTC+0),36.4745991,127.27502,40.237
8489,2022:07:21 05:08:29.005(UTC+0),36.4746361,127.2750965,39.895
8519,2022:07:21 05:08:30.000(UTC+0),36.4746642,127.2751622,39.31
8549,2022:07:21 05:08:30.985(UTC+0),36.4746892,127.2752197,38.911
8579,2022:07:21 05:08:32.030(UTC+0),36.4747152,127.2752756,38.438
8609,2022:07:21 05:08:33.020(UTC+0),36.4747405,127.2753341,38.04
8639,2022:07:21 05:08:34.065(UTC+0),36.4747629,127.2753876,37.661
8669,2022:07:21 05:08:35.000(UTC+0),36.4747821,127.2754378,37.412
8699,2022:07:21 05:08:35.990(UTC+0),36.474797,127.2754954,36.599
8729,2022:07:21 05:08:37.035(UTC+0),36.4748091,127.2755528,36.285
8759,2022:07:21 05:08:38.025(UTC+0),36.474818,127.2756076,36.51
8789,2022:07:21 05:08:39.015(UTC+0),36.4748164,127.2756669,36.641
8819,2022:07:21 05:08:40.060(UTC+0),36.4748181,127.275723,36.575
8849,2022:07:21 05:08:41.000(UTC+0),36.4748291,127.2757679,36.801
8879,2022:07:21 05:08:42.040(UTC+0),36.4748534,127.2758044,37.189
8909,2022:07:21 05:08:43.030(UTC+0),36.4748875,127.2758347,37.571
8939,2022:07:21 05:08:44.020(UTC+0),36.4749297,127.2758705,37.559
8969,2022:07:21 05:08:45.010(UTC+0),36.4749707,127.2759091,37.722
8999,2022:07:21 05:08:46.000(UTC+0),36.4750032,127.2759575,37.255
9029,2022:07:21 05:08:47.045(UTC+0),36.4750301,127.2760079,36.992
9059,2022:07:21 05:08:48.035(UTC+0),36.4750521,127.2760607,36.504
9089,2022:07:21 05:08:49.025(UTC+0),36.4750762,127.2761181,35.926
9119,2022:07:21 05:08:50.015(UTC+0),36.4750998,127.2761732,35.711
9149,2022:07:21 05:08:51.060(UTC+0),36.4751241,127.2762303,35.523
9179,2022:07:21 05:08:52.050(UTC+0),36.4751518,127.2762945,35.335
9209,2022:07:21 05:08:53.040(UTC+0),36.4751869,127.276365,35.805
9239,2022:07:21 05:08:54.030(UTC+0),36.4752237,127.2764373,36.454
9269,2022:07:21 05:08:55.020(UTC+0),36.4752637,127.2765194,36.837
9299,2022:07:21 05:08:56.010(UTC+0),36.4753098,127.276603,37.592
9329,2022:07:21 05:08:57.110(UTC+0),36.4753558,127.2766918,38.27
9359,2022:07:21 05:08:58.045(UTC+0),36.4753993,127.2767853,39.011
9389,2022:07:21 05:08:59.035(UTC+0),36.4754462,127.2768867,39.596
9419,2022:07:21 05:09:00.025(UTC+0),36.4754925,127.2769823,40.337
9449,2022:07:21 05:09:01.015(UTC+0),36.4755423,127.2770752,41.099
9479,2022:07:21 05:09:02.060(UTC+0),36.4755912,127.2771715,41.303
9509,2022:07:21 05:09:03.050(UTC+0),36.4756419,127.2772768,41.279
9539,2022:07:21 05:09:04.040(UTC+0),36.4756895,127.2773798,41.082
9569,2022:07:21 05:09:05.030(UTC+0),36.4757373,127.2774821,40.783

import pandas as pd
import pydeck as pdk

import streamlit as st

column_name = ["frame", "date_time", "lat", "lon", "alt"]
gps_data = "sample_gps_data.csv"

gps_data = pd.read_csv(gps_data)
gps_data = gps_data.values.tolist()
gps_data = pd.DataFrame(gps_data, columns=column_name)

gps_data = gps_data[["lat", "lon"]]
st.subheader("Using st.map")
st.map(gps_data)

st.subheader("Using st.pydeck_chart")
st.slider("Radius", min_value=0, max_value=100, value=3, step=1, key="radius")

st.pydeck_chart(
    pdk.Deck(
        map_style="mapbox://styles/mapbox/light-v9",
        initial_view_state=pdk.ViewState(
            latitude=36.4813, longitude=127.2945, zoom=13.4
        ),
        layers=[
            pdk.Layer(
                "ScatterplotLayer",
                data=gps_data,
                get_position=["lon", "lat"],
                get_color=[0,249,0],
                get_radius=st.session_state.radius,
            ),
        ],
    )
)

map-radius

Happy Streamlit-ing! :balloon:

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.