diff --git a/dashboard/app/Api.php b/dashboard/app/Api.php index 338cd2d..0647af0 100644 --- a/dashboard/app/Api.php +++ b/dashboard/app/Api.php @@ -30,9 +30,24 @@ class Api return self::get('/region/properties'); } + public static function propertiesGrowth() + { + return self::get('/properties/growth'); + } + + public static function propertiesGeo() + { + return self::get('/properties/geo'); + } + public static function propertyExtractions(int $id) { - return self::get("/properties/extractions/{$id}"); + return self::get("/property/{$id}/extractions"); + } + + public static function propertyBase(int $id): mixed + { + return self::get("/property/{$id}/base"); } diff --git a/dashboard/resources/css/app.css b/dashboard/resources/css/app.css index 1d2c310..c3d508a 100644 --- a/dashboard/resources/css/app.css +++ b/dashboard/resources/css/app.css @@ -46,6 +46,14 @@ h1, h2, h3, h4, h5, h6 { text-wrap: balance; } +dt{ + font-weight: 600; +} + +dd + dt{ + margin-top: .2em; +} + /* 9. Create a root stacking context */ @@ -53,6 +61,10 @@ h1, h2, h3, h4, h5, h6 { isolation: isolate; } +nav>ul{ + list-style: none; +} + body>header{ position: fixed; diff --git a/dashboard/resources/js/app.js b/dashboard/resources/js/app.js index 389cfa5..6ba4f3f 100644 --- a/dashboard/resources/js/app.js +++ b/dashboard/resources/js/app.js @@ -2,277 +2,3 @@ import * as echarts from 'echarts'; import 'leaflet' window.echarts = echarts; - -/* -const chartPropsPerRegion = document.getElementById('chart-props-per-region'); -const cPropsPerRegion = echarts.init(chartPropsPerRegion); - -const cPropsPerRegionOptions = { - xAxis: { - type: 'category', - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] - }, - yAxis: { - type: 'value' - }, - series: [ - { - data: [120, 200, 150, 80, 70, 110, 130], - type: 'bar' - } - ] -}; - -cPropsPerRegion.setOption(cPropsPerRegionOptions); - -let properties = [[46.49593,9.83718],[46.48089,9.81599],[46.48824,9.83301],[46.497932,9.836767],[46.48615,9.83104],[46.4972399,9.8513866],[46.4867345,9.8349723],[46.4926593,9.8352605],[46.488409,9.840455],[46.5002929,9.8428447],[46.48024,9.81368],[46.48627,9.83095],[46.4904722,9.8346281],[46.48602,9.83109],[46.47736,9.81286],[46.4865553,9.8404283],[46.486563,9.8311711],[46.493988,9.836039],[46.4975,9.83937],[46.4852478,9.8316748],[46.488567,9.8424808],[46.4883782,9.8355532],[46.4868242,9.8332824],[46.49642,9.836712],[46.4883782,9.8355532],[46.47748,9.80948],[46.5002642,9.8429209],[46.4980738,9.8498749],[46.5034907,9.8465318],[46.4868242,9.8332824],[46.47927,9.81362],[46.4875089,9.8328176],[46.4884205,9.837406],[46.4861438,9.8311151],[46.49757,9.83946],[46.4933517,9.8352912],[46.4864667,9.8404068],[46.4866534,9.830708],[46.480585,9.815248],[46.4870555,9.8334099],[46.4786218,9.8127465],[46.48837,9.84037],[46.48604,9.83109],[46.4809238,9.8160696],[46.4898,9.83629],[46.48683,9.8333162],[46.4883782,9.8355532],[46.4771336,9.8134695],[46.4928286,9.8350188],[46.488891,9.841088],[46.499849,9.837025],[46.495869,9.837594],[46.47701,9.81146],[46.486404,9.8416679],[46.4783711,9.8132931],[46.49159,9.83546],[46.488303,9.840426],[46.4975017,9.8395553],[46.48672,9.83717],[46.4883753,9.8403742],[46.4883753,9.8403742],[46.4899857,9.8363568],[46.4863272,9.8405407],[46.497487,9.839477],[46.5020769,9.8418942],[46.50238,9.84558],[46.4884,9.84045],[46.48676,9.835],[46.4782248,9.8130534],[46.47749,9.80944],[46.48824,9.83301],[46.4869233,9.8376718],[46.4883782,9.8355532],[46.4882516,9.8402106],[46.49735,9.83945],[46.4883782,9.8355532],[46.48665,9.83723],[46.4883782,9.8355532],[46.49731,9.838838],[46.4883753,9.8403742],[46.4955609,9.8375856],[46.484052,9.8379806],[46.4883782,9.8355532],[46.496111,9.837175],[46.4843287,9.8376702],[46.4864902,9.8329028],[46.4895127,9.8359552],[46.503276,9.84604],[46.4852328,9.8323521],[46.4873273,9.8371615],[46.503511,9.846615],[46.48668,9.83719],[46.488172,9.833806],[46.4873397,9.831455],[46.4866534,9.830708],[46.495563,9.837539],[46.4984,9.84463],[46.4980738,9.8498749],[46.489777,9.8345806],[46.477581,9.810936],[46.4928286,9.8350188],[46.4974869,9.839558],[46.47591,9.8105111],[46.4887022,9.8352726],[46.4883233,9.8402706],[46.48668,9.83717],[46.47862,9.81366],[46.4891482,9.8343803],[46.4768608,9.813171],[46.477549,9.810314],[46.4895127,9.8359552],[46.498344,9.844374],[46.5032565,9.8460512],[46.4791522,9.8122151],[46.4985892,9.8401749],[46.48664,9.83696],[46.4859316,9.8307934],[46.48665,9.83723],[46.49876,9.837459],[46.4866,9.83716],[46.4885071,9.8411413],[46.4985324,9.8401342],[46.4849695,9.8320309],[46.4978506,9.8383183],[46.503635,9.846695],[46.5023548,9.8455593],[46.4865151,9.8403382],[46.48691,9.83212],[46.498764,9.8374597],[46.5003728,9.8424702],[46.498543,9.840123],[46.4987598,9.8374593],[46.487275,9.8323903],[46.5004613,9.8432744],[46.493155,9.835243],[46.4954953,9.8360637],[46.4890826,9.8354328],[46.4879702,9.8425062],[46.4974869,9.839558],[46.497987,9.8351241],[46.4768315,9.8132372],[46.503511,9.846615],[46.4891952,9.8354489],[46.489485,9.836001],[46.48838,9.83555],[46.4986225,9.8441318],[46.4886203,9.838023],[46.4883753,9.8403742],[46.496488,9.836766],[46.486678,9.837191],[46.476946,9.811528],[46.4786,9.81389],[46.4795257,9.8137264],[46.48089,9.81599],[46.498671,9.837675],[46.4883805,9.8355637],[46.4974869,9.839558],[46.4931507,9.8350282],[46.496111,9.837175],[46.4759,9.80941],[46.4809147,9.8159934],[46.477291,9.811467],[46.4763346,9.8103601],[46.48686,9.84097],[46.4909066,9.8347269],[46.502291,9.845428],[46.480674,9.814221],[46.484197,9.83739],[46.4918196,9.8345876],[46.4915284,9.8338491],[46.4974338,9.8350768],[46.48672,9.83717],[46.4867237,9.8371725],[46.48669,9.83724],[46.4939895,9.8359017],[46.5032761,9.84604],[46.498566,9.840089],[46.498344,9.844374],[46.4786235,9.8136651],[46.50028,9.84108],[46.4893186,9.8335381],[46.4873711,9.8325248],[46.4945882,9.835511],[46.475007,9.807983],[46.47591,9.8105111],[46.4971764,9.8369717],[46.4952387,9.8375284],[46.4940576,9.8369153],[46.4840021,9.8379366],[46.493951,9.835891],[46.5012405,9.8427173],[46.5388,9.87594],[46.60211,9.96407],[46.4946,9.90307],[46.55315,9.88566],[46.57833,9.92136],[46.55325,9.88494],[46.57227,9.93144],[46.6964,10.09554],[46.57807,9.92007],[46.4604,9.80592],[46.4329,9.76601],[46.50247,9.89315],[46.5144288,9.8599243],[46.60363,9.96082],[46.51445,9.85767],[46.57808,9.92007],[46.50533,9.89026],[46.57808,9.92007],[46.5785,9.91998],[46.6968,10.09621],[46.51028,9.85812],[46.57609,9.93219],[46.65407,10.0328],[46.55137,9.8876],[46.5759,9.93054],[46.41343,9.74001],[46.57322,9.93254],[46.51526,9.85821],[46.43307,9.76493],[46.53437,9.86964],[46.50093,9.8949],[46.60214,9.96407],[46.55337,9.89231],[46.49926,9.8962],[46.50068,9.8926],[46.50294,9.89265],[46.43313,9.7644],[46.55482,9.88683],[46.7947,10.24635],[46.69741,10.0937],[46.57324,9.93254],[46.57473,9.93214],[46.50247,9.89317],[46.42964,9.76165],[46.4989708,9.8966111],[46.53261,9.8685],[46.48933,9.90827],[46.60106,9.95979],[46.53252,9.86896],[46.51018,9.8559],[46.7,10.09],[46.7002101,10.094263],[46.48531,9.90863],[46.6965678,10.0959391],[46.5152,9.85819],[46.49788,9.89949],[46.53376,9.8713],[46.5345,9.86978],[46.61195,9.98439],[46.79799,10.29919],[46.48871,9.90872],[46.70336,10.09483],[46.45878,9.80805],[46.4890858,9.9085951],[46.55326,9.8857],[46.4627705,9.7966097],[46.79519,10.30224],[46.42975,9.76404],[46.48912,9.8957],[46.48505,9.90826],[46.48821,9.90837],[46.57861,9.92694],[46.79261,10.29354],[46.5327321,9.8691016],[46.49277,9.903],[46.49,9.90428],[46.49467,9.9007],[46.5534,9.88432],[46.4592,9.80846],[46.41409,9.75243],[46.55299,9.88993],[46.400687,9.695656],[46.4287838,9.7638845],[46.53783,9.87134],[46.497239,9.8984483],[46.5132752,9.856569],[46.49737,9.89746],[46.43364,9.76538],[46.43467,9.76566],[46.7963,10.30416],[46.5506,9.8869],[46.42966,9.76258],[46.433781,9.765144],[46.48813,9.90832],[46.5300784,9.8685666],[46.40656,9.69599],[46.50228,9.89287],[46.50291,9.89314],[46.53343,9.86977],[46.50201,9.89395],[46.4579,9.81314],[46.55299,9.88993],[46.53487,9.87172],[46.79437,10.24684],[46.536323,9.873959],[46.7954439,10.2538023],[46.433997,9.765498],[46.49494,9.90221],[46.45738,9.81487],[46.51519,9.85558],[46.50299,9.89268],[46.7922,10.29161],[46.77359,10.20271],[46.49246,9.90456],[46.41305,9.73989],[46.536348,9.869786],[46.40656,9.69599],[46.43288,9.76598],[46.509987,9.8539248],[46.79227,10.29163],[46.4579843,9.8135404],[46.458407,9.796621],[46.79531,10.30331],[46.536209,9.874049],[46.434338,9.76565],[46.43309,9.76398],[46.5535204,9.8912881],[46.43598,9.76688],[46.48894,9.90682],[46.4884253,9.9062128],[46.79948,10.3078],[46.458726,9.796228],[46.55299,9.88993],[46.6010027,9.9631681],[46.43276,9.7662],[46.43285,9.7661],[46.4616687,9.7964143],[46.50236,9.89183],[46.79451,10.24705],[46.53602,9.87527],[46.43417,9.76763],[46.4972811,9.8985026],[46.458175,9.795579],[46.79444,10.24664],[46.42978,9.76357],[46.48928,9.90832],[46.48977,9.89513],[46.4885,9.89457],[46.43436,9.76566],[46.48939,9.9056],[46.40638,9.69642],[46.4627705,9.7966097],[46.79565,10.29715],[46.49481,9.90197],[46.4628861,9.7967899],[46.7948484,10.2532831],[46.8183302,10.3397711],[46.79512,10.24701],[46.79365,10.29146],[46.80047,10.29931],[46.4359602,9.7668463],[46.7916,10.24673],[46.4627299,9.7967921],[46.55131,9.88652],[46.69846,10.09212],[46.4612334,9.7946465],[46.61168,9.98438],[46.7968884,10.3044409],[46.536222,9.874019],[46.7929832,10.2920387],[46.4627114,9.7968028],[46.60169,9.96059],[46.536915,9.871366],[46.69986,10.09256],[46.48956,9.90427],[46.79304,10.24749],[46.4359355,9.7672732],[46.835475,10.3810998],[46.42956,9.7616],[46.5378801,9.8756513],[46.433781,9.765144],[46.46046,9.795657],[46.50282,9.89311],[46.42934,9.76251],[46.458075,9.8138077],[46.8436,10.36075],[46.81197,10.31965],[46.799247,10.2935645],[46.4359355,9.7672732],[46.7985982,10.3026853],[46.48941,9.89561],[46.43523,9.76741],[46.40158,9.6956],[46.53596,9.875],[46.43399,9.76544],[46.55193,9.89044],[46.78672,10.28398],[46.48861,9.89479],[46.48575,9.90755],[46.4580911,9.8107131],[46.48477,9.90864],[46.4627114,9.7968028],[46.4597482,9.7959433],[46.42985,9.76558],[46.8173344,10.335409],[46.79879,10.29579],[46.79508,10.3032],[46.48615,9.90589],[46.5152512,9.8572464],[46.43489,9.76742],[46.459176,9.807722],[46.57908,9.92699],[46.5907944,9.9425304],[46.48805,9.90776],[46.4597482,9.7959433],[46.55299,9.88993],[46.403295,9.695247],[46.65325,10.0332],[46.5097713,9.859541],[46.43269,9.76727],[46.53269,9.86553],[46.5044748,9.8905525],[46.4065585,9.6962249],[46.4332,9.76445],[46.79284,10.24541],[46.76759,10.11064],[46.48506,9.90827],[46.49482,9.90102],[46.57768,9.91934],[46.7926609,10.2937308],[46.402518,9.699485],[46.42987,9.76387],[46.554002,9.885139],[46.53767,9.86978],[46.87069,10.42587],[46.45872,9.81326],[46.48575,9.90755],[46.51052,9.85534],[46.4627705,9.7966097],[46.79507,10.28751],[46.540908,9.880276],[46.48574,9.90755],[46.4972455,9.8984215],[46.7986428,10.2945489],[46.5105884,9.8585404],[46.79854,10.2955],[46.40256,9.69538],[46.486676,9.90917],[46.53184,9.87006],[46.57899,9.92686],[46.4948225,9.9019745],[46.49464,9.90307],[46.51487,9.8622],[46.4339,9.76395],[46.43287,9.76601],[46.40257,9.69538],[46.79474,10.29203],[46.40614,9.69594],[47.09011,9.29902],[47.09024,9.33744],[47.1496535,9.1435361],[46.99386,9.50846],[47.0937561,9.2973089],[47.12384,9.3161],[47.0908,9.2978],[47.0925656,9.2856842],[47.090429,9.2995673],[47.0381319,9.415214],[47.13016,9.21426],[47.0527931,9.4139957],[47.00963,9.52482],[47.0035165,9.5025466],[47.0066226,9.5045847],[47.0944135,9.286387],[47.089764,9.3040601],[47.0885188,9.3051517],[47.0861812,9.3064284],[47.0926708,9.3019263],[47.00369,9.5024086],[47.0920506,9.286285],[47.0996284,9.2604232],[47.09072,9.29779],[47.0892584,9.3007361],[47.149636,9.1360881],[47.13005,9.22739],[47.1475864,9.1752849],[47.10344,9.30264],[47.1485842,9.1350772],[47.11289,9.25131],[47.147884,9.1758126],[47.11307,9.27327],[47.0061371,9.4974252],[47.0037346,9.5023867],[46.9878323,9.4672584],[47.10311,9.29698],[47.0018428,9.5009594],[47.1129,9.27366],[47.1475864,9.1752849],[47.129615,9.2157081],[47.0836608,9.3064713],[47.1486259,9.1357867],[47.093968,9.2826748],[47.0910804,9.2949446],[47.0935882,9.2848206],[47.1503536,9.1363903],[47.1486081,9.1350315],[47.08334,9.30475],[47.0890666,9.3071687],[47.1482073,9.1464712],[47.0886805,9.300115],[47.0910736,9.2835861],[47.1485898,9.1358068],[47.1024,9.25666],[47.1042054,9.2565247],[47.0835012,9.307563],[47.0908682,9.3050914],[47.1487464,9.136045],[47.0913384,9.2954099],[47.1478662,9.1758214],[47.0899222,9.3050323],[47.1496785,9.1360454],[47.0049691,9.5032704],[47.0934647,9.2877671],[47.0898337,9.2946267],[47.0097978,9.5070111],[47.0937333,9.2862871],[47.147139,9.1671843],[47.1488176,9.1376202],[47.1401808,9.1300225],[47.00953,9.54435],[47.0840909,9.3052],[47.0979376,9.3075603],[47.0895122,9.3020725],[47.1503783,9.1364144],[47.1516298,9.1413501],[47.0023279,9.5015933],[47.11285,9.27359],[47.0899323,9.3032715],[47.0929177,9.3396583],[47.150526,9.1377356],[47.1493204,9.1429031],[47.0889682,9.3007852],[47.1478396,9.1758092],[47.1148478,9.256094],[47.0934395,9.2851719],[47.1496643,9.1405304],[47.0840983,9.3042223],[47.1506348,9.1350145],[47.14958,9.167463],[47.04294,9.41458],[46.9937048,9.4850461],[47.0982919,9.3067503],[47.0905607,9.3044458],[47.1493204,9.1429031],[47.0903295,9.2955059],[47.0904844,9.3045098],[47.1511983,9.158543],[47.0841185,9.3083784],[47.1488176,9.1376202],[47.0930202,9.2864218],[47.1496564,9.1405583],[47.0941206,9.2830919],[47.0907049,9.2977769],[46.9893443,9.4987615],[47.0095319,9.5443613],[47.1486606,9.135335],[47.15019,9.1446],[47.10475,9.23721],[47.0941506,9.2860383],[47.0931941,9.3186024],[47.0840357,9.305497],[46.9896178,9.4646057],[47.0901379,9.3051141],[47.150526,9.1377356],[47.1497622,9.1383781],[47.0080719,9.501543],[47.0849056,9.3032606],[46.99386,9.50846],[47.1034187,9.3027592],[47.0920819,9.2871889],[47.0918279,9.2864949],[47.1516298,9.1413501],[47.0966757,9.2848649],[47.0924633,9.2853999],[47.1492004,9.1441194],[47.1494535,9.1443895],[47.0909048,9.3061642],[47.1436366,9.1687265],[47.0265865,9.5132885],[47.0838536,9.3055592],[47.08934,9.3048],[47.1425525,9.16317],[47.0897909,9.3040254],[47.1511679,9.1585855],[47.1496313,9.1544595],[47.1482073,9.1464712],[47.0903669,9.2963755],[47.0966303,9.2839247],[47.0911485,9.2979258],[47.151195,9.1587093],[47.1478662,9.1758214],[47.1496123,9.1674592],[47.1496535,9.1435361],[47.151105,9.1354646],[47.1496313,9.1544595],[47.00948,9.54435],[47.0892836,9.3043674],[47.1486122,9.1349685],[47.0931645,9.3391031],[47.08966,9.29728],[47.0909293,9.2974952],[47.0912827,9.2982558],[47.1475173,9.1541166],[47.0940593,9.2888533],[47.103438,9.2961945],[47.089841,9.3040895],[47.0927356,9.2862126],[47.1488631,9.1375972],[47.08949,9.30417],[47.1425525,9.16317],[47.1497622,9.1383781],[47.1470711,9.1708897],[47.0889885,9.3053392],[47.1361478,9.099377],[47.0931868,9.2868869],[47.1425769,9.1624296],[47.0912018,9.3000394],[47.14907,9.13998],[47.1475189,9.1541165],[47.0901989,9.2950505],[47.1157482,9.2554745],[47.1474507,9.1753575],[47.1475846,9.1752849],[47.1153083,9.2570248],[47.1361465,9.0996163],[47.116113,9.1528289],[46.99419,9.50855],[47.11491,9.25601],[47.1475067,9.1772795],[47.1475327,9.1773552],[47.1511983,9.158543],[47.1496313,9.1544595],[47.1503536,9.1363903],[47.1488631,9.1375972],[47.0941506,9.2860383],[47.1511679,9.1585855],[47.1478662,9.1758214],[47.1478396,9.1758092],[47.1485898,9.1358068],[47.1474507,9.1753575],[47.1497622,9.1383781],[47.1473964,9.1750197],[47.1496123,9.1674592],[47.1487464,9.136045],[47.1506348,9.1350145],[46.8086631,9.8430198],[46.79295,9.81683],[46.7142,9.76761],[46.7883863,9.8215629],[46.8033735,9.8433746],[46.8023053,9.8414756],[46.7132569,9.7687448],[46.80245,9.8372],[46.7992588,9.8234512],[46.8065224,9.8349569],[46.7959396,9.8271902],[46.8040365,9.8373557],[46.8002651,9.8277855],[46.7943259,9.8204323],[46.7939511,9.8224337],[46.8033414,9.8377761],[46.8017615,9.8347858],[46.7936738,9.8227883],[46.7936348,9.8225973],[46.8092308,9.8422604],[46.808384,9.8371631],[46.7920269,9.816846],[46.8115912,9.847211],[46.793627,9.8224721],[46.7997578,9.8359198],[46.8105533,9.8401435],[46.7992369,9.823451],[46.8093755,9.8465007],[46.8132422,9.8422517],[46.7920334,9.8162759],[46.8027336,9.8310924],[46.7993864,9.8349277],[46.7920355,9.8167885],[46.8060374,9.8354352],[46.8051269,9.8355211],[46.792061,9.8166603],[46.7892857,9.8182646],[46.7936038,9.8227323],[46.7941404,9.8202668],[46.7952433,9.824772],[46.7989143,9.8312791],[46.8027326,9.8311079],[46.8101877,9.8364706],[46.7936568,9.822726],[46.79715,9.82037],[46.7936452,9.8227379],[46.78679,9.8218809],[46.7936495,9.822726],[46.8250631,9.8538151],[46.8027773,9.8341838],[46.8025731,9.8433616],[46.8124085,9.8455365],[46.7555128,9.7825241],[46.7913271,9.8162757],[46.8056764,9.8350951],[46.8104742,9.8383245],[46.8032932,9.8370466],[46.81252,9.84582],[46.7919163,9.8176838],[46.788033,9.816692],[46.799432,9.8322552],[46.8092437,9.8413254],[46.7937146,9.8292877],[46.8088483,9.8436036],[46.80577,9.8366612],[46.7932094,9.8159175],[46.7908756,9.8162915],[46.7959,9.8316035],[46.7903262,9.8183656],[46.8033657,9.8375068],[46.7977206,9.8346073],[46.7919606,9.8171641],[46.8011936,9.8332912],[46.8027336,9.8310924],[46.7606938,9.7909641],[46.7896855,9.8201239],[46.7933834,9.8163438],[46.8090563,9.8428596],[46.7916221,9.8167355],[46.7920334,9.8162759],[46.7910531,9.8159159],[46.7992367,9.8234082],[46.8032409,9.8370446],[46.8090217,9.8419365],[46.7953906,9.8177826],[46.81242,9.8455],[46.7919907,9.8171842],[46.7125388,9.7712108],[46.8104843,9.8451346],[46.8092905,9.8414648],[46.7991446,9.832914],[46.791699,9.8165471],[46.7125202,9.7710576],[46.790042,9.8143645],[46.8092227,9.8412932],[46.80924,9.84137],[46.8015421,9.8299715],[46.7968565,9.8216083],[46.8027021,9.8355153],[46.8055486,9.840615],[46.7902369,9.8183496],[46.7952027,9.824685],[46.792827,9.8230021],[46.7898597,9.8188197],[46.8095476,9.8468754],[46.7891,9.81765],[46.8000486,9.8340618],[46.8019379,9.8325509],[46.80526,9.84841],[46.8027333,9.8445063],[46.7928197,9.8231416],[46.79367,9.82278],[46.8134,9.84728],[46.7952027,9.8247386],[46.7976606,9.82155],[46.82727,9.85474],[46.8008447,9.8344814],[46.8064657,9.8406559],[46.8093406,9.8413216],[46.81287,9.85214],[46.7952741,9.8241565],[46.7934564,9.8229576],[46.7942006,9.820254],[46.8064648,9.8358327],[46.7924141,9.8232719],[46.81259,9.84551],[46.7927,9.82349],[46.7934142,9.8164255],[46.8072631,9.8376134],[46.7886735,9.8189417],[46.8108286,9.8346804],[46.8077338,9.8381272],[46.8027988,9.8372805],[46.7952248,9.8247172],[46.81102,9.84481],[46.8036498,9.8361887],[46.7922906,9.817275],[46.7927831,9.8230664],[46.7917019,9.8165518],[46.7980631,9.8345149],[46.7991452,9.8329222],[46.7900686,9.8133921],[46.7991452,9.8329222],[46.8000266,9.8340886],[46.8089005,9.8434021],[46.7919493,9.82719],[46.8093406,9.8413216],[46.8092244,9.8438462],[46.8088483,9.8436036],[46.8118221,9.8470246],[46.8000322,9.8341701],[46.7941688,9.8190924],[46.80577,9.8366612],[46.8241406,9.8607052],[46.7920486,9.8182106],[46.8127688,9.8463501],[46.7982651,9.8230113],[46.8004,9.83383],[46.8110288,9.8447204],[46.7989393,9.8356224],[46.7126403,9.7706258],[46.80417,9.8324],[46.7964701,9.8248942],[46.8096954,9.840577],[46.7989015,9.8324205],[46.8072116,9.8443187],[46.7996141,9.8327975],[46.8091564,9.8442866],[46.78317,9.8099721],[46.8032933,9.8333546],[46.8408457,9.8712152],[46.8012747,9.8277206],[46.809,9.84283],[46.7126403,9.7706258],[46.7952817,9.8246849],[46.8408457,9.8712151],[46.8115893,9.8465346],[46.7935981,9.8226617],[46.8024638,9.8380283],[46.8091691,9.844291],[46.7913471,9.8162836],[46.80526,9.84841],[46.7919098,9.8176784],[46.7960929,9.8201547],[46.8100443,9.8443893],[46.7924857,9.8200622],[46.74074,9.7752],[46.7957628,9.8267893],[46.7928837,9.8248499],[46.5099999,9.8612383],[46.5146464,9.8547644],[46.5857178,9.9372886],[46.8002651,9.8277855],[46.796572,9.8214751],[46.57808,9.92007],[46.4883753,9.8403742],[46.51519,9.85558],[46.7538789,9.7835492],[46.8040027,9.837579],[46.7841898,9.8162371],[46.43149,9.75846],[46.7996141,9.8327975],[46.7927943,9.8229865],[46.7922,10.29161],[46.457874,9.813156],[46.42964,9.76165],[46.515248,9.858231],[46.43428,9.76359],[46.435938,9.7675329],[46.5146464,9.8547644],[46.516158,9.862805],[46.4627114,9.7968028],[46.83294,10.38064],[46.4359355,9.7672732],[46.77638,10.15525],[46.458825,9.797046],[46.4627114,9.7968028],[46.808384,9.8371631],[46.48683,9.8333162],[46.5004613,9.8432744],[46.808384,9.8371631],[46.792061,9.8166603],[46.7555128,9.7825241],[46.8002651,9.8277855],[46.4891952,9.8354489],[46.488567,9.8424808],[46.492779,9.835059],[46.8002651,9.8277855],[46.4919667,9.8335799],[46.7996961,10.2985605],[46.57339,9.93481],[46.7931207,10.247367],[46.42976,9.76404],[46.4027723,9.6968194],[47.09011,9.29902],[47.1514285,9.1553726],[47.1042054,9.2565247],[47.1478662,9.1758214],[47.1475327,9.1773552],[47.1475189,9.1541165],[47.0901929,9.2988807],[47.1490749,9.1399819],[47.1153083,9.2570248],[47.11583,9.25793],[46.79872,9.82414],[46.4883753,9.8403742],[47.0907193,9.3012437],[46.498426,9.844033],[47.0906616,9.3015375],[46.4852328,9.8323521],[46.4882698,9.8356401],[46.498764,9.8374597],[46.4809238,9.8160696],[47.089841,9.3040895],[46.80692,9.83409],[46.8054573,9.8440973],[46.7953722,9.8177971],[46.5095678,9.8616622],[47.1478396,9.1758092],[47.0904984,9.304457],[47.1516298,9.1413501],[46.4580346,9.8124086],[46.7978706,10.3020812],[46.7988366,10.2997389],[46.7933995,10.2940714],[46.77485,10.200503],[46.7982651,9.8230113],[46.799432,9.8322552],[46.7973714,9.8348933],[46.4989708,9.8966111],[46.4612389,9.7946487],[46.4627705,9.7966097],[46.7950325,10.2901424],[46.4627705,9.7966097],[46.7984495,10.3012327],[46.4597716,9.797576],[46.4290725,9.7649574],[46.4612334,9.7946465],[46.7865969,10.2847978],[46.7928128,10.2928285],[46.5809503,9.9219662],[46.4597482,9.7959433],[46.816468,10.3408921],[46.79281,10.2928386],[46.5096931,9.8598204],[46.7767202,10.1486533],[46.7949241,10.2922603],[46.459177,9.796743],[46.7964312,10.2526474],[46.7768763,10.1485807],[46.79721,10.30664],[46.55299,9.88993],[46.6983388,10.0976336],[46.7720735,10.1956745],[46.77611,10.15461],[46.7926943,10.2938676],[46.510595,9.858583],[46.5117472,9.8569496],[46.81913,10.3416435],[46.81742,10.34091],[46.7995676,10.2962274],[46.8166,10.33363],[46.4611317,9.7948486],[46.4585961,9.8107166],[46.595561,9.950312],[46.7976263,10.3032086],[47.0968355,9.2850784],[47.1127448,9.2419733],[46.4843287,9.8376702],[46.4896304,9.8359213],[46.4955659,9.8375839],[46.4891482,9.8343803],[46.4883782,9.8355532],[46.48963,9.83592],[46.48862,9.83802],[47.1153083,9.2570248],[47.1129,9.27366],[47.11283,9.27356],[47.1158301,9.2579397],[47.012435,9.5023367],[46.4575708,9.8114181],[46.7982169,10.2986786],[46.4579843,9.8135404],[46.4627705,9.7966097],[46.4616687,9.7964143],[46.4357211,9.7682455],[46.7922,10.29161],[46.48574,9.90755],[46.7947611,10.2909066],[46.7927604,10.290882],[46.6010193,9.9631989],[46.4627262,9.7967867],[46.4359355,9.7672732],[46.40656,9.69599],[47.11307,9.27327],[47.09011,9.29902],[47.0840909,9.3052],[47.08934,9.3048],[47.1490749,9.1399819],[47.1361465,9.0996163],[46.808384,9.8371631],[46.7937264,9.8152347],[46.8310213,9.859618],[46.80526,9.84844],[46.80526,9.84841],[46.7919163,9.8176838],[46.7983588,9.8225887],[46.7897573,9.8145355],[46.781377,9.8749955],[46.8043241,9.8330226],[46.80009,9.8275],[46.7939641,9.8186695],[46.4782248,9.8130534],[46.487275,9.8323903],[46.4882698,9.8356401],[46.8002651,9.8277855],[46.8011936,9.8332912],[46.57806,9.92006],[46.7926609,10.2937308],[46.4627114,9.7968028],[46.5535794,9.891331],[46.4579843,9.8135404],[46.43277,9.76615],[47.0043782,9.5392063],[47.1425525,9.16317],[47.1496785,9.1360454],[47.1488631,9.1375972],[47.1503783,9.1364144],[47.1493204,9.1429031],[47.1496535,9.1435361],[47.1486259,9.1357867],[47.147884,9.1758126],[47.147139,9.1671843],[47.11289,9.25131],[47.1425769,9.1624296],[47.1482693,9.1464328],[46.4926593,9.8352605],[46.4867345,9.8349723],[46.4928286,9.8350188],[46.4895127,9.8359552],[46.4884205,9.837406],[46.4873711,9.8325248],[46.4786235,9.8136651],[46.4940576,9.8369153],[46.4849695,9.8320309],[46.7968884,10.3044409],[46.50983,9.85953],[46.59662,9.94938],[46.5130716,9.8606849],[47.08357,9.30699],[47.04986,9.44067],[47.08365,9.33486],[47.0879,9.30195],[47.09361,9.29768],[47.01698,9.42295],[47.1147,9.15048],[47.08885,9.30588],[46.4973082,9.8350232],[46.4974338,9.8350768],[46.77611,10.15461],[46.42976,9.76404],[46.42998,9.76384],[46.79872,10.29574],[46.45849,9.81359],[46.7928086,9.8230344],[47.0049691,9.5032704],[47.0920819,9.2871889],[47.0833613,9.3066216],[47.1153083,9.2570248],[46.7927625,9.8170111],[46.8093755,9.8465007],[46.5002929,9.8428447],[46.4868242,9.8332824],[46.4868242,9.8332824],[46.4883782,9.8355532],[46.4866534,9.830708],[46.4864667,9.8404068],[46.4870555,9.8334099],[46.5034907,9.8465318],[46.4875089,9.8328176],[46.4933517,9.8352912],[46.4883782,9.8355532],[46.4883782,9.8355532],[46.5020769,9.8418942],[46.4974869,9.839558],[46.4883782,9.8355532],[46.4899857,9.8363568],[46.4883782,9.8355532],[46.4883782,9.8355532],[46.4883753,9.8403742],[46.4873397,9.831455],[46.4864902,9.8329028],[46.4771336,9.8134695],[46.4895127,9.8359552],[46.484052,9.8379806],[46.4873273,9.8371615],[46.489777,9.8345806],[46.4859316,9.8307934],[46.4978506,9.8383183],[46.4954953,9.8360637],[46.5032565,9.8460512],[46.4986225,9.8441318],[46.4887022,9.8352726],[46.4866534,9.830708],[46.4974869,9.839558],[46.4985324,9.8401342],[46.4985892,9.8401749],[46.4879702,9.8425062],[46.4768608,9.813171],[46.4768315,9.8132372],[46.4987598,9.8374593],[46.4791522,9.8122151],[46.5003728,9.8424702],[46.4883805,9.8355637],[46.5132752,9.856569],[46.5144288,9.8599243],[46.509987,9.8539248],[46.7922,10.29161],[46.4612269,9.7946479],[46.79879,10.29579],[46.4357211,9.7682455],[46.4627705,9.7966097],[46.4612073,9.7946022],[46.7975401,10.2962309],[46.7947712,10.246253],[46.4359355,9.7672732],[46.77581,10.15065],[46.53602,9.87527],[46.4612389,9.7946599],[46.798967,10.2990764],[46.8173639,10.3315195],[46.4612463,9.7946546],[46.4612186,9.7946143],[46.435938,9.7675329],[46.5102541,9.8548103],[46.7916568,10.2439785],[46.4359602,9.7668463],[46.79507,10.28751],[46.533242,9.8694644],[46.79662,10.30444],[46.4612389,9.7946519],[46.8178927,10.3379985],[46.4359355,9.7672732],[46.798171,10.304156],[46.5130716,9.8606849],[46.4612426,9.7946581],[46.7966498,10.2969176],[46.4627705,9.7966097],[46.7846,10.2655],[46.4627114,9.7968028],[46.4627114,9.7968028],[46.7980169,10.3007526],[46.7944768,10.2472049],[46.4579843,9.8135404],[46.4627114,9.7968028],[46.46125,9.7946599],[46.7745799,10.2003414],[46.4612264,9.7946145],[46.7828475,10.2688841],[46.4290332,9.7629252],[46.4627114,9.7968028],[46.79327,10.2469],[46.7869825,10.2824914],[46.7945,10.24693],[46.797549,10.296283],[46.87249,10.42616],[46.7874053,10.2826041],[46.5130716,9.8606849],[46.5117472,9.8569496],[46.7975221,10.3023379],[46.5095176,9.8598482],[46.79281,10.2928386],[47.12384,9.3161],[46.4972399,9.8513866],[46.4928286,9.8350188],[46.8108422,9.8452292],[46.4783711,9.8132931],[46.487275,9.8323903],[46.489534,9.846025],[46.498748,9.845965],[46.485234,9.836164],[46.499736,9.846485],[46.8000493,9.8363594],[46.8005138,9.8279276],[46.7920334,9.8162759],[47.1485842,9.1350772],[47.150526,9.1377356],[47.089554,9.297765],[47.149561,9.152649],[47.12748,9.303099],[47.109482,9.241411],[47.0012724,9.5008323],[46.997092,9.508715],[47.003443,9.526791],[47.122612,9.127117],[47.1475864,9.1752849],[47.00465,9.503767],[47.1506348,9.1350145],[47.1488176,9.1376202],[47.1478662,9.1758214],[47.122612,9.127117],[47.012829,9.493875],[47.149561,9.152649],[47.1511004,9.1355488],[47.0012724,9.5008323],[47.1425769,9.1624296],[47.000144,9.501714],[47.00502,9.503587],[46.796572,9.8214751],[46.8056764,9.8350951],[46.7896766,9.817679],[46.802307,9.84228],[46.48938,9.835379],[46.4852,9.8118],[46.487211,9.841401],[46.49723,9.83782],[46.484942,9.820444],[46.48871,9.90872],[46.7917019,9.8165518],[46.7955176,9.8256504],[47.1506348,9.1350145],[46.7922,10.29161],[46.8021548,9.8350926],[46.808384,9.8371631],[47.1153083,9.2570248],[46.48683,9.8333162],[46.4867237,9.8371725],[46.4890826,9.8354328],[46.5035113,9.8466149],[47.1153083,9.2570248],[47.0930202,9.2864218],[47.1492004,9.1441194],[47.1506064,9.135485],[46.8002651,9.8277855],[46.808384,9.8371631],[46.7977662,9.8346909],[46.8024506,9.8289531],[46.80234,9.8288],[46.7928485,9.8242931],[46.7977412,9.8210813],[46.7934933,9.8229093],[46.7928014,9.8230447],[46.8091711,9.8423661],[46.797812,9.82476],[46.8074087,9.8357635],[46.5102541,9.8548103],[46.461129,9.7944435],[46.5038847,9.8916455],[46.43391,9.75418],[46.79799,10.29919],[46.7995676,10.2962274],[46.4579843,9.8135404],[46.43439,9.76737],[46.49482,9.90102],[46.5144444,9.8632678],[46.49063,9.9067],[46.7986,10.30798],[46.4359602,9.7668463],[46.7950325,10.2901424],[46.4594308,9.807659],[46.45712,9.8142],[46.49125,9.90241],[46.40259,9.69537],[46.79708,10.29356],[46.45984,9.79486],[46.5044748,9.8905525],[46.7937065,10.3001429],[46.5777,9.91934],[46.808384,9.8371631],[46.7907404,9.8156617],[47.0066226,9.5045847],[47.0935151,9.2859793],[47.1157482,9.2554745],[46.53268,9.8672],[46.5299837,9.8776399],[46.60586,9.95932],[46.5513071,9.8876664],[46.4864902,9.8329028],[46.8081439,9.8431005],[46.792061,9.8166603],[46.8004899,9.8280377],[46.7907404,9.8156617],[46.8017615,9.8347858],[46.7917019,9.8165518],[46.793184,9.8158683],[46.4795257,9.8137264],[46.4888912,9.8410877],[46.7922,10.29161],[46.4579681,9.8123898],[46.45897,9.79624],[46.4348,9.76819],[46.50835,9.85541],[46.81609,10.33671],[46.79562,10.30375],[46.5157407,9.8579024],[46.5087342,9.854629],[46.540908,9.880276],[46.40317,9.69603],[46.76802,10.11152],[46.7931153,10.2929928],[47.0840909,9.3052],[47.1425769,9.1624296],[46.7922,10.29161],[46.79507,10.28751],[46.46035,9.81245],[46.578801,9.9251714],[46.55077,9.88638],[46.8095,9.8439],[46.813093,9.8473261],[47.0066226,9.5045847],[46.4864902,9.8329028],[46.5003778,9.8424854],[46.4974338,9.8350768],[46.5003778,9.8424854],[46.42962,9.76172],[46.79507,10.28751],[46.53356,9.87151],[46.8065173,9.8349797],[46.7994359,9.834332],[46.53142,9.86707],[46.57727,9.91929],[46.63546,10.00369],[46.57768,9.91934],[46.48833,9.90808],[46.48575,9.90755],[46.5777,9.91934],[46.8060402,9.8353964],[46.8036977,9.8376663],[46.8011118,9.8354996],[46.788164,9.8168449],[46.48858,9.84293],[46.4888912,9.8410877],[46.8023642,9.8422554],[46.801556,9.8299734],[46.7973714,9.8348933],[46.5087342,9.854629],[46.48574,9.90755],[46.8048063,9.8363263],[46.83288,9.86139],[46.50247,9.89314],[46.51519,9.85558],[46.42976,9.76371],[46.69963,10.09708],[46.4904722,9.8346281],[46.4597716,9.797576],[46.4947833,9.9015727],[46.51441,9.85995],[46.53828,9.87443],[46.84322,10.36396],[46.4585704,9.8136476],[46.5107348,9.8545681],[46.80115,10.32385],[46.4928286,9.8350188],[46.476958,9.8115782],[46.8002651,9.8277855],[46.808384,9.8371631],[46.7933995,10.2940714],[46.435742,9.7679085],[46.4883233,9.8402706],[46.5023548,9.8455593],[46.4863272,9.8405407],[46.4945882,9.835511],[47.14742,9.17259],[47.1153083,9.2570248],[46.7867591,10.2824861],[46.5146464,9.8547644],[46.798171,10.304156],[46.77342,10.24088],[46.4359355,9.7672732],[46.7769303,10.14863],[46.8359533,10.3839248],[46.435742,9.7679085],[46.458075,9.8138077],[46.8175149,10.3390633],[46.5102499,9.860383],[46.4033327,9.6953544],[46.79482,10.29087],[46.84263,10.36523],[46.79714,10.25598],[46.4972455,9.8984215],[46.83294,10.38064],[46.75185,10.08304],[46.4975617,9.9001702],[46.8187,10.34078],[46.81794,10.3348],[46.71651,10.33279],[46.4357605,9.7681981],[46.7951084,10.2993173],[46.5372751,9.8731929],[46.79606,10.2534],[46.8,10.29],[46.4972811,9.8985026],[46.798669,10.2945311],[46.8,10.29635],[46.7968292,10.2945557],[46.79474,10.29203],[46.83574,10.38348],[46.4359602,9.7668463],[46.51512,9.857196],[46.4627705,9.7966097],[46.7932538,10.2463283],[46.4359355,9.7672732],[46.4335148,9.7652588],[46.5130716,9.8606849],[46.7984951,10.3044183],[46.5378877,9.8757008],[46.7995306,10.2973223],[46.435975,9.7666317],[46.536348,9.869786],[46.536915,9.871366],[46.79859,10.30793],[46.435938,9.7675329],[46.794893,10.245839],[46.6004187,9.9624177],[46.8183312,10.3343504],[46.4357605,9.7681981],[46.4357605,9.7681981],[46.46125,9.7946546],[46.43574,9.7679],[46.81621,10.33849],[46.7976162,10.2954692],[46.79811,10.2939],[46.486563,9.8311711],[46.4883782,9.8355532],[46.4852478,9.8316748],[46.498426,9.844033],[46.4980738,9.8498749],[46.4974869,9.839558],[46.47591,9.8105111],[46.497987,9.8351241],[46.486404,9.8416679],[46.4763346,9.8103601],[46.4915284,9.8338491],[46.5032761,9.84604],[46.4883753,9.8403742],[46.4809147,9.8159934],[46.4918196,9.8345876],[46.4971764,9.8369717],[46.4886203,9.838023],[46.4955609,9.8375856],[46.47591,9.8105111],[46.4865151,9.8403382],[46.4867276,9.8349994],[46.5012405,9.8427173],[46.4952387,9.8375284],[46.4939895,9.8359017],[47.1153083,9.2570248],[46.7936738,9.8227883],[46.7957628,9.8267893],[46.7936842,9.815117],[47.0901061,9.2989447],[47.129615,9.2157081],[46.5099999,9.8612383],[46.43487,9.76814],[46.51131,9.85454],[46.4345,9.76413],[46.48825,9.84021],[46.476958,9.8115782],[46.48672,9.83499],[46.4840021,9.8379366],[46.4993865,9.8339949],[46.5291913,9.8666497],[46.49482,9.90102],[46.5741978,9.9339454],[46.5302,9.86576],[46.435742,9.7679085],[46.4359602,9.7668463],[46.8021741,9.8379699],[46.49938,9.83399],[46.53004,9.86513],[46.51441,9.8582489],[46.601176,9.9632941],[46.54069,9.87994],[47.0912434,9.2869589],[46.7831457,9.8100102],[46.79995,9.83573],[46.8088414,9.8388685],[46.5035334,9.8466163],[46.50353,9.84661],[46.4357605,9.7681981],[46.435975,9.7666317],[46.4357605,9.7681981],[47.07394,9.33306],[46.81242,9.8455],[46.79943,9.83494],[46.80003,9.83417],[46.80299,9.84727],[46.7962623,9.821487],[46.42952,9.76338],[46.40347,9.70018],[46.49471,9.90178],[46.42934,9.76251],[46.42973,9.7631],[46.435938,9.7675329],[46.55061,9.88737],[46.5095176,9.8598482],[46.435742,9.7679085],[46.49003,9.90705],[46.43574,9.7679],[46.40288,9.69688],[46.69961,10.09719],[46.579,9.9266],[46.55299,9.88993],[46.435742,9.7679085],[46.7959,10.25358],[46.4786218,9.8127465],[46.808384,9.8371631],[46.801281,9.8367901],[46.7952027,9.8247386],[46.50201,9.89395],[46.50286,9.89314],[46.43417,9.76763],[46.530023,9.8685765],[46.50801,9.84979],[46.59637,9.95279],[46.5302,9.86576],[46.49741,9.83863],[46.4861438,9.8311151],[46.435742,9.7679085],[47.0891359,9.3055391],[46.55109,9.88753],[46.49105,9.90237],[46.55139,9.88758],[46.5082775,9.8499773],[46.57768,9.91934],[46.43277,9.76619],[46.4994976,9.8398021],[47.09011,9.29902],[46.801272,9.8368],[46.42985,9.76558],[46.4894,9.90734],[46.42979,9.76357],[47.0049691,9.5032704],[47.0892584,9.3007361],[47.0833613,9.3066216],[47.1499502,9.1443628],[47.096499,9.2853117],[47.0936476,9.2818338],[47.0927402,9.2854428],[47.0937561,9.2973089],[47.0861812,9.3064284],[47.090429,9.2995673],[47.0944135,9.286387],[46.9878323,9.4672584],[47.0910804,9.2949446],[47.0931535,9.2877159],[47.0932529,9.2878113],[47.0934375,9.2851989],[47.096499,9.2853117],[46.5023548,9.8455593],[46.43399,9.76538],[46.79562,10.30375],[46.7957762,9.8253091],[46.7952244,9.824758],[46.8079927,9.8425037],[46.808384,9.8371631],[46.7929879,9.8168351],[46.808384,9.8371631],[47.1153083,9.2570248],[46.9896178,9.4646057],[46.503276,9.84604],[46.5023548,9.8455593],[46.801272,9.8368],[46.4597716,9.797576],[46.7948484,10.2532831],[46.4612334,9.7946179]] - -const chartDom = document.getElementById('extractions'); -const myChart = echarts.init(chartDom); - -const filters = { - regions: ["Davos", "Engadin", "Heidiland", "St. Moritz"] -} - -const option = { - tooltip: { - trigger: 'axis' - }, - legend: { - data: filters.regions - }, - grid: { - left: '0', - right: 10, - bottom: '0', - containLabel: true - }, - xAxis: { - type: 'category', - boundaryGap: false, - data: ['2024-04-14','2024-04-15','2024-04-16','2024-04-19','2024-04-22','2024-04-25','2024-04-28','2024-05-01','2024-05-04','2024-05-07','2024-05-10','2024-05-13','2024-05-16','2024-05-19','2024-05-22','2024-05-25','2024-05-28','2024-05-31','2024-06-01','2024-06-04','2024-06-07','2024-06-10','2024-06-13','2024-06-16','2024-06-19','2024-06-22','2024-06-25','2024-06-28','2024-07-01','2024-07-04','2024-07-07','2024-07-10','2024-07-13','2024-07-16','2024-07-19','2024-07-22','2024-07-25','2024-07-28','2024-07-31','2024-08-01','2024-08-04','2024-08-07','2024-08-10','2024-08-13','2024-08-16','2024-08-19','2024-08-22'] - }, - yAxis: { - type: 'value' - }, - series: [ - { - name: 'Alle', - type: 'line', - stack: 'Total', - data: [596, 239, 835, 673, 863, 1803, 904, 915, 958, 966, 1001, 1031, 1044, 1055, 1158, 1162, 1181, 1203, 1207, 1214, 1254, 1258, 1264, 1288, 1296, 1305, 1318, 1323, 1330, 1333, 1342, 1350, 1436, 1454, 1461, 1469, 1492, 1504, 1506, 1510, 1512, 1518, 1534, 1535, 1541, 1544, 1500] - }, - { - name: 'Heidiland', - type: 'line', - stack: 'Heidiland', - data: [133,64,197,151,197,417,210,213,215,220,226,239,247,251,251,252,262,275,276,277,281,283,284,286,287,287,287,287,287,287,287,289,290,292,293,294,294,294,295,295,295,296,312,313,313,313,301] - }, - { - name: 'Davos', - type: 'line', - stack: 'Davos', - data: [133,56,189,152,196,409,206,209,209,209,221,223,223,224,226,227,230,234,236,238,250,252,252,259,261,263,267,270,272,272,274,274,277,278,279,281,286,289,289,289,289,290,290,290,293,296,285] - }, - { - name: 'Engadin', - type: 'line', - stack: 'Engadin', - data: [185,73,258,212,278,569,284,289,326,326,340,346,350,355,413,413,413,413,414,415,438,438,442,455,460,463,470,472,477,479,484,486,544,554,558,561,578,585,586,590,592,595,595,595,597,597,583] - }, - { - name: 'St. Moritz', - type: 'line', - stack: 'St. Moritz', - data: [145,46,191,158,192,408,204,204,208,211,214,223,224,225,268,270,276,281,281,284,285,285,286,288,288,292,294,294,294,295,297,301,325,330,331,333,334,336,336,336,336,337,337,337,338,338,331] - }, - ] -}; - -option && myChart.setOption(option); - -const map = L.map('leaflet').setView([46.862962, 9.535296], 9); - -L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { - maxZoom: 19, - attribution: '© OpenStreetMap' -}).addTo(map); - -properties.forEach( prop => { - L.marker(prop).addTo(map); -}) - -function getVirtualData(year) { - const date = +echarts.time.parse(year + '-01-01'); - const end = +echarts.time.parse(+year + 1 + '-01-01'); - const dayTime = 3600 * 24 * 1000; - const data = []; - for (let time = date; time < end; time += dayTime) { - data.push([ - echarts.time.format(time, '{yyyy}-{MM}-{dd}', false), - Math.floor(Math.random() * 10000) - ]); - } - return data; -} - - -const sharedData = { - extractionDates: ['2024-04-14','2024-04-15','2024-04-16','2024-04-19','2024-04-22','2024-04-25','2024-04-28','2024-05-01','2024-05-04','2024-05-07','2024-05-10','2024-05-13','2024-05-16','2024-05-19','2024-05-22','2024-05-25','2024-05-28','2024-05-31','2024-06-01','2024-06-04','2024-06-07','2024-06-10','2024-06-13','2024-06-16','2024-06-19','2024-06-22','2024-06-25','2024-06-28','2024-07-01','2024-07-04','2024-07-07','2024-07-10','2024-07-13','2024-07-16','2024-07-19','2024-07-22','2024-07-25','2024-07-28','2024-07-31','2024-08-01','2024-08-04','2024-08-07','2024-08-10','2024-08-13','2024-08-16','2024-08-19','2024-08-22'] -} - - -async function getCalData(ext_date){ - - return new Promise((res, rej) => { - - fetch(`/calendar/${ext_date}.json`) - .then(r => r.json()) - .then(json => { - - let data = [] - - for (const [key, val] of Object.entries(json[0])){ - data.push([key, val]) - } - - res(data) - - }) - }) - -} - -let test = [["2024-09-08",204],["2025-06-05",105],["2024-12-15",175],["2025-09-11",103],["2025-06-30",104],["2024-10-15",201],["2024-09-13",204],["2025-10-15",82],["2024-08-09",143],["2025-01-10",145],["2024-11-13",212],["2025-02-21",88],["2024-11-26",187],["2024-10-22",221],["2024-11-14",214],["2025-02-14",92],["2024-05-27",175],["2024-09-11",206],["2025-04-28",107],["2024-08-03",139],["2025-05-25",105],["2025-10-10",92],["2025-10-26",70],["2025-03-06",109],["2024-12-14",181],["2025-01-05",147],["2024-06-19",167],["2024-06-28",174],["2024-08-10",162],["2025-06-14",107],["2025-10-03",92],["2024-12-22",126],["2025-04-23",107],["2025-05-11",105],["2025-08-23",103],["2024-07-16",149],["2025-08-05",103],["2024-04-25",171],["2025-01-23",148],["2024-10-06",197],["2025-02-16",95],["2024-12-23",116],["2025-03-13",142],["2025-09-01",96],["2024-12-16",179],["2024-08-22",160],["2024-09-28",228],["2024-10-25",220],["2025-08-03",104],["2024-05-25",189],["2024-08-20",158],["2024-08-24",170],["2024-07-12",166],["2024-11-08",220],["2025-03-01",130],["2025-07-13",104],["2024-06-11",181],["2024-08-01",91],["2025-05-29",105],["2025-07-19",107],["2025-10-13",92],["2024-08-07",140],["2024-11-15",216],["2025-04-03",140],["2024-09-20",205],["2025-03-14",144],["2025-06-24",105],["2025-01-19",154],["2024-05-20",171],["2024-08-21",161],["2025-10-23",73],["2024-07-30",108],["2024-11-03",215],["2025-01-04",143],["2025-04-12",111],["2025-08-14",103],["2025-07-05",107],["2025-06-17",105],["2024-06-13",187],["2024-11-12",213],["2025-03-07",110],["2024-04-23",175],["2025-07-06",104],["2025-10-12",92],["2024-12-19",176],["2024-07-18",145],["2024-08-13",145],["2024-07-08",167],["2025-02-11",88],["2024-07-25",150],["2025-02-18",88],["2024-06-27",178],["2024-10-05",212],["2024-05-18",162],["2025-09-05",103],["2025-10-17",72],["2024-07-05",158],["2024-11-20",210],["2024-10-28",215],["2024-05-07",159],["2025-02-27",121],["2025-06-02",105],["2025-04-10",136],["2024-11-25",188],["2024-12-12",174],["2024-11-28",188],["2025-07-12",107],["2025-08-25",95],["2025-10-16",72],["2024-12-25",93],["2024-12-27",94],["2025-09-18",103],["2025-08-16",107],["2024-05-14",169],["2024-06-23",168],["2025-07-08",103],["2025-06-07",107],["2024-05-30",158],["2025-03-26",140],["2025-10-25",75],["2025-05-28",105],["2025-03-08",149],["2024-05-05",158],["2025-04-18",107],["2025-07-22",103],["2024-06-18",165],["2024-11-01",216],["2024-11-02",227],["2025-04-01",142],["2024-04-30",154],["2024-05-26",181],["2025-08-19",102],["2024-09-03",198],["2025-05-08",105],["2025-01-24",144],["2024-08-15",142],["2025-03-27",143],["2024-07-24",147],["2024-12-10",175],["2024-05-19",152],["2024-12-24",96],["2025-03-29",154],["2025-06-23",105],["2025-09-26",95],["2024-09-04",201],["2024-09-09",209],["2024-04-28",159],["2024-05-10",137],["2024-08-18",155],["2024-11-21",212],["2024-09-01",206],["2024-07-22",149],["2025-01-09",146],["2025-01-28",99],["2024-09-02",203],["2025-02-23",121],["2025-05-23",105],["2025-10-29",67],["2024-06-03",180],["2025-04-21",107],["2025-09-17",103],["2025-08-18",103],["2025-05-02",101],["2025-10-04",95],["2024-07-20",168],["2024-11-24",192],["2024-06-10",179],["2025-01-21",146],["2024-09-22",219],["2025-02-15",112],["2024-10-14",201],["2025-05-22",105],["2025-06-21",107],["2025-07-17",103],["2024-12-21",161],["2024-12-29",66],["2024-12-11",172],["2024-07-14",159],["2024-08-17",162],["2024-10-01",197],["2025-01-31",106],["2025-04-26",111],["2024-12-28",88],["2024-08-27",173],["2025-03-16",150],["2025-01-27",103],["2025-06-01",105],["2024-04-14",65],["2024-12-26",99],["2025-04-16",107],["2025-08-02",107],["2025-03-30",147],["2025-08-31",87],["2024-09-29",213],["2025-03-28",143],["2024-12-07",189],["2025-10-28",67],["2024-09-10",207],["2025-03-25",144],["2024-11-10",221],["2025-05-27",105],["2025-08-15",104],["2025-10-24",73],["2024-10-27",222],["2024-04-16",74],["2024-12-02",179],["2025-01-13",159],["2025-05-16",105],["2024-09-21",223],["2025-09-24",99],["2025-07-30",103],["2024-11-07",218],["2025-07-31",103],["2025-03-10",143],["2025-07-29",103],["2025-09-22",103],["2024-08-30",181],["2024-10-12",223],["2025-03-05",105],["2025-02-20",89],["2024-05-08",160],["2025-04-19",111],["2024-10-13",205],["2025-06-15",105],["2025-10-20",73],["2024-08-02",88],["2025-10-31",67],["2024-07-01",171],["2025-08-17",105],["2025-03-02",114],["2024-09-26",213],["2024-07-28",139],["2025-02-06",93],["2024-07-07",172],["2025-06-22",105],["2024-10-18",204],["2025-01-22",145],["2025-07-02",104],["2024-08-29",176],["2025-06-08",105],["2024-05-13",171],["2025-09-07",103],["2025-10-18",75],["2025-02-22",129],["2024-06-21",162],["2025-04-07",141],["2025-09-04",100],["2024-05-21",178],["2024-07-21",154],["2024-12-01",180],["2024-04-29",163],["2025-05-20",105],["2025-02-04",90],["2025-06-28",107],["2025-09-16",103],["2025-01-07",143],["2025-06-03",105],["2024-12-06",178],["2024-10-21",221],["2024-04-20",188],["2025-06-06",105],["2025-07-09",103],["2025-01-18",165],["2025-05-30",105],["2025-02-01",113],["2025-02-28",126],["2025-09-08",103],["2025-10-07",92],["2025-05-19",105],["2024-08-23",160],["2024-07-17",146],["2025-04-14",107],["2025-06-04",105],["2025-09-19",103],["2025-10-09",92],["2024-04-26",164],["2024-06-17",168],["2024-10-08",197],["2024-10-10",202],["2024-05-11",147],["2024-11-22",214],["2024-05-03",149],["2024-06-16",177],["2024-12-08",177],["2025-01-15",152],["2024-07-10",163],["2024-12-13",172],["2025-04-22",107],["2024-10-07",198],["2025-01-25",140],["2025-04-20",107],["2024-06-12",181],["2025-06-27",105],["2024-07-15",154],["2024-09-17",208],["2024-09-27",208],["2024-12-05",178],["2025-09-28",92],["2025-02-05",90],["2024-07-09",162],["2024-11-23",215],["2025-07-28",103],["2025-08-04",103],["2024-11-30",195],["2025-06-29",104],["2024-05-06",155],["2025-06-19",105],["2024-05-31",153],["2025-03-20",148],["2024-11-27",186],["2024-10-24",221],["2025-03-09",142],["2025-09-21",103],["2024-10-30",213],["2025-01-20",152],["2025-03-15",161],["2024-06-09",184],["2024-07-26",153],["2024-12-09",176],["2025-05-01",101],["2025-07-20",104],["2025-10-06",92],["2025-08-24",99],["2025-04-08",141],["2024-07-02",170],["2025-03-18",145],["2025-09-06",105],["2025-10-14",92],["2024-10-16",200],["2024-08-05",136],["2024-06-26",180],["2024-07-19",149],["2024-11-05",215],["2025-05-09",105],["2025-09-03",98],["2025-08-11",103],["2024-06-24",168],["2025-09-02",100],["2024-11-04",216],["2025-04-15",107],["2025-09-30",92],["2024-09-16",207],["2024-08-16",144],["2025-02-07",94],["2025-01-30",104],["2025-10-21",73],["2024-08-06",137],["2024-06-08",195],["2025-06-25",105],["2025-02-19",88],["2025-08-13",103],["2025-10-05",92],["2024-06-07",182],["2025-09-23",103],["2025-09-27",96],["2024-06-14",184],["2025-02-09",94],["2024-07-06",186],["2024-06-25",179],["2025-02-17",87],["2024-12-31",56],["2025-05-13",105],["2024-06-20",163],["2025-03-31",146],["2025-01-02",74],["2025-02-12",88],["2024-04-27",172],["2025-08-08",104],["2025-10-02",92],["2024-07-11",161],["2024-08-19",153],["2024-09-12",206],["2024-10-11",204],["2025-04-06",141],["2025-07-11",104],["2025-07-25",104],["2025-01-12",153],["2025-04-13",107],["2025-07-07",103],["2024-08-25",171],["2024-06-04",183],["2025-02-10",87],["2025-05-31",107],["2025-10-01",92],["2025-06-11",105],["2024-12-20",170],["2025-10-30",67],["2025-04-29",107],["2025-05-03",103],["2024-05-28",173],["2025-01-16",155],["2025-09-09",103],["2024-10-04",195],["2025-08-10",104],["2025-09-25",95],["2025-03-22",160],["2025-06-18",105],["2024-08-28",178],["2025-02-03",92],["2025-10-08",92],["2025-03-12",137],["2024-08-11",151],["2025-03-21",150],["2024-04-15",69],["2024-07-29",126],["2024-10-02",192],["2025-04-11",124],["2025-07-21",103],["2025-08-28",85],["2025-08-30",85],["2025-05-21",105],["2024-12-03",178],["2024-05-09",150],["2025-07-15",103],["2025-07-16",103],["2025-09-10",103],["2024-05-02",149],["2025-01-14",154],["2024-10-29",211],["2024-06-06",179],["2025-04-17",107],["2025-05-10",107],["2024-06-22",177],["2024-10-23",219],["2025-03-23",151],["2024-11-18",212],["2025-06-13",105],["2025-07-24",103],["2024-11-16",227],["2025-08-20",101],["2024-08-12",149],["2025-09-29",92],["2024-09-19",207],["2025-04-09",138],["2025-04-30",105],["2025-10-19",73],["2025-08-09",107],["2024-09-15",203],["2025-06-26",105],["2025-01-26",110],["2025-09-14",103],["2025-07-27",104],["2024-11-19",211],["2025-07-14",103],["2025-08-29",85],["2024-05-15",173],["2025-04-24",107],["2024-05-01",153],["2024-04-18",163],["2025-04-02",140],["2025-06-09",105],["2024-12-30",66],["2025-07-23",103],["2024-09-24",217],["2024-09-06",200],["2025-10-11",95],["2025-05-18",105],["2025-01-17",152],["2024-05-24",173],["2024-05-29",169],["2025-07-18",104],["2025-09-12",103],["2024-09-18",208],["2025-05-17",107],["2025-10-27",67],["2024-08-31",205],["2024-11-06",214],["2025-05-12",105],["2024-09-14",215],["2025-05-15",105],["2024-07-27",163],["2025-08-07",103],["2024-05-22",175],["2025-05-07",105],["2025-05-14",105],["2024-05-04",158],["2024-10-19",230],["2025-05-05",105],["2024-04-17",159],["2025-05-26",105],["2024-09-23",217],["2024-04-22",173],["2025-05-24",107],["2025-02-02",96],["2025-03-04",106],["2025-04-05",150],["2025-09-15",103],["2025-06-20",105],["2025-08-21",100],["2025-01-01",56],["2024-10-09",196],["2024-07-13",179],["2024-10-03",192],["2025-08-22",101],["2024-05-12",166],["2024-08-08",141],["2024-06-05",181],["2025-08-27",89],["2025-01-11",165],["2025-01-29",100],["2024-04-21",180],["2024-08-26",175],["2024-06-15",189],["2024-09-07",214],["2024-11-09",232],["2024-07-23",145],["2025-03-17",149],["2024-11-11",216],["2025-07-03",104],["2024-09-30",202],["2025-07-26",107],["2024-05-17",160],["2024-06-30",176],["2024-10-26",235],["2025-04-25",107],["2025-03-03",111],["2025-02-08",108],["2025-09-13",105],["2024-10-17",202],["2024-04-24",173],["2025-07-10",103],["2025-08-06",103],["2025-05-04",105],["2025-08-01",104],["2025-07-04",104],["2024-08-04",141],["2025-03-11",138],["2025-06-10",105],["2025-03-24",149],["2025-08-26",94],["2025-02-25",118],["2025-08-12",103],["2024-11-17",214],["2024-06-01",170],["2024-12-18",172],["2025-01-08",144],["2025-02-26",117],["2025-04-27",107],["2024-07-03",169],["2024-05-16",167],["2024-06-02",182],["2025-10-22",73],["2024-09-25",214],["2025-05-06",105],["2024-05-23",168],["2025-02-13",89],["2025-01-06",149],["2024-11-29",189],["2025-03-19",144],["2025-04-04",143],["2025-09-20",105],["2025-02-24",119],["2025-07-01",104],["2024-07-31",89],["2025-06-16",105],["2025-01-03",105],["2024-10-20",224],["2024-10-31",214],["2024-12-04",176],["2024-04-19",170],["2024-06-29",186],["2025-06-12",105],["2024-07-04",162],["2024-08-14",142],["2024-09-05",201],["2024-12-17",174]] -let test2 = [["2024-09-08",92],["2025-06-05",32],["2024-12-15",80],["2025-09-11",30],["2025-06-30",33],["2024-10-15",92],["2024-09-13",99],["2025-10-15",30],["2024-08-09",71],["2025-01-10",51],["2024-11-13",99],["2025-02-21",43],["2024-11-26",87],["2024-10-22",98],["2024-11-14",100],["2025-02-14",35],["2024-05-27",86],["2024-09-11",96],["2025-04-28",34],["2024-08-03",73],["2025-05-25",34],["2025-10-10",28],["2025-10-26",26],["2025-03-06",47],["2024-12-14",87],["2025-01-05",56],["2024-06-19",84],["2024-06-28",84],["2024-08-10",80],["2025-06-14",32],["2025-10-03",28],["2024-12-22",67],["2025-04-23",34],["2025-05-11",34],["2025-08-23",32],["2024-07-16",71],["2025-08-05",33],["2024-04-25",81],["2025-01-23",47],["2024-10-06",91],["2025-02-16",44],["2024-12-23",66],["2025-03-13",49],["2025-09-01",28],["2024-12-16",83],["2024-08-22",86],["2024-09-28",102],["2024-10-25",98],["2025-08-03",33],["2024-05-25",82],["2024-08-20",83],["2024-08-24",101],["2024-07-12",75],["2024-11-08",98],["2025-03-01",54],["2025-07-13",29],["2024-06-11",73],["2024-08-01",44],["2025-05-29",31],["2025-07-19",31],["2025-10-13",28],["2024-08-07",74],["2024-11-15",100],["2025-04-03",55],["2024-09-20",102],["2025-03-14",50],["2025-06-24",34],["2025-01-19",49],["2024-05-20",76],["2024-08-21",88],["2025-10-23",26],["2024-07-30",63],["2024-11-03",95],["2025-01-04",62],["2025-04-12",32],["2025-08-14",31],["2025-07-05",32],["2025-06-17",32],["2024-06-13",76],["2024-11-12",99],["2025-03-07",47],["2024-04-23",84],["2025-07-06",30],["2025-10-12",28],["2024-12-19",80],["2024-07-18",75],["2024-08-13",80],["2024-07-08",82],["2025-02-11",35],["2024-07-25",79],["2025-02-18",43],["2024-06-27",80],["2024-10-05",99],["2024-05-18",82],["2025-09-05",29],["2025-10-17",26],["2024-07-05",84],["2024-11-20",99],["2024-10-28",102],["2024-05-07",82],["2025-02-27",50],["2025-06-02",32],["2025-04-10",53],["2024-11-25",87],["2024-12-12",81],["2024-11-28",87],["2025-07-12",30],["2025-08-25",30],["2025-10-16",28],["2024-12-25",60],["2024-12-27",52],["2025-09-18",32],["2025-08-16",34],["2024-05-14",79],["2024-06-23",80],["2025-07-08",30],["2025-06-07",32],["2024-05-30",75],["2025-03-26",57],["2025-10-25",26],["2025-05-28",32],["2025-03-08",53],["2024-05-05",87],["2025-04-18",34],["2025-07-22",31],["2024-06-18",83],["2024-11-01",102],["2024-11-02",104],["2025-04-01",56],["2024-04-30",82],["2024-05-26",78],["2025-08-19",32],["2024-09-03",94],["2025-05-08",34],["2025-01-24",47],["2024-08-15",77],["2025-03-27",58],["2024-07-24",80],["2024-12-10",83],["2024-05-19",75],["2024-12-24",63],["2025-03-29",65],["2025-06-23",34],["2025-09-26",30],["2024-09-04",91],["2024-09-09",94],["2024-04-28",83],["2024-05-10",69],["2024-08-18",85],["2024-11-21",100],["2024-09-01",91],["2024-07-22",80],["2025-01-09",52],["2025-01-28",38],["2024-09-02",96],["2025-02-23",51],["2025-05-23",34],["2025-10-29",26],["2024-06-03",73],["2025-04-21",34],["2025-09-17",32],["2025-08-18",32],["2025-05-02",32],["2025-10-04",28],["2024-07-20",90],["2024-11-24",89],["2024-06-10",76],["2025-01-21",47],["2024-09-22",102],["2025-02-15",53],["2024-10-14",91],["2025-05-22",34],["2025-06-21",34],["2025-07-17",29],["2024-12-21",77],["2024-12-29",46],["2024-12-11",82],["2024-07-14",74],["2024-08-17",86],["2024-10-01",91],["2025-01-31",39],["2025-04-26",34],["2024-12-28",52],["2024-08-27",95],["2025-03-16",58],["2025-01-27",37],["2025-06-01",30],["2025-08-02",32],["2024-12-26",56],["2025-04-16",34],["2025-08-31",26],["2025-03-30",57],["2024-09-29",93],["2025-03-28",59],["2024-12-07",87],["2025-10-28",26],["2024-09-10",93],["2025-03-25",57],["2024-11-10",99],["2025-05-27",32],["2025-08-15",31],["2025-10-24",26],["2024-10-27",98],["2024-04-16",47],["2024-12-02",88],["2025-01-13",52],["2025-05-16",34],["2024-09-21",110],["2025-09-24",31],["2025-07-30",31],["2024-11-07",98],["2025-07-31",31],["2025-03-10",49],["2025-07-29",31],["2025-09-22",32],["2024-08-30",97],["2024-10-12",102],["2025-03-05",46],["2025-02-20",43],["2024-05-08",80],["2025-04-19",34],["2024-10-13",92],["2025-06-15",32],["2025-10-20",26],["2024-08-02",45],["2025-10-31",26],["2024-07-01",89],["2025-08-17",32],["2025-03-02",49],["2024-09-26",102],["2024-07-28",73],["2025-02-06",33],["2024-07-07",85],["2025-06-22",33],["2024-10-18",91],["2025-01-22",46],["2025-07-02",33],["2024-08-29",98],["2025-06-08",32],["2024-05-13",79],["2025-09-07",30],["2025-10-18",26],["2025-02-22",54],["2024-06-21",87],["2025-04-07",53],["2025-09-04",28],["2024-05-21",82],["2024-07-21",77],["2024-12-01",87],["2024-04-29",82],["2025-05-20",34],["2025-02-04",33],["2025-06-28",34],["2025-09-16",32],["2025-01-07",52],["2025-06-03",32],["2024-12-06",86],["2024-10-21",100],["2024-04-20",92],["2025-06-06",32],["2025-07-09",30],["2025-01-18",57],["2025-05-30",30],["2025-02-01",46],["2025-02-28",50],["2025-09-08",30],["2025-10-07",28],["2025-05-19",34],["2024-08-23",85],["2024-07-17",75],["2025-04-14",34],["2025-06-04",32],["2025-09-19",32],["2025-10-09",28],["2024-04-26",76],["2024-06-17",85],["2024-10-08",96],["2024-10-10",99],["2024-05-11",71],["2024-11-22",100],["2024-05-03",78],["2024-06-16",87],["2024-12-08",82],["2025-01-15",50],["2024-07-10",74],["2024-12-13",79],["2025-04-22",34],["2024-10-07",98],["2025-01-25",51],["2025-04-20",34],["2024-06-12",74],["2025-06-27",34],["2024-07-15",72],["2024-09-17",98],["2024-09-27",99],["2024-12-05",86],["2025-09-28",30],["2025-02-05",33],["2024-07-09",77],["2024-11-23",100],["2025-07-28",31],["2025-08-04",33],["2024-11-30",92],["2025-06-29",34],["2024-05-06",85],["2025-06-19",32],["2024-05-31",70],["2025-03-20",58],["2024-11-27",87],["2024-10-24",97],["2025-03-09",49],["2025-09-21",32],["2024-10-30",101],["2025-01-20",48],["2025-03-15",66],["2024-06-09",77],["2024-07-26",80],["2024-12-09",83],["2025-05-01",32],["2025-07-20",30],["2025-10-06",28],["2025-08-24",30],["2025-04-08",53],["2024-07-02",90],["2025-03-18",57],["2025-09-06",31],["2025-10-14",28],["2024-10-16",92],["2024-08-05",71],["2024-06-26",83],["2024-07-19",74],["2024-11-05",97],["2025-05-09",34],["2025-09-03",28],["2025-08-11",31],["2024-06-24",84],["2025-09-02",28],["2024-11-04",97],["2025-04-15",34],["2025-09-30",30],["2024-09-16",99],["2024-08-16",78],["2025-02-07",33],["2025-01-30",38],["2025-10-21",26],["2024-08-06",72],["2024-06-08",80],["2025-06-25",34],["2025-02-19",43],["2025-08-13",31],["2025-10-05",28],["2024-06-07",78],["2025-09-23",32],["2025-09-27",30],["2024-06-14",76],["2025-02-09",36],["2024-07-06",94],["2024-06-25",84],["2025-02-17",41],["2024-12-31",44],["2025-05-13",34],["2024-06-20",87],["2025-03-31",57],["2025-01-02",43],["2025-02-12",35],["2024-04-27",76],["2025-08-08",32],["2025-10-02",28],["2024-07-11",73],["2024-08-19",88],["2024-09-12",96],["2024-10-11",98],["2025-04-06",53],["2025-07-11",30],["2025-07-25",31],["2025-01-12",51],["2025-04-13",34],["2025-07-07",30],["2024-08-25",93],["2024-06-04",76],["2025-02-10",35],["2025-05-31",30],["2025-10-01",29],["2025-06-11",32],["2024-12-20",79],["2025-10-30",26],["2025-04-29",34],["2025-05-03",32],["2024-05-28",82],["2025-01-16",51],["2025-09-09",30],["2024-10-04",93],["2025-08-10",31],["2025-09-25",30],["2025-03-22",66],["2025-06-18",32],["2024-08-28",97],["2025-02-03",32],["2025-10-08",28],["2025-03-12",48],["2024-08-11",82],["2025-03-21",59],["2024-04-15",47],["2024-07-29",72],["2024-10-02",88],["2025-04-11",45],["2025-07-21",31],["2025-08-28",26],["2025-08-30",24],["2025-05-21",34],["2024-12-03",88],["2024-05-09",72],["2025-07-15",29],["2025-07-16",29],["2025-09-10",30],["2024-05-02",78],["2025-01-14",50],["2024-10-29",101],["2024-06-06",74],["2025-04-17",34],["2025-05-10",34],["2024-06-22",86],["2024-10-23",97],["2025-03-23",58],["2024-11-18",99],["2025-06-13",32],["2025-07-24",31],["2024-11-16",104],["2025-08-20",32],["2024-08-12",83],["2025-09-29",30],["2024-09-19",98],["2025-04-09",53],["2025-04-30",33],["2025-10-19",26],["2025-08-09",33],["2024-09-15",100],["2025-06-26",34],["2025-01-26",39],["2025-09-14",32],["2025-07-27",31],["2024-11-19",99],["2025-07-14",29],["2025-08-29",24],["2024-05-15",85],["2025-04-24",34],["2024-05-01",81],["2024-04-18",89],["2025-04-02",55],["2025-06-09",32],["2024-12-30",45],["2025-07-23",31],["2024-09-24",101],["2024-09-06",92],["2025-10-11",28],["2025-05-18",34],["2025-01-17",54],["2024-05-24",77],["2024-05-29",83],["2025-07-18",31],["2025-09-12",30],["2024-09-18",98],["2025-05-17",34],["2025-10-27",26],["2024-08-31",100],["2024-11-06",97],["2025-05-12",34],["2024-09-14",106],["2025-05-15",34],["2024-07-27",79],["2025-08-07",32],["2024-05-22",80],["2025-05-07",34],["2025-05-14",34],["2024-05-04",87],["2024-10-19",101],["2025-05-05",34],["2024-04-17",62],["2025-05-26",33],["2024-09-23",102],["2024-04-22",86],["2025-05-24",34],["2025-02-02",35],["2025-03-04",46],["2025-04-05",60],["2025-09-15",32],["2025-06-20",32],["2025-08-21",31],["2025-01-01",41],["2024-10-09",97],["2024-07-13",82],["2024-10-03",88],["2025-08-22",31],["2024-05-12",79],["2024-08-08",71],["2024-06-05",75],["2025-08-27",28],["2025-01-11",57],["2025-01-29",38],["2024-04-21",88],["2024-08-26",96],["2024-06-15",79],["2024-09-07",98],["2024-11-09",104],["2024-07-23",80],["2025-03-17",58],["2024-11-11",99],["2025-07-03",32],["2024-09-30",93],["2025-07-26",32],["2024-05-17",84],["2024-06-30",83],["2024-10-26",104],["2025-04-25",34],["2025-03-03",48],["2025-02-08",42],["2025-09-13",32],["2024-10-17",91],["2024-04-24",84],["2025-07-10",30],["2025-08-06",33],["2025-05-04",34],["2025-08-01",31],["2025-07-04",32],["2024-08-04",71],["2025-03-11",48],["2025-06-10",32],["2025-03-24",58],["2025-08-26",29],["2025-02-25",49],["2025-08-12",31],["2024-11-17",99],["2024-06-01",73],["2024-12-18",80],["2025-01-08",52],["2025-02-26",49],["2025-04-27",34],["2024-07-03",89],["2024-05-16",85],["2024-06-02",71],["2025-10-22",26],["2024-09-25",101],["2025-05-06",34],["2024-05-23",78],["2025-02-13",34],["2025-01-06",52],["2024-11-29",89],["2025-03-19",57],["2025-04-04",56],["2025-09-20",32],["2025-02-24",50],["2025-07-01",33],["2024-07-31",47],["2025-06-16",32],["2025-01-03",44],["2024-10-20",100],["2024-10-31",102],["2024-12-04",87],["2024-04-19",87],["2024-06-29",90],["2025-06-12",32],["2024-07-04",84],["2024-08-14",81],["2024-09-05",93],["2024-12-17",80]] -let test3 = [["2024-09-08",296],["2025-06-05",137],["2024-12-15",255],["2025-09-11",133],["2025-06-30",137],["2024-10-15",293],["2024-09-13",303],["2025-10-15",120],["2024-08-09",214],["2025-01-10",196],["2024-11-13",311],["2025-02-21",131],["2024-11-26",274],["2024-10-22",319],["2024-11-14",314],["2025-02-14",127],["2024-05-27",257],["2024-09-11",302],["2025-04-28",141],["2024-08-03",212],["2025-05-25",139],["2025-10-10",120],["2025-10-26",96],["2025-03-06",156],["2024-12-14",268],["2025-01-05",202],["2024-06-19",251],["2024-06-28",258],["2024-08-10",242],["2025-06-14",139],["2025-10-03",120],["2024-12-22",193],["2025-04-23",141],["2025-05-11",139],["2025-08-23",135],["2024-07-16",219],["2025-08-05",136],["2024-04-25",252],["2025-01-23",195],["2024-10-06",288],["2025-02-16",139],["2024-12-23",182],["2025-03-13",191],["2025-09-01",124],["2024-12-16",262],["2024-08-22",246],["2024-09-28",330],["2024-10-25",318],["2025-08-03",137],["2024-05-25",270],["2024-08-20",241],["2024-08-24",271],["2024-07-12",241],["2024-11-08",318],["2025-03-01",184],["2025-07-13",133],["2024-06-11",254],["2024-08-01",133],["2025-05-29",136],["2025-07-19",138],["2025-10-13",120],["2024-08-07",214],["2024-11-15",316],["2025-04-03",195],["2024-09-20",307],["2025-03-14",194],["2025-06-24",139],["2025-01-19",203],["2024-05-20",247],["2024-08-21",249],["2025-10-23",99],["2024-07-30",169],["2024-11-03",310],["2025-01-04",205],["2025-04-12",143],["2025-08-14",134],["2025-07-05",139],["2025-06-17",137],["2024-06-13",263],["2024-11-12",312],["2025-03-07",157],["2024-04-23",259],["2025-07-06",134],["2025-10-12",120],["2024-12-19",256],["2024-07-18",218],["2024-08-13",225],["2024-07-08",249],["2025-02-11",123],["2024-07-25",228],["2025-02-18",131],["2024-06-27",258],["2024-10-05",311],["2024-05-18",244],["2025-09-05",132],["2025-10-17",107],["2024-07-05",242],["2024-11-20",309],["2024-10-28",317],["2024-05-07",241],["2025-02-27",171],["2025-06-02",137],["2025-04-10",189],["2024-11-25",275],["2024-12-12",255],["2024-11-28",275],["2025-07-12",137],["2025-08-25",125],["2025-10-16",119],["2024-12-25",153],["2024-12-27",146],["2025-09-18",135],["2025-08-16",141],["2024-05-14",248],["2024-06-23",250],["2025-07-08",133],["2025-06-07",139],["2024-05-30",225],["2025-03-26",197],["2025-10-25",101],["2025-05-28",137],["2025-03-08",202],["2024-05-05",245],["2025-04-18",141],["2025-07-22",134],["2024-06-18",244],["2024-11-01",318],["2024-11-02",331],["2025-04-01",198],["2024-04-30",234],["2024-05-26",257],["2025-08-19",134],["2024-09-03",292],["2025-05-08",139],["2025-01-24",191],["2024-08-15",219],["2025-03-27",201],["2024-07-24",227],["2024-12-10",258],["2024-05-19",227],["2024-12-24",159],["2025-03-29",219],["2025-06-23",139],["2025-09-26",125],["2024-09-04",292],["2024-09-09",303],["2024-04-28",242],["2024-05-10",206],["2024-08-18",240],["2024-11-21",312],["2024-09-01",297],["2024-07-22",229],["2025-01-09",196],["2025-01-28",137],["2024-09-02",299],["2025-02-23",172],["2025-05-23",139],["2025-10-29",93],["2024-06-03",251],["2025-04-21",141],["2025-09-17",135],["2025-08-18",135],["2025-05-02",133],["2025-10-04",123],["2024-07-20",258],["2024-11-24",281],["2024-06-10",255],["2025-01-21",193],["2024-09-22",321],["2025-02-15",165],["2024-10-14",292],["2025-05-22",139],["2025-06-21",141],["2025-07-17",132],["2024-12-21",238],["2024-12-29",112],["2024-12-11",254],["2024-07-14",233],["2024-08-17",248],["2024-10-01",288],["2025-01-31",145],["2025-04-26",145],["2024-12-28",140],["2024-08-27",268],["2025-03-16",208],["2025-01-27",140],["2025-06-01",135],["2025-08-02",139],["2024-12-26",155],["2025-04-16",141],["2025-08-31",113],["2025-03-30",204],["2024-09-29",306],["2025-03-28",202],["2024-12-07",276],["2025-10-28",93],["2024-09-10",300],["2025-03-25",201],["2024-11-10",320],["2025-05-27",137],["2025-08-15",135],["2025-10-24",99],["2024-10-27",320],["2024-04-16",119],["2024-12-02",267],["2025-01-13",211],["2025-05-16",139],["2024-09-21",333],["2025-09-24",135],["2025-07-30",134],["2024-11-07",316],["2025-07-31",134],["2025-03-10",192],["2025-07-29",134],["2025-09-22",135],["2024-08-30",278],["2024-10-12",325],["2025-03-05",151],["2025-02-20",132],["2024-05-08",240],["2025-04-19",145],["2024-10-13",297],["2025-06-15",137],["2025-10-20",99],["2024-08-02",131],["2025-10-31",93],["2024-07-01",258],["2025-08-17",137],["2025-03-02",163],["2024-09-26",315],["2024-07-28",211],["2025-02-06",126],["2024-07-07",257],["2025-06-22",138],["2024-10-18",295],["2025-01-22",191],["2025-07-02",137],["2024-08-29",274],["2025-06-08",137],["2024-05-13",250],["2025-09-07",133],["2025-10-18",101],["2025-02-22",183],["2024-06-21",250],["2025-04-07",194],["2025-09-04",128],["2024-05-21",260],["2024-07-21",231],["2024-12-01",267],["2024-04-29",244],["2025-05-20",139],["2025-02-04",123],["2025-06-28",141],["2025-09-16",135],["2025-01-07",193],["2025-06-03",137],["2024-12-06",264],["2024-10-21",321],["2024-04-20",280],["2025-06-06",137],["2025-07-09",133],["2025-01-18",222],["2025-05-30",135],["2025-02-01",159],["2025-02-28",176],["2025-09-08",133],["2025-10-07",120],["2025-05-19",139],["2024-08-23",245],["2024-07-17",219],["2025-04-14",141],["2025-06-04",137],["2025-09-19",135],["2025-10-09",120],["2024-04-26",240],["2024-06-17",249],["2024-10-08",293],["2024-10-10",301],["2024-05-11",218],["2024-11-22",314],["2024-05-03",227],["2024-06-16",262],["2024-12-08",259],["2025-01-15",202],["2024-07-10",237],["2024-12-13",251],["2025-04-22",141],["2024-10-07",296],["2025-01-25",191],["2025-04-20",141],["2024-06-12",255],["2025-06-27",139],["2024-07-15",226],["2024-09-17",306],["2024-09-27",307],["2024-12-05",264],["2025-09-28",122],["2025-02-05",123],["2024-07-09",239],["2024-11-23",315],["2025-07-28",134],["2025-08-04",136],["2024-11-30",287],["2025-06-29",138],["2024-05-06",240],["2025-06-19",137],["2024-05-31",221],["2025-03-20",206],["2024-11-27",273],["2024-10-24",318],["2025-03-09",191],["2025-09-21",135],["2024-10-30",314],["2025-01-20",200],["2025-03-15",227],["2024-06-09",260],["2024-07-26",232],["2024-12-09",259],["2025-05-01",133],["2025-07-20",134],["2025-10-06",120],["2025-08-24",129],["2025-04-08",194],["2024-07-02",260],["2025-03-18",202],["2025-09-06",136],["2025-10-14",120],["2024-10-16",292],["2024-08-05",207],["2024-06-26",263],["2024-07-19",222],["2024-11-05",312],["2025-05-09",139],["2025-09-03",126],["2025-08-11",134],["2024-06-24",254],["2025-09-02",128],["2024-11-04",313],["2025-04-15",141],["2025-09-30",122],["2024-09-16",306],["2024-08-16",222],["2025-02-07",127],["2025-01-30",142],["2025-10-21",99],["2024-08-06",209],["2024-06-08",273],["2025-06-25",139],["2025-02-19",131],["2025-08-13",134],["2025-10-05",120],["2024-06-07",256],["2025-09-23",135],["2025-09-27",126],["2024-06-14",260],["2025-02-09",130],["2024-07-06",280],["2024-06-25",263],["2025-02-17",128],["2024-12-31",100],["2025-05-13",139],["2024-06-20",250],["2025-03-31",203],["2025-01-02",117],["2025-02-12",123],["2024-04-27",248],["2025-08-08",136],["2025-10-02",120],["2024-07-11",234],["2024-08-19",241],["2024-09-12",302],["2024-10-11",302],["2025-04-06",194],["2025-07-11",134],["2025-07-25",135],["2025-01-12",204],["2025-04-13",139],["2025-07-07",133],["2024-08-25",264],["2024-06-04",259],["2025-02-10",122],["2025-05-31",137],["2025-10-01",121],["2025-06-11",137],["2024-12-20",249],["2025-10-30",93],["2025-04-29",141],["2025-05-03",135],["2024-05-28",247],["2025-01-16",206],["2025-09-09",133],["2024-10-04",288],["2025-08-10",135],["2025-09-25",130],["2025-03-22",226],["2025-06-18",137],["2024-08-28",275],["2025-02-03",124],["2025-10-08",120],["2025-03-12",185],["2024-08-11",233],["2025-03-21",209],["2024-07-29",196],["2024-10-02",280],["2025-04-11",169],["2025-07-21",134],["2025-08-28",111],["2025-08-30",109],["2025-05-21",139],["2024-12-03",266],["2024-05-09",222],["2025-07-15",132],["2025-07-16",132],["2025-09-10",133],["2024-05-02",225],["2025-01-14",204],["2024-10-29",312],["2024-06-06",252],["2025-04-17",141],["2025-05-10",141],["2024-06-22",265],["2024-10-23",316],["2025-03-23",209],["2024-11-18",311],["2025-06-13",137],["2025-07-24",134],["2024-11-16",331],["2025-08-20",133],["2024-08-12",232],["2025-09-29",122],["2024-09-19",305],["2025-04-09",191],["2025-04-30",138],["2025-10-19",99],["2025-08-09",140],["2024-09-15",303],["2025-06-26",139],["2025-01-26",149],["2025-09-14",135],["2025-07-27",135],["2024-11-19",310],["2025-07-14",132],["2025-08-29",109],["2024-05-15",258],["2025-04-24",141],["2024-05-01",232],["2024-04-18",157],["2025-04-02",195],["2025-06-09",137],["2024-12-30",111],["2025-07-23",134],["2024-09-24",318],["2024-09-06",292],["2025-10-11",123],["2025-05-18",139],["2025-01-17",206],["2024-05-24",250],["2024-05-29",244],["2025-07-18",135],["2025-09-12",133],["2024-09-18",306],["2025-05-17",141],["2025-10-27",93],["2024-08-31",305],["2024-11-06",311],["2025-05-12",139],["2024-09-14",321],["2025-05-15",139],["2024-07-27",241],["2025-08-07",135],["2024-05-22",255],["2025-05-07",139],["2025-05-14",139],["2024-05-04",245],["2024-10-19",331],["2025-05-05",139],["2024-04-17",127],["2025-05-26",138],["2024-09-23",319],["2024-04-22",259],["2025-05-24",141],["2025-02-02",131],["2025-03-04",152],["2025-04-05",210],["2025-09-15",135],["2025-06-20",137],["2025-08-21",131],["2025-01-01",97],["2024-10-09",293],["2024-07-13",261],["2024-10-03",280],["2025-08-22",132],["2024-05-12",245],["2024-08-08",212],["2024-06-05",256],["2025-08-27",117],["2025-01-11",222],["2025-01-29",138],["2024-04-21",268],["2024-08-26",271],["2024-06-15",268],["2024-09-07",312],["2024-11-09",336],["2024-07-23",225],["2025-03-17",207],["2024-11-11",315],["2025-07-03",136],["2024-09-30",295],["2025-07-26",139],["2024-05-17",244],["2024-06-30",258],["2024-10-26",339],["2025-04-25",141],["2025-03-03",159],["2025-02-08",150],["2025-09-13",137],["2024-10-17",293],["2024-04-24",257],["2025-07-10",133],["2025-08-06",136],["2025-05-04",139],["2025-08-01",135],["2025-07-04",136],["2024-08-04",212],["2025-03-11",186],["2025-06-10",137],["2025-03-24",207],["2025-08-26",123],["2025-02-25",167],["2025-08-12",134],["2024-11-17",313],["2024-06-01",239],["2024-12-18",252],["2025-01-08",194],["2025-02-26",166],["2025-04-27",141],["2024-07-03",258],["2024-05-16",252],["2024-06-02",251],["2025-10-22",99],["2024-09-25",315],["2025-05-06",139],["2024-05-23",246],["2025-02-13",123],["2025-01-06",199],["2024-11-29",278],["2025-03-19",201],["2025-04-04",199],["2025-09-20",137],["2025-02-24",169],["2025-07-01",137],["2024-07-31",134],["2025-06-16",137],["2025-01-03",149],["2024-10-20",324],["2024-10-31",316],["2024-12-04",263],["2024-04-19",254],["2024-06-29",276],["2025-06-12",137],["2024-07-04",246],["2024-08-14",223],["2024-09-05",294],["2024-12-17",254]] - -const calOptData = new Promise((res, rej) => { - - let calOptions = [] - let i = 0; - - sharedData.extractionDates.forEach(el => { - - const daten = getCalData(el).then((result) => { - calOptions.push({ - title: { - text: `Auslastung am ${el}` - }, - series: [{ - type: 'heatmap', - coordinateSystem: 'calendar', - calendarIndex: 0, - data: test - }, - { - type: 'heatmap', - coordinateSystem: 'calendar', - calendarIndex: 1, - data: test - }] - }) - i++; - }); - - res(calOptions) - - - }) - - - -}) - - -calOptData.then((data) => { - - - - const chartCapacity = document.getElementById('capacity'); - const cCapacity = echarts.init(chartCapacity); - const cCapacityOptions = { - timeline: { - data: sharedData.extractionDates - }, - tooltip: {}, - visualMap: { - min: 0, - max: 500, - type: 'piecewise', - orient: 'horizontal', - left: 'center', - top: 0 - }, - calendar:[ - { - orient: 'horizontal', - range: '2024', - top: 50, - right: 0, - left: 50, - bottom: "55%" - }, - { - orient: 'horizontal', - range: '2025', - right: 100, - left: 50, - bottom: 60, - top: '55%' - }, - ], - options: [{ - series: [{ - type: 'heatmap', - coordinateSystem: 'calendar', - calendarIndex: 0, - data: test - }, - { - type: 'heatmap', - coordinateSystem: 'calendar', - calendarIndex: 1, - data: test - }] - }, - { - title: { - text: `Auslastung am ` - }, - series: [{ - type: 'heatmap', - coordinateSystem: 'calendar', - calendarIndex: 0, - data: test2 - }, - { - type: 'heatmap', - coordinateSystem: 'calendar', - calendarIndex: 1, - data: test2 - }] - }, - { - title: { - text: `Auslastung am ` - }, - series: [{ - type: 'heatmap', - coordinateSystem: 'calendar', - calendarIndex: 0, - data: test3 - }, - { - type: 'heatmap', - coordinateSystem: 'calendar', - calendarIndex: 1, - data: test3 - }] - }] - }; - -cCapacity.setOption(cCapacityOptions); - -}) -*/ diff --git a/dashboard/resources/views/base.blade.php b/dashboard/resources/views/base.blade.php index db96cca..66eb3e7 100644 --- a/dashboard/resources/views/base.blade.php +++ b/dashboard/resources/views/base.blade.php @@ -10,6 +10,13 @@
Dashboard +
@yield('main') diff --git a/dashboard/resources/views/overview.blade.php b/dashboard/resources/views/overview.blade.php index 839761e..de16f1f 100644 --- a/dashboard/resources/views/overview.blade.php +++ b/dashboard/resources/views/overview.blade.php @@ -60,7 +60,7 @@ const chartExtractions = document.getElementById('extractions'); const cExtractions = echarts.init(chartExtractions); const filters = { - regions: ["Davos", "Engadin", "Heidiland", "St. Moritz"] + regions: ["Alle", "Davos", "Engadin", "Heidiland", "St. Moritz"] } const cExtractionsOptions = { @@ -79,7 +79,7 @@ const cExtractionsOptions = { xAxis: { type: 'category', boundaryGap: false, - data: ['2024-04-14','2024-04-15','2024-04-16','2024-04-19','2024-04-22','2024-04-25','2024-04-28','2024-05-01','2024-05-04','2024-05-07','2024-05-10','2024-05-13','2024-05-16','2024-05-19','2024-05-22','2024-05-25','2024-05-28','2024-05-31','2024-06-01','2024-06-04','2024-06-07','2024-06-10','2024-06-13','2024-06-16','2024-06-19','2024-06-22','2024-06-25','2024-06-28','2024-07-01','2024-07-04','2024-07-07','2024-07-10','2024-07-13','2024-07-16','2024-07-19','2024-07-22','2024-07-25','2024-07-28','2024-07-31','2024-08-01','2024-08-04','2024-08-07','2024-08-10','2024-08-13','2024-08-16','2024-08-19','2024-08-22'] + data: {!! json_encode($growth['dates']) !!} }, yAxis: { type: 'value' @@ -89,35 +89,51 @@ const cExtractionsOptions = { name: 'Alle', type: 'line', stack: 'Total', - data: [596, 239, 835, 673, 863, 1803, 904, 915, 958, 966, 1001, 1031, 1044, 1055, 1158, 1162, 1181, 1203, 1207, 1214, 1254, 1258, 1264, 1288, 1296, 1305, 1318, 1323, 1330, 1333, 1342, 1350, 1436, 1454, 1461, 1469, 1492, 1504, 1506, 1510, 1512, 1518, 1534, 1535, 1541, 1544, 1500] + data: {!! json_encode($growth['total_all']) !!} }, { name: 'Heidiland', type: 'line', stack: 'Heidiland', - data: [133,64,197,151,197,417,210,213,215,220,226,239,247,251,251,252,262,275,276,277,281,283,284,286,287,287,287,287,287,287,287,289,290,292,293,294,294,294,295,295,295,296,312,313,313,313,301] + data: {!! json_encode($growth['total_heidiland']) !!} }, { name: 'Davos', type: 'line', stack: 'Davos', - data: [133,56,189,152,196,409,206,209,209,209,221,223,223,224,226,227,230,234,236,238,250,252,252,259,261,263,267,270,272,272,274,274,277,278,279,281,286,289,289,289,289,290,290,290,293,296,285] + data: {!! json_encode($growth['total_davos']) !!} }, { name: 'Engadin', type: 'line', stack: 'Engadin', - data: [185,73,258,212,278,569,284,289,326,326,340,346,350,355,413,413,413,413,414,415,438,438,442,455,460,463,470,472,477,479,484,486,544,554,558,561,578,585,586,590,592,595,595,595,597,597,583] + data: {!! json_encode($growth['total_engadin']) !!} }, { name: 'St. Moritz', type: 'line', stack: 'St. Moritz', - data: [145,46,191,158,192,408,204,204,208,211,214,223,224,225,268,270,276,281,281,284,285,285,286,288,288,292,294,294,294,295,297,301,325,330,331,333,334,336,336,336,336,337,337,337,338,338,331] + data: {!! json_encode($growth['total_stmoritz']) !!} }, ] }; cExtractions.setOption(cExtractionsOptions); + +const map = L.map('leaflet').setView([46.862962, 9.535296], 9); + +L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { + maxZoom: 19, + attribution: '© OpenStreetMap' +}).addTo(map); + +const properties = {!! json_encode($geo) !!} +properties.forEach( prop => { + console.log(prop); + let coords = prop.coordinates.split(','); + L.marker(coords).addTo(map).bindPopup(''+prop.coordinates+''); +}) + + @endsection diff --git a/dashboard/resources/views/property.blade.php b/dashboard/resources/views/property.blade.php index c132f70..2822bcb 100644 --- a/dashboard/resources/views/property.blade.php +++ b/dashboard/resources/views/property.blade.php @@ -3,10 +3,23 @@

- Properties pro Region + Angaben zur Property

-
+
+ @foreach ($base as $dt => $dd) +
{{ $dt }}
+
+ @if ($dt === 'property_platform_id') + + {{ $dd }} + + @else + {{ $dd }} + @endif +
+ @endforeach +
@@ -24,6 +37,8 @@ const h2Belegung = document.getElementById('belegung-title'); const cCalendarOptions = { timeline: { data: {!! $extractiondates !!}, + playInterval: 1000, + axisType: 'time', left: 0, right: 0, label: { diff --git a/dashboard/routes/web.php b/dashboard/routes/web.php index f2b4991..b390891 100644 --- a/dashboard/routes/web.php +++ b/dashboard/routes/web.php @@ -5,6 +5,8 @@ use App\Api; Route::get('/', function () { + + $propertiesGrowth = Api::propertiesGrowth(); $propsPerRegion = Api::propertiesPerRegion(); $propsPerRegionName = []; $propsPerRegionCounts = []; @@ -14,11 +16,15 @@ Route::get('/', function () { $propsPerRegionCounts[] = $el['count_properties']; } - return view('overview', ["propsPerRegion" => [json_encode($propsPerRegionName), json_encode($propsPerRegionCounts)]]); + $propertiesGeo = Api::propertiesGeo(); + //dump($propertiesGeo); + + return view('overview', ["geo" => $propertiesGeo, "growth" => $propertiesGrowth, "propsPerRegion" => [json_encode($propsPerRegionName), json_encode($propsPerRegionCounts)]]); }); Route::get('/prop/{id}', function (int $id) { + $propertyBase = Api::propertyBase($id); $extractions = Api::propertyExtractions($id); $data = []; $dates = []; @@ -27,8 +33,11 @@ Route::get('/prop/{id}', function (int $id) { $series = []; $dates[] = $ext['created_at']; + $extCalendar = json_decode($ext['calendar'], 1); + + foreach ($extCalendar as $date => $status) { $series[] = [$date, $status]; } @@ -37,5 +46,5 @@ Route::get('/prop/{id}', function (int $id) { } - return view('property', ["extractiondates" => json_encode($dates), "calendar" => $data]); + return view('property', ['base' => $propertyBase[0], "extractiondates" => json_encode($dates), "calendar" => $data]); }); diff --git a/etl/src/api/main.py b/etl/src/api/main.py index 81e1ef2..ccdc484 100644 --- a/etl/src/api/main.py +++ b/etl/src/api/main.py @@ -23,12 +23,19 @@ def properties_region(): @app.get("/properties/growth") def properties_growth(): - options = {"dates" : d.properties_growth().pl()['date'].to_list(), "values" : d.properties_growth().pl()['properties_count'].to_list()} + options = {"dates" : d.properties_growth().pl()['date'].to_list(), "total_all" : d.properties_growth().pl()['total_all'].to_list(), "total_heidiland" : d.properties_growth().pl()['total_heidiland'].to_list(), "total_engadin" : d.properties_growth().pl()['total_engadin'].to_list(), "total_davos" : d.properties_growth().pl()['total_davos'].to_list(), "total_stmoritz" : d.properties_growth().pl()['total_stmoritz'].to_list()} return options -@app.get("/properties/extractions/{id}") +@app.get("/properties/geo") +def properties_geo(): + return d.properties_geo().pl().to_dicts() + +@app.get("/property/{id}/extractions") def property_extractions(id: int): return d.extractions_for(property_id = id).pl().to_dicts() +@app.get("/property/{id}/base") +def property_base_data(id: int): + return d.property_base_data(id).pl().to_dicts() diff --git a/etl/src/data/database.py b/etl/src/data/database.py index b223d49..61faaff 100644 --- a/etl/src/data/database.py +++ b/etl/src/data/database.py @@ -46,13 +46,93 @@ class Database: def properties_growth(self): return self.connection.sql(""" + WITH PropertiesALL AS ( + SELECT + strftime(created_at, '%Y-%m-%d') AS date, + COUNT(*) as properties_count, + SUM(properties_count) OVER (ORDER BY date) AS total + FROM + consultancy_d.properties p + GROUP BY + date + ORDER BY + date + ), + PropertiesR1 AS ( + SELECT + strftime(created_at, '%Y-%m-%d') AS date, + COUNT(*) as properties_count, + SUM(properties_count) OVER (ORDER BY date) AS total + FROM + consultancy_d.properties p + WHERE + p.seed_id = 1 + GROUP BY + date + ORDER BY + date + ), + PropertiesR2 AS ( + SELECT + strftime(created_at, '%Y-%m-%d') AS date, + COUNT(*) as properties_count, + SUM(properties_count) OVER (ORDER BY date) AS total + FROM + consultancy_d.properties p + WHERE + p.seed_id = 2 + GROUP BY + date + ORDER BY + date + ), + PropertiesR3 AS ( + SELECT + strftime(created_at, '%Y-%m-%d') AS date, + COUNT(*) as properties_count, + SUM(properties_count) OVER (ORDER BY date) AS total + FROM + consultancy_d.properties p + WHERE + p.seed_id = 3 + GROUP BY + date + ORDER BY + date + ), + PropertiesR4 AS ( + SELECT + strftime(created_at, '%Y-%m-%d') AS date, + COUNT(*) as properties_count, + SUM(properties_count) OVER (ORDER BY date) AS total + FROM + consultancy_d.properties p + WHERE + p.seed_id = 4 + GROUP BY + date + ORDER BY + date + ) SELECT - strftime(created_at, '%Y-%m-%d') AS date, - COUNT(*) as properties_count + p.date, + p.total AS total_all, + pR1.total as total_heidiland, + pR2.total AS total_davos, + pR3.total AS total_engadin, + pR4.total AS total_stmoritz FROM - consultancy_d.properties - GROUP BY - date; + PropertiesAll p + LEFT JOIN + PropertiesR1 pR1 ON p.date = pR1.date + LEFT JOIN + PropertiesR2 pR2 ON p.date = pR2.date + LEFT JOIN + PropertiesR3 pR3 ON p.date = pR3.date + LEFT JOIN + PropertiesR4 pR4 ON p.date = pR4.date + ORDER BY + p.date """) def properties_per_region(self): @@ -233,9 +313,10 @@ class Database: consultancy_d.extractions WHERE type == 'calendar' AND - property_id = {property_id} + property_id = {property_id} AND + calendar NOT NULL ORDER BY - property_id + created_at """) # Anzahl der extrahierten properties pro Exktraktionsvorgang @@ -281,3 +362,29 @@ class Database: ORDER BY property_id """) + def property_base_data(self, id): + return self.connection.sql(f""" + SELECT + p.property_platform_id, + p.created_at as first_found, + p.last_found, + r.name as region_name + FROM + consultancy_d.properties p + INNER JOIN consultancy_d.seeds s ON s.id = p.seed_id + INNER JOIN consultancy_d.regions r ON s.region_id = r.id + WHERE + p.id = {id} + """) + + def properties_geo(self): + return self.connection.sql(""" + SELECT + p.id, + p.check_data as coordinates + FROM + consultancy_d.properties p + """) + + + diff --git a/etl/src/gio/test_duckdb.py b/etl/src/gio/test_duckdb.py deleted file mode 100644 index 6ddef74..0000000 --- a/etl/src/gio/test_duckdb.py +++ /dev/null @@ -1,17 +0,0 @@ -import data -import polars as pl - -inst = data.load() - -""" -test = inst.extractions_for(1).pl() - -out = test.with_columns( - pl.col("calendar").str.extract_all(r"([0-9]{4}-[0-9]{2}-[0-9]{2})|[0-2]").alias("extracted_cal"), -) -out = out.drop(['calendar', 'property_id']) - -print(out.to_dict(as_series=True)) -""" - -print(inst.price_developement_per_property().pl())