API-Source:
https://www.stadt-koeln.de/externe-dienste/open-data/traffic.php
and
https://www.stadt-koeln.de/leben-in-koeln/verkehr/verkehrskalender/
JSON stored locally: https://api.json-content-importer.com/extra/json/koeln-20220130-traffic.json
In Action:
Free Plugin (show the first four items)
[jsoncontentimporter url=https://www.stadt-koeln.de/externe-dienste/open-data/traffic.php]STRASSE:AUSLASTUNG {subloop-array:features:4}{subloop:features.attributes:-1}{NAME}: {AUSLASTUNG} {/subloop:features.attributes}{/subloop-array:features} [/jsoncontentimporter]STRASSE:AUSLASTUNG
Rösrather Straße – Mauspfad bis Frankfurter Straße: 16
Bonner Straße – Chlodwigplatz bis Bonner Verteiler: 0
Universitätsstraße – Aachener Straße bis Luxemburger Straße: 16
Universitätsstraße – Luxemburger Straße bis Aachener Straße: 16
PRO-Plugin (show only >0 values and only 6 items):
URL: https://www.stadt-koeln.de/externe-dienste/open-data/traffic.php
twig-Template:
{% set numb = 0 %} found features: {{features| length}}<br> {% for f in features %} {% if (f.attributes.auslastung>0) and (numb<6) %} {% set numb = numb + 1 %} {{numb}}. {{f.attributes.name}}: {{f.attributes.auslastung}}<br> {% endif %} {% endfor %}curlGET failed, http-code: 301