In-browser geospatial data in Python
Building a web application using Pyscript and Folium
Mietniveaustufen in Deutschland
packages = [
"folium",
"pandas"
]
# import the library
import folium
from folium import plugins
import numpy as np
import pandas as pd
from pyodide.http import open_url
#data = (np.random.normal(size=(100, 3)) * np.array([[1, 1, 1]]) + np.array([[48, 5, 1]]) ).tolist()
data = [
[52.5766, 13.5797, 3], # Ahrensfelde
[52.5373, 14.5123, 1], # Alt T
[51.9168, 14.0149, 2], # Alt Z
[51.65, 14.0333, 1],
[52.9623, 13.8072, 2],
[52.565, 13.7281, 1],
[52.1833, 13.43, 2], # Am Mellensee
[53.015, 13.9992, 2], # Angermünde
[52.1333, 12.6, 2],
[52.7873, 14.0304, 1],
[51.5183, 13.3946, 1],
[52.2833, 14.0667, 2],
[52.9561, 11.949, 1],
[52.05, 13.5, 2],
[52.2381, 12.9714, 3],
[52.1729,14.246,2],
[52.4833,12.5611,2],
[52.4917,12.6125,2],
[52.6967,13.8014,1],
[52.4167,12.3333,2],
[52.6201,12.7951,1],
[52.35,14.15,2],
[52.6821,13.5965,3],
[51.9425,13.776,2],
[52.2398,13.6373,2],
[52.7662,13.6442,2],
[52.6833,13.2833,2],
[52.3372,13.4121,4],
[52.6017,14.5646,1],
[52.693,14.1595,1],
[53.260888888889,13.607590,1],
[52.2167,12.85,2],
[52.25,12.8333,2],
[52.4189,12.5228,2],
[52.8856,12.2237,1],
[53,11.8,1],
[52.7694,13.8153,2],
[52.5833,13,5],
[51.8155,14.2442,1],
[52.325,14.3,2],
[52.2539,14.5728,2],
[52.8873,13.8112,2],
[51.6667,13.9167,1],
[52.1977,12.7687,2],
[53.3997,14.1253,1],
[52.2333,12.3222,2],
[52.5661,14.0743,1],
[51.8333,14.15,1],
[51.8793,14.1745,2],
[51.744,13.9533,1],
[53.3667,14.068,1],
[53.2112,14.2082,1],
[52.902,13.8715,2],
[51.7612,14.3544,2],
[51.7333,13.7667,1],
[53.0333,11.6667,1],
[52.9031,12.7247,1],
[51.8941,13.4342,2],
[51.9067,13.5,2],
[52.5427,13.0584,2],
[52.2333,14.05,2],
[51.825,14.2833,1],
[51.6258,13.5623,1],
[51.6159,14.5981,1],
[51.8903,14.3164,1],
[51.9167,13.5833,2],
[51.6541,14.2232,1],
[52.803,12.4596,1],
[51.8667,14.3667,1],
[52.8333,13.8333,3],
[52.3667,13.6167,2],
[52.1601,14.555,3],
[51.4604,13.52,1],
[52.42,13.7544,3],
[52.8051,13.958,1],
[51.5875,13.2364,1],
[52.4333,14.3167,1],
[52.5601,13.0927,4],
[52.8135,12.7644,1],
[51.6083,14.5208,1],
[52.4556,14.4469,1],
[51.697732,13.471073,1],
[51.6339,13.7066,2],
[53.1417,13.8333,1],
[51.7302,14.598,1],
[52.3475,14.5539,2],
[51.4148,13.7696,1],
[52.5,13.7333,4],
[52.0943,14.3104,2],
[53.0292,13.7068,2],
[52.7376,12.5797,2],
[53.1864,13.1708,2],
[52.3833,14.0583,2],
[53.2,14.3833,1],
[52.5382,13.9667,1],
[53.2446,12.1981,1],
[53.1699,13.7485,1],
[52.6351,13.3075,5],
[52.745,12.4,2],
[51.972,13.6011,2],
[52.2762,12.6005,1],
[52.574,14.493,2],
[51.5332,13.6269,1],
[53.4063,13.9156,1],
[52.1718,12.3751,2],
[52.3667,13.75,2],
[52.2333,12.4333,2],
[53.2125,14.0075,1],
[53.007,13.1575,2],
[51.4,13.5667,1],
[52.1659,13.6594,2],
[52.4028,12.7794,2],
[52.2333,14.5333,2],
[53.1195,12.0497,1],
[51.7,14.625,1],
[52.3586,13.3099,2],
[52.7906,12.3682,2],
[51.379,13.725,1],
[51.5876,14.0109,1],
[51.3833,13.6667,1],
[53.0667,13.1,2],
[51.4,14,1],
[52.4111,13.8889,2],
[53.3167,13.95,1],
[52.15,14.4083,2],
[51.9499,14.7145,2],
[51.812,14.2294,1],
[53.1889,11.9278,1],
[52.9833,12.25,1],
[52.5777,14.34,1],
[51.4167,13.9333,1],
[52.1167,13.7,2],
[53.2333,12.28,1],
[52.7167,12.2567,2],
[52.4929,12.4667,2],
[52.735,13.8577,1],
[51.8127,13.6551,2],
[51.603797,13.670059,1],
[52.293584,13.790831,2],
[53.1446,12.3625,1],
[51.8199,14.5074,1],
[52.636,13.2042,3],
[51.4055,13.8937,1],
[51.6833,13.2333,1],
[52.9027,12.9698,1],
[51.3833,13.6167,1],
[52.6763,13.2778,4],
[51.431,14.0098,1],
[51.7667,13.4667,1],
[52.8134,13.9249,2],
[52.7534,13.8823,1],
[51.5,13.55,1],
[53.205,14.2807,1],
[52.504358,13.650114,5],
[52.619,14.0708,2],
[52.3333,14.35,2],
[51.9913,14.361,2],
[51.5667,14.6417,1],
[51.8607,14.4981,1],
[52.9794,13.7449,2],
[51.9961,13.0798,1],
[53.1622,11.7424,1],
[51.9333,13.7,2],
[52.4781,12.8453,2],
[52.4079,13.2251,4],
[52.7167,12.5,2],
[52.3271,12.6625,2],
[51.75,14.25,1],
[52.3014,13.633,3],
[52.6333,12.5167,2],
[52.0462,13.8489,2],
[51.725756,13.315825,1],
[52.7622,13.0252,2],
[51.3833,13.8,1],
[53.2417,12.1583,1],
[52.5624,14.5728,1],
[52.9808,12.3274,1],
[52.3333,14.1,2],
[53.0744,11.5991,1],
[51.4881,13.7662,2],
[52.107,14.6415,2],
[52.4272,14.5323,1],
[51.7957,13.4207,1],
[52.7234,13.193,2],
[52.9111,11.9778,1],
[53.0833,11.4833,1],
[53.066744,11.359147,1],
[52.6438,14.3601,1],
[51.5976,13.7781,1],
[52.8713,13.3947,2],
[51.9849,14.2999,2],
[52.8621,13.9695,2],
[52.4699,14.3401,1],
[51.4,13.7333,1],
[52.4899,14.4285,1],
[52.9748,12.9869,1],
[52.1975,12.7851,2],
[52.8958,13.1729,2],
[51.9455,13.8852,2],
[51.8626,13.9613,1],
[51.6833,14,1],
[51.8297,13.6741,2],
[52.0903,13.1677,2],
[52.3032,13.254,3],
[52.9333,14.1083,2],
[53.2124,13.3148,1],
[53.32,12.1233,1],
[52.8421,13.5993,2],
[52.1096,13.7654,2],
[52.9292,12.7083,1],
[52.5875,12.6167,2],
[52.038253,14.037763,2],
[52.6199,14.1292,1],
[51.6428,13.733,1],
[52.7761,13.7065,2],
[51.4,13.5333,1],
[53.2472,14.43,1],
[53.3133,12.2425,1],
[52.3127, 13.0261, 5], #MD
[53.1119,13.6415,1],
[52.5195,12.3115,2],
[52.3024,13.5355,2],
[53.1833,13.6667,1],
[52.2,14.4,2],
[51.4333,13.2167,1],
[52.6647,13.3769,4],
[52.6667,12.6111,2],
[52.1194,12.7917,2],
[52.2474,14.4179,2],
[52.5,14.1333,1],
[52.5562,14.1376,2],
[52.607,12.8737,3],
[51.6433,14.63,1],
[52.05,14.7333,2],
[52.6,12.5,2],
[51.9276,14.0881,2],
[52.5333,13.6833,4],
[52.596,14.2377,1],
[51.6788,14.4163,1],
[52.7243,14.2792,1],
[51.608,14.1651,1],
[52.9282,12.8031,2],
[51.6214,14.1309,1],
[52.8528,12.4492,1],
[52.6648,14.228,1],
[52.0639,14.6028,2],
[51.9025,13.2092,2],
[52.8337,13.9284,2],
[51.9794,12.9854,2],
[52.0531,12.6185,2],
[53.2697,13.6046,1],
[52.3472,13.1053,2],
[52.1116,13.2152,2],
[52.5938,14.0355,1],
[52.5833,13.3167,3],
[53.2125,13.8875,1],
[52.7773,14.2042,1],
[52.8657,14.0451,2],
[52.7558,13.242,3],
[51.375,13.7598,1],
[52.654626,13.543257,4],
[52.9333,14.05,2],
[52.677,12.7107,2],
[52.5167,12.7167,2],
[51.8584,14.4114,1],
[53.0758,11.8574,1],
[52.6424,12.6668,2],
[52.525,13.8,3],
[53.062,14.0856,1],
[53.2167,11.9,1],
[52.2542,12.6875,2],
[52.1167,12.6767,2],
[52.957032,12.02873,1],
[51.4667,13.6167,1],
[52.4717,14.5347,1],
[52.4,13.0667,4],
[52.5318,12.3485,2],
[53.3162,13.8626,2],
[53.1494,12.1741,1],
[52.6372,13.9878,1],
[53.249,12.0418,1],
[52.0333,12.6313,2],
[52.2,14.325,2],
[53.3056,14.0556,1],
[52.2913,13.4195,3],
[52.6066,12.337,2],
[52.3323,14.028,2],
[52.5342,13.9088,1],
[52.6562,14.0937,1],
[52.2667,14,2],
[52.5009,14.5817,1],
[52.6248,12.6855,2],
[53.0997,12.8989,1],
[52.7509,12.3419,2],
[52.2321,14.1619,2],
[52.016667,13.666667,2],
[51.429725,13.493509,1],
[52.3292,12.3583,2],
[52.4724,12.7189,2],
[51.5695,13.5723,1],
[52.4707,13.7736,2],
[52.7214,13.625,2],
[51.4576,13.8664,1],
[52.9167,11.8667,1],
[52.8812,12.9965,1],
[51.5887,13.8486,1],
[53.3667,13.95,1],
[51.957956,14.635866,1],
[51.6,13.3833,1],
[51.5456,13.9121,1],
[52.1289,14.5111,2],
[52.0333,13.9,2],
[51.7238,13.383,1],
[51.85,14.2333,1],
[51.6002,13.4897,1],
[52.389,13.5037,3],
[52.4598,13.7054,3],
[53.007,13.1202,2],
[51.679,13.6025,1],
[53.4136,13.9857,1],
[51.9853,13.723,2],
[52.6192,13.1265,2],
[52.8501,13.6828,2],
[51.4253,13.6949,1],
[52.3582,13.5984,2],
[51.45,13.9333,1],
[51.4767,13.8556,1],
[53.066,14.2711,2],
[52.15,13.6333,2],
[52.0196,14.1749,2],
[52.3389,12.9722,4],
[52.2722, 13.0167, 2], #Seddiner See
[52.6722,12.3778,2],
[52.5339,14.3813,1],
[51.5252,14.0016,2],
[52.1944,14.5333,2],
[52.825,12.4083,1],
[53.0192,13.0884,2],
[51.6922,13.6473,1],
[52.3432,13.8766,2],
[51.930504,14.168133,2],
[51.5696,14.3739,2],
[52.3833,13.2167,4],
[53.1056,13.0417,2],
[52.6478,12.45,2],
[52.4,14.1667,2],
[51.9495,13.4934,2],
[53.0067,12.7333,1],
[52.2238,13.8964,2],
[51.9136,14.1228,2],
[52.5786,13.8874,2],
[52.8917,12.3,1],
[52.7274,13.723,2],
[53.2716,14.351,1],
[52.1292,14.1306,2],
[51.9,14.45,1],
[51.8056,14.4444,1],
[52.4031,13.2601,4],
[53.08,13.7417,1],
[53.0056,12.6444,1],
[52.8567,12.6367,1],
[53.1262,13.5455,2],
[51.4333,13.7333,1],
[52.1297,13.6196,2],
[52.2168,13.225,2],
[52.4,14.4,1],
[52.0975,12.8726,2],
[53.2167,12.1,1],
[51.6,13.4333,1],
[51.5833,14.6167,1],
[51.875,14.4083,1],
[53.2583,13.9667,1],
[53.4569,13.7806,1],
[51.5167,13.3333,1],
[52.091,13.8902,2],
[52.6915,13.1753,2],
[51.7864,14.0794,1],
[52.9338,13.0161,1],
[52.515,14.3141,1],
[52.1824,14.6637,2],
[52.5422,14.0702,1],
[52.9383,12.6645,1],
[52.742,13.458,3],
[53.0252,11.7871,1],
[51.5838,14.1708,1],
[52.2161,14.0084,2],
[52.3,12.45,2],
[51.8167,14.1833,1],
[52.3687,12.9188,3],
[52.6328,13.7344,2],
[52.2307,14.5911,2],
]
m = folium.Map([52.4, 13.2], zoom_start=8)
plugins.HeatMap(data).add_to(m)
draw = plugins.Draw(export=True)
draw.add_to(m)
# Karte anzeigen
m