Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e2d9fbcee | |||
| f3443bfd4d | |||
| d68d6fdd6e | |||
| bc5f273b74 | |||
| efaba0abbe | |||
| e2307b881d | |||
| 713e83e89e | |||
| 1a66405e4a |
@@ -13,63 +13,63 @@ Dort wird die vereinfachte Version exportiert.
|
|||||||
|
|
||||||
## Direktlinks
|
## Direktlinks
|
||||||
|
|
||||||
* [Aachen (Städteregion)](https://unfallkarte.hpadm.de/aachen)
|
* [Aachen (Städteregion)](https://unfallkarte.adfc-hamm.de/aachen)
|
||||||
* [Bielefeld (kreisfreie Stadt)](https://unfallkarte.hpadm.de/bielefeld)
|
* [Bielefeld (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/bielefeld)
|
||||||
* [Bochum (kreisfreie Stadt)](https://unfallkarte.hpadm.de/bochum)
|
* [Bochum (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/bochum)
|
||||||
* [Bonn (kreisfreie Stadt)](https://unfallkarte.hpadm.de/bonn)
|
* [Bonn (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/bonn)
|
||||||
* [Borken](https://unfallkarte.hpadm.de/borken)
|
* [Borken](https://unfallkarte.adfc-hamm.de/borken)
|
||||||
* [Bottrop (kreisfreie Stadt)](https://unfallkarte.hpadm.de/bottrop)
|
* [Bottrop (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/bottrop)
|
||||||
* [Coesfeld](https://unfallkarte.hpadm.de/coesfeld)
|
* [Coesfeld](https://unfallkarte.adfc-hamm.de/coesfeld)
|
||||||
* [Dortmund (kreisfreie Stadt)](https://unfallkarte.hpadm.de/dortmund)
|
* [Dortmund (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/dortmund)
|
||||||
* [Duisburg (kreisfreie Stadt)](https://unfallkarte.hpadm.de/duisburg)
|
* [Duisburg (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/duisburg)
|
||||||
* [Düren](https://unfallkarte.hpadm.de/dueren)
|
* [Düren](https://unfallkarte.adfc-hamm.de/dueren)
|
||||||
* [Düsseldorf (kreisfreie Stadt)](https://unfallkarte.hpadm.de/duesseldorf)
|
* [Düsseldorf (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/duesseldorf)
|
||||||
* [Ennepe-Ruhr-Kreis](https://unfallkarte.hpadm.de/erk)
|
* [Ennepe-Ruhr-Kreis](https://unfallkarte.adfc-hamm.de/erk)
|
||||||
* [Essen (kreisfreie Stadt)](https://unfallkarte.hpadm.de/essen)
|
* [Essen (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/essen)
|
||||||
* [Euskirchen](https://unfallkarte.hpadm.de/euskrichen)
|
* [Euskirchen](https://unfallkarte.adfc-hamm.de/euskrichen)
|
||||||
* [Gelsenkirchen (kreisfreie Stadt)](https://unfallkarte.hpadm.de/gelsenkirchen)
|
* [Gelsenkirchen (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/gelsenkirchen)
|
||||||
* [Gütersloh](https://unfallkarte.hpadm.de/guetersloh)
|
* [Gütersloh](https://unfallkarte.adfc-hamm.de/guetersloh)
|
||||||
* [Hagen (kreisfreie Stadt)](https://unfallkarte.hpadm.de/hagen)
|
* [Hagen (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/hagen)
|
||||||
* [Hamm (kreisfreie Stadt)](https://unfallkarte.hpadm.de/hamm)
|
* [Hamm (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/hamm)
|
||||||
* [Heinsberg](https://unfallkarte.hpadm.de/heinsberg)
|
* [Heinsberg](https://unfallkarte.adfc-hamm.de/heinsberg)
|
||||||
* [Herford](https://unfallkarte.hpadm.de/herford)
|
* [Herford](https://unfallkarte.adfc-hamm.de/herford)
|
||||||
* [Herne (kreisfreie Stadt)](https://unfallkarte.hpadm.de/herne)
|
* [Herne (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/herne)
|
||||||
* [Hochsauerlandkreis](https://unfallkarte.hpadm.de/hochsauerlandkreis)
|
* [Hochsauerlandkreis](https://unfallkarte.adfc-hamm.de/hochsauerlandkreis)
|
||||||
* [Höxter](https://unfallkarte.hpadm.de/hoexter)
|
* [Höxter](https://unfallkarte.adfc-hamm.de/hoexter)
|
||||||
* [Kleve](https://unfallkarte.hpadm.de/kleve)
|
* [Kleve](https://unfallkarte.adfc-hamm.de/kleve)
|
||||||
* [Köln (kreisfreie Stadt)](https://unfallkarte.hpadm.de/koeln)
|
* [Köln (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/koeln)
|
||||||
* [Krefeld (kreisfreie Stadt)](https://unfallkarte.hpadm.de/krefeld)
|
* [Krefeld (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/krefeld)
|
||||||
* [Leverkusen (kreisfreie Stadt)](https://unfallkarte.hpadm.de/leverkusen)
|
* [Leverkusen (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/leverkusen)
|
||||||
* [Lippe](https://unfallkarte.hpadm.de/lippe)
|
* [Lippe](https://unfallkarte.adfc-hamm.de/lippe)
|
||||||
* [Märkischer Kreis](https://unfallkarte.hpadm.de/maerkischerkreis)
|
* [Märkischer Kreis](https://unfallkarte.adfc-hamm.de/maerkischerkreis)
|
||||||
* [Mettmann](https://unfallkarte.hpadm.de/mettmann)
|
* [Mettmann](https://unfallkarte.adfc-hamm.de/mettmann)
|
||||||
* [Minden-Lübbecke](https://unfallkarte.hpadm.de/minden-luebbecke)
|
* [Minden-Lübbecke](https://unfallkarte.adfc-hamm.de/minden-luebbecke)
|
||||||
* [Mönchengladbach (kreisfreie Stadt)](https://unfallkarte.hpadm.de/moenchengladbach)
|
* [Mönchengladbach (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/moenchengladbach)
|
||||||
* [Mülheim an der Ruhr (kreisfreie Stadt)](https://unfallkarte.hpadm.de/muelheim)
|
* [Mülheim an der Ruhr (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/muelheim)
|
||||||
* [Münster (kreisfreie Stadt)](https://unfallkarte.hpadm.de/muenster)
|
* [Münster (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/muenster)
|
||||||
* [Oberbergischer Kreis](https://unfallkarte.hpadm.de/oberbergischerkreis)
|
* [Oberbergischer Kreis](https://unfallkarte.adfc-hamm.de/oberbergischerkreis)
|
||||||
* [Oberhausen (kreisfreie Stadt)](https://unfallkarte.hpadm.de/oberhausen)
|
* [Oberhausen (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/oberhausen)
|
||||||
* [Olpe](https://unfallkarte.hpadm.de/olpe)
|
* [Olpe](https://unfallkarte.adfc-hamm.de/olpe)
|
||||||
* [Paderborn](https://unfallkarte.hpadm.de/paderborn)
|
* [Paderborn](https://unfallkarte.adfc-hamm.de/paderborn)
|
||||||
* [Recklinghausen](https://unfallkarte.hpadm.de/recklinghausen)
|
* [Recklinghausen](https://unfallkarte.adfc-hamm.de/recklinghausen)
|
||||||
* [Remscheid (kreisfreie Stadt)](https://unfallkarte.hpadm.de/remscheid)
|
* [Remscheid (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/remscheid)
|
||||||
* [Rhein-Erft-Kreis](https://unfallkarte.hpadm.de/rek)
|
* [Rhein-Erft-Kreis](https://unfallkarte.adfc-hamm.de/rek)
|
||||||
* [Rhein-Kreis Neuss](https://unfallkarte.hpadm.de/neuss)
|
* [Rhein-Kreis Neuss](https://unfallkarte.adfc-hamm.de/neuss)
|
||||||
* [Rhein-Sieg-Kreis](https://unfallkarte.hpadm.de/rsk)
|
* [Rhein-Sieg-Kreis](https://unfallkarte.adfc-hamm.de/rsk)
|
||||||
* [Rheinisch-Bergischer Kreis](https://unfallkarte.hpadm.de/rbk)
|
* [Rheinisch-Bergischer Kreis](https://unfallkarte.adfc-hamm.de/rbk)
|
||||||
* [Siegen-Wittgenstein](https://unfallkarte.hpadm.de/siegen-wittgenstein)
|
* [Siegen-Wittgenstein](https://unfallkarte.adfc-hamm.de/siegen-wittgenstein)
|
||||||
* [Soest](https://unfallkarte.hpadm.de/soest)
|
* [Soest](https://unfallkarte.adfc-hamm.de/soest)
|
||||||
* [Solingen (kreisfreie Stadt)](https://unfallkarte.hpadm.de/solingen)
|
* [Solingen (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/solingen)
|
||||||
* [Steinfurt](https://unfallkarte.hpadm.de/steinfurt)
|
* [Steinfurt](https://unfallkarte.adfc-hamm.de/steinfurt)
|
||||||
* [Unna](https://unfallkarte.hpadm.de/unna)
|
* [Unna](https://unfallkarte.adfc-hamm.de/unna)
|
||||||
* [Viersen](https://unfallkarte.hpadm.de/viersen)
|
* [Viersen](https://unfallkarte.adfc-hamm.de/viersen)
|
||||||
* [Warendorf](https://unfallkarte.hpadm.de/warendorf)
|
* [Warendorf](https://unfallkarte.adfc-hamm.de/warendorf)
|
||||||
* [Wesel](https://unfallkarte.hpadm.de/wesel)
|
* [Wesel](https://unfallkarte.adfc-hamm.de/wesel)
|
||||||
* [Wuppertal (kreisfreie Stadt)](https://unfallkarte.hpadm.de/wuppertal)
|
* [Wuppertal (kreisfreie Stadt)](https://unfallkarte.adfc-hamm.de/wuppertal)
|
||||||
|
|
||||||
## Statistische Auswertungen
|
## Statistische Auswertungen
|
||||||
|
|
||||||
* https://radwege-hamm.de/dokuwiki/doku.php?id=unfallstatistik_nrw
|
* https://wiki.radwege-hamm.de/doku.php?id=unfallstatistik_nrw
|
||||||
|
|
||||||
## Javascript-Bibliotheken
|
## Javascript-Bibliotheken
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -16,5 +16,5 @@ try {
|
|||||||
} catch (PDOException $e) {echo "Fehler: ".$e->getMessage(); die();}
|
} catch (PDOException $e) {echo "Fehler: ".$e->getMessage(); die();}
|
||||||
|
|
||||||
$numStartYear=2019;
|
$numStartYear=2019;
|
||||||
$numLatestYear=2022;
|
$numLatestYear=2025;
|
||||||
|
|
||||||
@@ -30,12 +30,6 @@
|
|||||||
<link rel="stylesheet" href="css/leaflet.css" />
|
<link rel="stylesheet" href="css/leaflet.css" />
|
||||||
<link rel="stylesheet" href="css/leaflet.awesome-markers.css" />
|
<link rel="stylesheet" href="css/leaflet.awesome-markers.css" />
|
||||||
<link rel="stylesheet" href="css/style.css" />
|
<link rel="stylesheet" href="css/style.css" />
|
||||||
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="vendor/Leaflet.markercluster/dist/MarkerCluster.css" />
|
|
||||||
<link rel="stylesheet" href="vendor/Leaflet.markercluster/dist/MarkerCluster.Default.css" />
|
|
||||||
<script src="vendor/Leaflet.markercluster/dist/leaflet.markercluster-src.js"></script>
|
|
||||||
|
|
||||||
<title><?= $strTitle ?></title>
|
<title><?= $strTitle ?></title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -122,6 +116,11 @@
|
|||||||
<div class="sidebar-sticky">
|
<div class="sidebar-sticky">
|
||||||
<h1>Jahr <?= $numYear?></h2>
|
<h1>Jahr <?= $numYear?></h2>
|
||||||
<h2>Unfälle mit <?= $arrVehicles_pl[$numVehicle]; ?> </h2>
|
<h2>Unfälle mit <?= $arrVehicles_pl[$numVehicle]; ?> </h2>
|
||||||
|
<?php
|
||||||
|
if ($numVehicle==1) {
|
||||||
|
echo "<a href=\"statistics/kreis_details.php?regbez=" . $numUREGBEZ . "&kreis=" . $numUKREIS . "\">Weitere Statistiken</a>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
<ul class="nav flex-column">
|
<ul class="nav flex-column">
|
||||||
<?php echo get_statistics($numVehicle,$strWhere,$strYear); ?>
|
<?php echo get_statistics($numVehicle,$strWhere,$strYear); ?>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -137,8 +136,6 @@
|
|||||||
<!-- row -->
|
<!-- row -->
|
||||||
</div>
|
</div>
|
||||||
<!-- container-fluid -->
|
<!-- container-fluid -->
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Map ----------------------------------------------------------------------
|
// Map ----------------------------------------------------------------------
|
||||||
var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>);
|
var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>);
|
||||||
@@ -179,6 +176,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Hamm-Layer - todo invers area ---------------------------------------
|
//Hamm-Layer - todo invers area ---------------------------------------
|
||||||
|
|
||||||
var myStyle = {
|
var myStyle = {
|
||||||
"color": "grey",
|
"color": "grey",
|
||||||
"fillColor": "lightblue",
|
"fillColor": "lightblue",
|
||||||
@@ -192,32 +190,6 @@
|
|||||||
});
|
});
|
||||||
districtLayer.addTo(mymap);
|
districtLayer.addTo(mymap);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var geoJsonData = {
|
|
||||||
"type": "FeatureCollection",
|
|
||||||
"features": [
|
|
||||||
{ "type": "Feature", "id":"1", "properties": { "address": "2" }, "geometry": { "type": "Point", "coordinates": [51.6792,7.77693] } },
|
|
||||||
{ "type": "Feature", "id":"2", "properties": { "address": "151" }, "geometry": { "type": "Point", "coordinates": [51.6787,7.77699] } },
|
|
||||||
{ "type": "Feature", "id":"3", "properties": { "address": "21" }, "geometry": { "type": "Point", "coordinates": [51.6777,7.77690] } },
|
|
||||||
{ "type": "Feature", "id":"4", "properties": { "address": "14" }, "geometry": { "type": "Point", "coordinates": [51.6798,7.77692] } },
|
|
||||||
{ "type": "Feature", "id":"5", "properties": { "address": "38B" }, "geometry": { "type": "Point", "coordinates": [51.6800,7.77700] } },
|
|
||||||
{ "type": "Feature", "id":"6", "properties": { "address": "38" }, "geometry": { "type": "Point", "coordinates": [51.6747,7.77683] } }
|
|
||||||
]
|
|
||||||
};
|
|
||||||
var markers = L.markerClusterGroup();
|
|
||||||
|
|
||||||
var geoJsonLayer = L.geoJson(geoJsonData, {
|
|
||||||
onEachFeature: function (feature, layer) {
|
|
||||||
layer.bindPopup(feature.properties.address);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
markers.addLayer(geoJsonLayer);
|
|
||||||
|
|
||||||
//mymap.addLayer(markers);
|
|
||||||
// mymap.fitBounds(markers.getBounds());
|
|
||||||
|
|
||||||
// Marker from database -------------------------------------------------------
|
// Marker from database -------------------------------------------------------
|
||||||
|
|
||||||
var marker = [];
|
var marker = [];
|
||||||
@@ -233,6 +205,8 @@
|
|||||||
// Info-Marker für Start --------------------------------------------------------
|
// Info-Marker für Start --------------------------------------------------------
|
||||||
|
|
||||||
var marker2 = L.marker([<?=$numInfoLat?>, <?=$numInfoLng?>], { icon: infoMarker }).addTo(mymap);
|
var marker2 = L.marker([<?=$numInfoLat?>, <?=$numInfoLng?>], { icon: infoMarker }).addTo(mymap);
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
echo "marker2.bindPopup('".$strIntro."');";
|
echo "marker2.bindPopup('".$strIntro."');";
|
||||||
if ($numVehicle==0) {
|
if ($numVehicle==0) {
|
||||||
@@ -241,6 +215,7 @@
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Hide and show marker form checkbox ----------------------------------------
|
// Hide and show marker form checkbox ----------------------------------------
|
||||||
|
|
||||||
$('.check').click(function() {
|
$('.check').click(function() {
|
||||||
|
|||||||
+2
-2
@@ -149,7 +149,7 @@ function nl2br2($string) {
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$strSQL="SELECT count(*) as count FROM data
|
$strSQL="SELECT count(*) as count FROM data
|
||||||
WHERE IstPKW=0 and IstRad=0 and IstKrad and IstGkfz=0 and IstSonstige=0".$strLocation;
|
WHERE IstPKW=0 and IstRad=0 and IstKrad=0 and IstGkfz=0 and IstSonstige=0".$strLocation;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
$strSQL="SELECT count(*) as count FROM data
|
$strSQL="SELECT count(*) as count FROM data
|
||||||
@@ -199,7 +199,7 @@ function nl2br2($string) {
|
|||||||
|
|
||||||
//Erläuterung
|
//Erläuterung
|
||||||
|
|
||||||
$strTable.="<a href='https://recht.nrw.de/lmi/owa/br_vbl_show_pdf?p_id=12225' target='_blank'>Unfalltpyen</a><br>";
|
$strTable.="<a href='https://recht.nrw.de/system/files/VA/11023-12225-mbl26-3anlage8.pdf' target='_blank'>Unfalltpyen</a><br>";
|
||||||
$strTable.="<a href='https://www.destatis.de/DE/Themen/Gesellschaft-Umwelt/Verkehrsunfaelle/Methoden/verkehrsunfaelle-grundbegriffe.pdf?__blob=publicationFile' target='_blank'>Unfallbeschreibung</a><br>";
|
$strTable.="<a href='https://www.destatis.de/DE/Themen/Gesellschaft-Umwelt/Verkehrsunfaelle/Methoden/verkehrsunfaelle-grundbegriffe.pdf?__blob=publicationFile' target='_blank'>Unfallbeschreibung</a><br>";
|
||||||
return $strTable;
|
return $strTable;
|
||||||
}
|
}
|
||||||
@@ -127,3 +127,10 @@ function get_series_verlauf($arrData,$arrBezeichnung){
|
|||||||
return $strResult;
|
return $strResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function titleYears(int $numLatestYear, int $numStartYear) {
|
||||||
|
$html = "";
|
||||||
|
for ($year = $numLatestYear; $year >= $numStartYear; $year--) {
|
||||||
|
$html .= "<th>{$year}</th>";
|
||||||
|
}
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
@@ -60,17 +60,17 @@
|
|||||||
|
|
||||||
<!-- Unfallverlauf -->
|
<!-- Unfallverlauf -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-5">
|
<div class="col-6">
|
||||||
<h4>Unfallverlauf von <?=$numLatestYear?> bis <?=$numStartYear?></h4>
|
<h4>Unfallverlauf von <?=$numLatestYear?> bis <?=$numStartYear?></h4>
|
||||||
<table class='table table-sm'>
|
<table class='table table-sm'>
|
||||||
<tr><th></th><th>2023</th><th>2022</th><th>2021</th><th>2020</th><th>2019</th></tr>
|
<tr><th></th><?= titleYears($numLatestYear, $numStartYear) ?></tr>
|
||||||
<tr><td><?= $arrCategory[1]?></td><?= get_row($resultVerlauf,1) ?></tr>
|
<tr><td><?= $arrCategory[1]?></td><?= get_row($resultVerlauf,1) ?></tr>
|
||||||
<tr><td><?= $arrCategory[2]?></td><?= get_row($resultVerlauf,2) ?></tr>
|
<tr><td><?= $arrCategory[2]?></td><?= get_row($resultVerlauf,2) ?></tr>
|
||||||
<tr><td><?= $arrCategory[3]?></td><?= get_row($resultVerlauf,3) ?></tr>
|
<tr><td><?= $arrCategory[3]?></td><?= get_row($resultVerlauf,3) ?></tr>
|
||||||
<tr><th>Gesamt</th><?= get_row($resultVerlauf,0) ?></tr>
|
<tr><th>Gesamt</th><?= get_row($resultVerlauf,0) ?></tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-7">
|
<div class="col-6">
|
||||||
<div id="c_unfallverlauf"></div>
|
<div id="c_unfallverlauf"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+72
-60
@@ -14,72 +14,95 @@
|
|||||||
<style>
|
<style>
|
||||||
.rechts {text-align:right;background-color:#eee;}
|
.rechts {text-align:right;background-color:#eee;}
|
||||||
.l {border-left: 1px solid black; }
|
.l {border-left: 1px solid black; }
|
||||||
|
/* Sehr kleine Schrift für Tabelle */
|
||||||
|
#unfallzahlen {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Optional: kleinere Schrift auch für Paginierung, Filter, usw. */
|
||||||
|
.dataTables_wrapper {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require("../config.php");
|
||||||
|
// Hilfsfunktionen
|
||||||
|
function jahresHeader($von, $bis, $mitRand = false) {
|
||||||
|
$html = "";
|
||||||
|
for ($y = $von; $y >= $bis; $y--) {
|
||||||
|
$class = ($y == $von && $mitRand) ? " class='l'" : "";
|
||||||
|
$html .= "<th{$class}>{$y}</th>";
|
||||||
|
}
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
function jahresSpaltenSQL($prefix, $von, $bis, $bedingung = "") {
|
||||||
|
$cols = [];
|
||||||
|
for ($y = $von; $y >= $bis; $y--) {
|
||||||
|
$cond = $bedingung ? " AND {$bedingung}" : "";
|
||||||
|
$cols[] = "SUM(UJAHR={$y}{$cond}) as {$prefix}_{$y}";
|
||||||
|
}
|
||||||
|
return implode(",\n ", $cols);
|
||||||
|
}
|
||||||
|
function jahresZellen($row, $prefix, $von, $bis) {
|
||||||
|
$html = "";
|
||||||
|
for ($y = $von; $y >= $bis; $y--) {
|
||||||
|
$class = ($y == $von) ? " class='l'" : "";
|
||||||
|
$html .= "<td{$class}>" . $row["{$prefix}_{$y}"] . "</td>";
|
||||||
|
}
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
<?php include("navbar.php"); ?>
|
<?php include("navbar.php"); ?>
|
||||||
|
|
||||||
|
|
||||||
<div class="container-fluid" style="margin-top:4em;">
|
<div class="container-fluid" style="margin-top:4em;">
|
||||||
<h1>Fahrradunfälle in Nordrhein-Westfalen in Gemeinden</h2>
|
<h1>Fahrradunfälle in Nordrhein-Westfalen in Gemeinden</h2>
|
||||||
<table id="unfallzahlen" class="display">
|
<table id="unfallzahlen" class="display">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th></th>
|
<tr>
|
||||||
<th colspan="4">Fahrradunfälle</th>
|
<th></th>
|
||||||
<th colspan="4">Todesfälle</th>
|
<th colspan="<?= $numLatestYear - $numStartYear + 1 ?>">Fahrradunfälle</th>
|
||||||
<th colspan="4">Schwerverletzte</th>
|
<th colspan="<?= $numLatestYear - $numStartYear + 1 ?>">Todesfälle</th>
|
||||||
<th colspan="4">Leichtverletzte</th>
|
<th colspan="<?= $numLatestYear - $numStartYear + 1 ?>">Schwerverletzte</th>
|
||||||
<th class='l'>Fäche</th>
|
<th colspan="<?= $numLatestYear - $numStartYear + 1 ?>">Leichtverletzte</th>
|
||||||
|
<th class='l'>Fläche</th>
|
||||||
<th>Einw.</th>
|
<th>Einw.</th>
|
||||||
<th>Quote</th>
|
<th>Quote</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr><th>Name</th>
|
<tr>
|
||||||
<th class='l'>2022</th><th>2021</th><th>2020</th><th>2019</th>
|
<th>Name</th>
|
||||||
<th class='l'>2022</th><th>2021</th><th>2020</th><th>2019</th>
|
<?= jahresHeader($numLatestYear, $numStartYear, true) ?>
|
||||||
<th class='l'>2022</th><th>2021</th><th>2020</th><th>2019</th>
|
<?= jahresHeader($numLatestYear, $numStartYear, true) ?>
|
||||||
<th class='l'>2022</th><th>2021</th><th>2020</th><th>2019</th>
|
<?= jahresHeader($numLatestYear, $numStartYear, true) ?>
|
||||||
<th class='l' colspan="2">in Tausend</th><th></th>
|
<?= jahresHeader($numLatestYear, $numStartYear, true) ?>
|
||||||
|
<th class='l' colspan="2">in Tausend</th>
|
||||||
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require("../config.php");
|
|
||||||
|
|
||||||
$strSQL="SELECT d.Name as Gemeinde,
|
|
||||||
SUM(UJAHR=2022) as Jahr_2022,
|
|
||||||
SUM(UJAHR=2021) as Jahr_2021,
|
|
||||||
SUM(UJAHR=2020) as Jahr_2020,
|
|
||||||
SUM(UJAHR=2019) as Jahr_2019,
|
|
||||||
|
|
||||||
SUM(UJAHR=2022 AND UKATEGORIE=1) as Tode_2022,
|
$strSQL = "SELECT d.Name as Gemeinde,
|
||||||
SUM(UJAHR=2021 AND UKATEGORIE=1) as Tode_2021,
|
" . jahresSpaltenSQL('Jahr', $numLatestYear, $numStartYear) . ",
|
||||||
SUM(UJAHR=2020 AND UKATEGORIE=1) as Tode_2020,
|
" . jahresSpaltenSQL('Tode', $numLatestYear, $numStartYear, 'UKATEGORIE=1') . ",
|
||||||
SUM(UJAHR=2019 AND UKATEGORIE=1) as Tode_2019,
|
" . jahresSpaltenSQL('Schwerverletzt', $numLatestYear, $numStartYear, 'UKATEGORIE=2') . ",
|
||||||
|
" . jahresSpaltenSQL('Leichtverletzt', $numLatestYear, $numStartYear, 'UKATEGORIE=3') . ",
|
||||||
SUM(UJAHR=2022 AND UKATEGORIE=2) as Schwerverletzt_2022,
|
|
||||||
SUM(UJAHR=2021 AND UKATEGORIE=2) as Schwerverletzt_2021,
|
|
||||||
SUM(UJAHR=2020 AND UKATEGORIE=2) as Schwerverletzt_2020,
|
|
||||||
SUM(UJAHR=2019 AND UKATEGORIE=2) as Schwerverletzt_2019,
|
|
||||||
|
|
||||||
SUM(UJAHR=2022 AND UKATEGORIE=3) as Leichtverletzt_2022,
|
|
||||||
SUM(UJAHR=2021 AND UKATEGORIE=3) as Leichtverletzt_2021,
|
|
||||||
SUM(UJAHR=2020 AND UKATEGORIE=3) as Leichtverletzt_2020,
|
|
||||||
SUM(UJAHR=2019 AND UKATEGORIE=3) as Leichtverletzt_2019,
|
|
||||||
Flaeche, Einwohner,
|
Flaeche, Einwohner,
|
||||||
SUM(UJAHR=2022)/d.Einwohner*1000 as Quote_2022,
|
SUM(UJAHR={$numLatestYear})/d.Einwohner*1000 as Quote_{$numLatestYear},
|
||||||
d.ULAND,
|
d.ULAND, d.UREGBEZ, d.UKREIS, d.UGEMEINDE
|
||||||
d.UREGBEZ,
|
|
||||||
d.UKREIS,
|
|
||||||
d.UGEMEINDE
|
|
||||||
FROM data s, community d
|
FROM data s, community d
|
||||||
WHERE IstRad=1
|
WHERE IstRad=1
|
||||||
AND d.ULAND=s.ULAND AND d.UREGBEZ=s.UREGBEZ AND d.UKREIS=s.UKREIS AND d.UGEMEINDE=s.UGEMEINDE
|
AND d.ULAND=s.ULAND AND d.UREGBEZ=s.UREGBEZ AND d.UKREIS=s.UKREIS AND d.UGEMEINDE=s.UGEMEINDE
|
||||||
GROUP BY s.ULAND, s.UREGBEZ, s.UKREIS,s.UGEMEINDE
|
GROUP BY s.ULAND, s.UREGBEZ, s.UKREIS, s.UGEMEINDE
|
||||||
ORDER BY Quote_2022 DESC
|
ORDER BY Quote_{$numLatestYear} DESC";
|
||||||
";
|
|
||||||
// --- ORDER BY s.ULAND, s.UREGBEZ, s.UKREIS,s.UGEMEINDE
|
// --- ORDER BY s.ULAND, s.UREGBEZ, s.UKREIS,s.UGEMEINDE
|
||||||
|
|
||||||
$result=$db->query($strSQL);
|
$result=$db->query($strSQL);
|
||||||
@@ -87,27 +110,16 @@ $result=$db->query($strSQL);
|
|||||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td><a href='gemeinde_details.php?regbez=".$row['UREGBEZ']."&kreis=".$row['UKREIS']."&gemeinde=".$row['UGEMEINDE']."'>".$row['Gemeinde']."</a></td>";
|
echo "<td><a href='gemeinde_details.php?regbez=".$row['UREGBEZ']."&kreis=".$row['UKREIS']."&gemeinde=".$row['UGEMEINDE']."'>".$row['Gemeinde']."</a></td>";
|
||||||
echo "<td class='l'>".$row['Jahr_2022']."</td>";
|
echo jahresZellen($row, 'Jahr', $numLatestYear, $numStartYear);
|
||||||
echo "<td>".$row['Jahr_2021']."</td>";
|
echo jahresZellen($row, 'Tode', $numLatestYear, $numStartYear);
|
||||||
echo "<td>".$row['Jahr_2020']."</td>";
|
echo jahresZellen($row, 'Schwerverletzt', $numLatestYear, $numStartYear);
|
||||||
echo "<td>".$row['Jahr_2019']."</td>";
|
echo jahresZellen($row, 'Leichtverletzt', $numLatestYear, $numStartYear);
|
||||||
echo "<td class='l'>".$row['Tode_2022']."</td>";
|
|
||||||
echo "<td>".$row['Tode_2021']."</td>";
|
|
||||||
echo "<td>".$row['Tode_2020']."</td>";
|
|
||||||
echo "<td>".$row['Tode_2019']."</td>";
|
|
||||||
echo "<td class='l'>".$row['Schwerverletzt_2022']."</td>";
|
|
||||||
echo "<td>".$row['Schwerverletzt_2021']."</td>";
|
|
||||||
echo "<td>".$row['Schwerverletzt_2020']."</td>";
|
|
||||||
echo "<td>".$row['Schwerverletzt_2019']."</td>";
|
|
||||||
echo "<td class='l'>".$row['Leichtverletzt_2022']."</td>";
|
|
||||||
echo "<td>".$row['Leichtverletzt_2021']."</td>";
|
|
||||||
echo "<td>".$row['Leichtverletzt_2020']."</td>";
|
|
||||||
echo "<td>".$row['Leichtverletzt_2019']."</td>";
|
|
||||||
echo "<td class='rechts l'>".$row['Flaeche']."</td>";
|
echo "<td class='rechts l'>".$row['Flaeche']."</td>";
|
||||||
echo "<td class='rechts'>".round($row['Einwohner']/1000,1)."</td>";
|
echo "<td class='rechts'>".round($row['Einwohner']/1000,1)."</td>";
|
||||||
echo "<td class='rechts'>".round($row['Quote_2022'],2)."</td>";
|
echo "<td class='rechts'>".round($row["Quote_{$numLatestYear}"],2)."</td>";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ Highcharts.chart('c_unfallverlauf', {
|
|||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
categories: ['2023','2022','2021','2020','2019']
|
categories: ['2025','2024','2023','2022','2021','2020','2019']
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
min: 0,
|
min: 0,
|
||||||
|
|||||||
@@ -39,13 +39,13 @@
|
|||||||
<a href="https://www.govdata.de/dl-de/by-2-0" target="_blanc">Datenlizenz Deutschland – Namensnennung – Version 2.0</a></p>
|
<a href="https://www.govdata.de/dl-de/by-2-0" target="_blanc">Datenlizenz Deutschland – Namensnennung – Version 2.0</a></p>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<div style="border:2px solid red; background-color: lightgray; padding:4px;">
|
||||||
Die im Unfallatlas visualisierten Unfalldaten stammen aus der Statistik der Straßenverkehrsunfälle,
|
Die im Unfallatlas visualisierten Unfalldaten stammen aus der Statistik der Straßenverkehrsunfälle,
|
||||||
die auf den Meldungen der Polizei basiert. Falls die Geo-Koordinaten der Unfallmeldung nicht einer
|
die auf den Meldungen der Polizei basiert. Falls die Geo-Koordinaten der Unfallmeldung nicht einer
|
||||||
Straße eindeutig zugeordnet werden können (Abgleich mit den Straßengeometrien der amtlichen Vermessungsverwaltung),
|
Straße eindeutig zugeordnet werden können (Abgleich mit den Straßengeometrien der amtlichen Vermessungsverwaltung),
|
||||||
werden sie nicht im Unfallatlas abgebildet. Die Zuordnungsquoten der Unfallkoordinaten
|
werden sie nicht im Unfallatlas abgebildet. Die Zuordnungsquoten der Unfallkoordinaten
|
||||||
im Unfallatlas liegen bei mehr als 90 Prozent.
|
im Unfallatlas liegen bei mehr als 90 Prozent.
|
||||||
</p>
|
</div>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<ul class="list-group" style="width:40em;">
|
<ul class="list-group" style="width:40em;">
|
||||||
<li class="list-group-item"><a href="nrw_details.php"><strong>Landeswerte NRW</strong></a></li>
|
<li class="list-group-item"><a href="nrw_details.php"><strong>Landeswerte NRW</strong></a></li>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<a targe="_blank" href="https://www.destatis.de/DE/Themen/Gesellschaft-Umwelt/Verkehrsunfaelle/Methoden/verkehrsunfaelle-grundbegriffe.pdf?__blob=publicationFile">Beschreibung der Unfalldaten</a>
|
<a targe="_blank" href="https://www.destatis.de/DE/Themen/Gesellschaft-Umwelt/Verkehrsunfaelle/Methoden/verkehrsunfaelle-grundbegriffe.pdf?__blob=publicationFile">Beschreibung der Unfalldaten</a>
|
||||||
liefert das Statistische Bundesamt.</p>
|
liefert das Statistische Bundesamt.</p>
|
||||||
<p>Weiter Informationen zu den Unfalltypen gibt es in dieser
|
<p>Weiter Informationen zu den Unfalltypen gibt es in dieser
|
||||||
<a href="https://recht.nrw.de/lmi/owa/br_vbl_show_pdf?p_id=12225">Kurzbeschreibung.
|
<a href="https://recht.nrw.de/system/files/VA/11023-12225-mbl26-3anlage8.pdf">Kurzbeschreibung.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
require_once("../config.php");
|
require_once("../config.php");
|
||||||
require_once("../lib/attributes.php");
|
require_once("../lib/attributes.php");
|
||||||
require_once("functions.php");
|
require_once("functions.php");
|
||||||
|
|
||||||
$numLand=5; // NRW
|
$numLand=5; // NRW
|
||||||
$numRegbez=(isset($_GET['regbez'])) ? (int)$_GET['regbez'] : 1;
|
$numRegbez=(isset($_GET['regbez'])) ? (int)$_GET['regbez'] : 1;
|
||||||
$numKreis=(isset($_GET['kreis'])) ? (int)$_GET['kreis'] : 1;
|
$numKreis=(isset($_GET['kreis'])) ? (int)$_GET['kreis'] : 1;
|
||||||
@@ -65,17 +66,17 @@
|
|||||||
<p><a class='btn btn-primary' href="../index.php?d=<?=$strDistrict?>">Zur Unfallkarte</a></p>
|
<p><a class='btn btn-primary' href="../index.php?d=<?=$strDistrict?>">Zur Unfallkarte</a></p>
|
||||||
<!-- Unfallverlauf -->
|
<!-- Unfallverlauf -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-5">
|
<div class="col-6">
|
||||||
<h4>Unfallverlauf von <?=$numLatestYear?> bis <?=$numStartYear?></h4>
|
<h4>Unfallverlauf von <?=$numLatestYear?> bis <?=$numStartYear?></h4>
|
||||||
<table class='table table-sm'>
|
<table class='table table-sm'>
|
||||||
<tr><th></th><th>2023</th><th>2022</th><th>2021</th><th>2020</th><th>2019</th></tr>
|
<tr><th></th><?= titleYears($numLatestYear, $numStartYear); ?></tr>
|
||||||
<tr><td><?= $arrCategory[1]?></td><?= get_row($resultVerlauf,1) ?></tr>
|
<tr><td><?= $arrCategory[1]?></td><?= get_row($resultVerlauf,1) ?></tr>
|
||||||
<tr><td><?= $arrCategory[2]?></td><?= get_row($resultVerlauf,2) ?></tr>
|
<tr><td><?= $arrCategory[2]?></td><?= get_row($resultVerlauf,2) ?></tr>
|
||||||
<tr><td><?= $arrCategory[3]?></td><?= get_row($resultVerlauf,3) ?></tr>
|
<tr><td><?= $arrCategory[3]?></td><?= get_row($resultVerlauf,3) ?></tr>
|
||||||
<tr><th>Gesamt</th><?= get_row($resultVerlauf,0) ?></tr>
|
<tr><th>Gesamt</th><?= get_row($resultVerlauf,0) ?></tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-7">
|
<div class="col-6">
|
||||||
<div id="c_unfallverlauf"></div>
|
<div id="c_unfallverlauf"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+44
-17
@@ -14,7 +14,18 @@
|
|||||||
<style>
|
<style>
|
||||||
.rechts {text-align:right;}
|
.rechts {text-align:right;}
|
||||||
.l {border-left: 1px solid black; }
|
.l {border-left: 1px solid black; }
|
||||||
|
|
||||||
|
/* Sehr kleine Schrift für Tabelle */
|
||||||
|
#unfallzahlen {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Optional: kleinere Schrift auch für Paginierung, Filter, usw. */
|
||||||
|
.dataTables_wrapper {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
@@ -27,19 +38,19 @@
|
|||||||
<thead>
|
<thead>
|
||||||
|
|
||||||
<tr><th></th>
|
<tr><th></th>
|
||||||
<th colspan="5">Fahrradunfälle</th>
|
<th colspan="7">Fahrradunfälle</th>
|
||||||
<th colspan="5">Todesfälle</th>
|
<th colspan="7">Todesfälle</th>
|
||||||
<th colspan="5">Schwerverletzte</th>
|
<th colspan="7">Schwerverletzte</th>
|
||||||
<th colspan="5">Leichtverletzte</th>
|
<th colspan="7">Leichtverletzte</th>
|
||||||
<th></th><th></th>
|
<th></th><th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr><th>Kreis</th>
|
<tr><th>Kreis</th>
|
||||||
<th class="l">2023</th><th>2022</th><th>2021</th><th>2020</th><th>2019</th>
|
<th class="l">2025</th><th>2024</th><th>2023</th><th>2022</th><th>2021</th><th>2020</th><th>2019</th>
|
||||||
<th class="l">2023</th><th>2022</th><th>2021</th><th>2020</th><th>2019</th>
|
<th class="l">2025</th><th>2024</th><th>2023</th><th>2022</th><th>2021</th><th>2020</th><th>2019</th>
|
||||||
<th class="l">2023</th><th>2022</th><th>2021</th><th>2020</th><th>2019</th>
|
<th class="l">2025</th><th>2024</th><th>2023</th><th>2022</th><th>2021</th><th>2020</th><th>2019</th>
|
||||||
<th class="l">2023</th><th>2022</th><th>2021</th><th>2020</th><th>2019</th>
|
<th class="l">2025</th><th>2024</th><th>2023</th><th>2022</th><th>2021</th><th>2020</th><th>2019</th>
|
||||||
<th class="l">Einw. in Tausend</th><th>Quote</th>
|
<th class ="l"> Einw. in Tausend </th><th> Quote </th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -50,67 +61,83 @@ require("../config.php");
|
|||||||
|
|
||||||
$strSQL="SELECT d.title as Kreis,
|
$strSQL="SELECT d.title as Kreis,
|
||||||
district,
|
district,
|
||||||
|
SUM(UJAHR=2025) as Jahr_2025,
|
||||||
|
SUM(UJAHR=2024) as Jahr_2024,
|
||||||
SUM(UJAHR=2023) as Jahr_2023,
|
SUM(UJAHR=2023) as Jahr_2023,
|
||||||
SUM(UJAHR=2022) as Jahr_2022,
|
SUM(UJAHR=2022) as Jahr_2022,
|
||||||
SUM(UJAHR=2021) as Jahr_2021,
|
SUM(UJAHR=2021) as Jahr_2021,
|
||||||
SUM(UJAHR=2020) as Jahr_2020,
|
SUM(UJAHR=2020) as Jahr_2020,
|
||||||
SUM(UJAHR=2019) as Jahr_2019,
|
SUM(UJAHR=2019) as Jahr_2019,
|
||||||
|
|
||||||
|
SUM(UJAHR=2025 AND UKATEGORIE=1) as Tode_2025,
|
||||||
|
SUM(UJAHR=2024 AND UKATEGORIE=1) as Tode_2024,
|
||||||
SUM(UJAHR=2023 AND UKATEGORIE=1) as Tode_2023,
|
SUM(UJAHR=2023 AND UKATEGORIE=1) as Tode_2023,
|
||||||
SUM(UJAHR=2022 AND UKATEGORIE=1) as Tode_2022,
|
SUM(UJAHR=2022 AND UKATEGORIE=1) as Tode_2022,
|
||||||
SUM(UJAHR=2021 AND UKATEGORIE=1) as Tode_2021,
|
SUM(UJAHR=2021 AND UKATEGORIE=1) as Tode_2021,
|
||||||
SUM(UJAHR=2020 AND UKATEGORIE=1) as Tode_2020,
|
SUM(UJAHR=2020 AND UKATEGORIE=1) as Tode_2020,
|
||||||
SUM(UJAHR=2019 AND UKATEGORIE=1) as Tode_2019,
|
SUM(UJAHR=2019 AND UKATEGORIE=1) as Tode_2019,
|
||||||
|
|
||||||
|
SUM(UJAHR=2025 AND UKATEGORIE=2) as Schwerverletzt_2025,
|
||||||
|
SUM(UJAHR=2024 AND UKATEGORIE=2) as Schwerverletzt_2024,
|
||||||
SUM(UJAHR=2023 AND UKATEGORIE=2) as Schwerverletzt_2023,
|
SUM(UJAHR=2023 AND UKATEGORIE=2) as Schwerverletzt_2023,
|
||||||
SUM(UJAHR=2022 AND UKATEGORIE=2) as Schwerverletzt_2022,
|
SUM(UJAHR=2022 AND UKATEGORIE=2) as Schwerverletzt_2022,
|
||||||
SUM(UJAHR=2021 AND UKATEGORIE=2) as Schwerverletzt_2021,
|
SUM(UJAHR=2021 AND UKATEGORIE=2) as Schwerverletzt_2021,
|
||||||
SUM(UJAHR=2020 AND UKATEGORIE=2) as Schwerverletzt_2020,
|
SUM(UJAHR=2020 AND UKATEGORIE=2) as Schwerverletzt_2020,
|
||||||
SUM(UJAHR=2019 AND UKATEGORIE=2) as Schwerverletzt_2019,
|
SUM(UJAHR=2019 AND UKATEGORIE=2) as Schwerverletzt_2019,
|
||||||
|
|
||||||
|
SUM(UJAHR=2025 AND UKATEGORIE=3) as Leichtverletzt_2025,
|
||||||
|
SUM(UJAHR=2024 AND UKATEGORIE=3) as Leichtverletzt_2024,
|
||||||
SUM(UJAHR=2023 AND UKATEGORIE=3) as Leichtverletzt_2023,
|
SUM(UJAHR=2023 AND UKATEGORIE=3) as Leichtverletzt_2023,
|
||||||
SUM(UJAHR=2022 AND UKATEGORIE=3) as Leichtverletzt_2022,
|
SUM(UJAHR=2022 AND UKATEGORIE=3) as Leichtverletzt_2022,
|
||||||
SUM(UJAHR=2021 AND UKATEGORIE=3) as Leichtverletzt_2021,
|
SUM(UJAHR=2021 AND UKATEGORIE=3) as Leichtverletzt_2021,
|
||||||
SUM(UJAHR=2020 AND UKATEGORIE=3) as Leichtverletzt_2020,
|
SUM(UJAHR=2020 AND UKATEGORIE=3) as Leichtverletzt_2020,
|
||||||
SUM(UJAHR=2019 AND UKATEGORIE=3) as Leichtverletzt_2019,
|
SUM(UJAHR=2019 AND UKATEGORIE=3) as Leichtverletzt_2019,
|
||||||
d.Population as Population,
|
d.Population as Population,
|
||||||
SUM(UJAHR=2023)/d.Population*1000 as Quote_2023,
|
SUM(UJAHR=2025)/d.Population*1000 as Quote_2025,
|
||||||
s.ULAND,
|
s.ULAND,
|
||||||
s.UREGBEZ ,
|
s.UREGBEZ,
|
||||||
s.UKREIS
|
s.UKREIS
|
||||||
FROM data s, district d
|
FROM data s, district d
|
||||||
WHERE IstRad=1
|
WHERE IstRad=1
|
||||||
AND d.ULAND=s.ULAND AND d.UREGBEZ=s.UREGBEZ AND d.UKREIS=s.UKREIS
|
AND d.ULAND=s.ULAND AND d.UREGBEZ=s.UREGBEZ AND d.UKREIS=s.UKREIS
|
||||||
GROUP BY s.ULAND, s.UREGBEZ, s.UKREIS
|
GROUP BY s.ULAND, s.UREGBEZ, s.UKREIS
|
||||||
ORDER BY Quote_2023 DESC;";
|
ORDER BY Quote_2025 DESC;";
|
||||||
|
|
||||||
$result=$db->query($strSQL);
|
$result=$db->query($strSQL);
|
||||||
|
|
||||||
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td><a href='kreis_details.php?regbez=".$row['UREGBEZ']."&kreis=".$row['UKREIS']."'>".$row['Kreis']."</a></td>";
|
echo "<td><a href='kreis_details.php?regbez=".$row['UREGBEZ']."&kreis=".$row['UKREIS']."'>".$row['Kreis']."</a></td>";
|
||||||
echo "<td class='l'>".$row['Jahr_2023']."</td>";
|
echo "<td class='l'>".$row['Jahr_2025']."</td>";
|
||||||
|
echo "<td>".$row['Jahr_2024']."</td>";
|
||||||
|
echo "<td>".$row['Jahr_2023']."</td>";
|
||||||
echo "<td>".$row['Jahr_2022']."</td>";
|
echo "<td>".$row['Jahr_2022']."</td>";
|
||||||
echo "<td>".$row['Jahr_2021']."</td>";
|
echo "<td>".$row['Jahr_2021']."</td>";
|
||||||
echo "<td>".$row['Jahr_2020']."</td>";
|
echo "<td>".$row['Jahr_2020']."</td>";
|
||||||
echo "<td>".$row['Jahr_2019']."</td>";
|
echo "<td>".$row['Jahr_2019']."</td>";
|
||||||
echo "<td class='l'>".$row['Tode_2023']."</td>";
|
echo "<td class='l'>".$row['Tode_2025']."</td>";
|
||||||
|
echo "<td>".$row['Tode_2024']."</td>";
|
||||||
|
echo "<td>".$row['Tode_2023']."</td>";
|
||||||
echo "<td>".$row['Tode_2022']."</td>";
|
echo "<td>".$row['Tode_2022']."</td>";
|
||||||
echo "<td>".$row['Tode_2021']."</td>";
|
echo "<td>".$row['Tode_2021']."</td>";
|
||||||
echo "<td>".$row['Tode_2020']."</td>";
|
echo "<td>".$row['Tode_2020']."</td>";
|
||||||
echo "<td>".$row['Tode_2019']."</td>";
|
echo "<td>".$row['Tode_2019']."</td>";
|
||||||
echo "<td class='l'>".$row['Schwerverletzt_2023']."</td>";
|
echo "<td class='l'>".$row['Schwerverletzt_2025']."</td>";
|
||||||
|
echo "<td>".$row['Schwerverletzt_2024']."</td>";
|
||||||
|
echo "<td>".$row['Schwerverletzt_2023']."</td>";
|
||||||
echo "<td>".$row['Schwerverletzt_2022']."</td>";
|
echo "<td>".$row['Schwerverletzt_2022']."</td>";
|
||||||
echo "<td>".$row['Schwerverletzt_2021']."</td>";
|
echo "<td>".$row['Schwerverletzt_2021']."</td>";
|
||||||
echo "<td>".$row['Schwerverletzt_2020']."</td>";
|
echo "<td>".$row['Schwerverletzt_2020']."</td>";
|
||||||
echo "<td>".$row['Schwerverletzt_2019']."</td>";
|
echo "<td>".$row['Schwerverletzt_2019']."</td>";
|
||||||
echo "<td class='l'>".$row['Leichtverletzt_2023']."</td>";
|
echo "<td class='l'>".$row['Leichtverletzt_2025']."</td>";
|
||||||
|
echo "<td>".$row['Leichtverletzt_2024']."</td>";
|
||||||
|
echo "<td>".$row['Leichtverletzt_2023']."</td>";
|
||||||
echo "<td>".$row['Leichtverletzt_2022']."</td>";
|
echo "<td>".$row['Leichtverletzt_2022']."</td>";
|
||||||
echo "<td>".$row['Leichtverletzt_2021']."</td>";
|
echo "<td>".$row['Leichtverletzt_2021']."</td>";
|
||||||
echo "<td>".$row['Leichtverletzt_2020']."</td>";
|
echo "<td>".$row['Leichtverletzt_2020']."</td>";
|
||||||
echo "<td>".$row['Leichtverletzt_2019']."</td>";
|
echo "<td>".$row['Leichtverletzt_2019']."</td>";
|
||||||
echo "<td class='l rechts'>".round($row['Population']/1000,0)."</td>";
|
echo "<td class='l rechts'>".round($row['Population']/1000,0)."</td>";
|
||||||
echo "<td class='rechts'>".round($row['Quote_2023'],2)."</td>";
|
echo "<td class='rechts'>".round($row['Quote_2025'],2)."</td>";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -52,17 +52,19 @@
|
|||||||
|
|
||||||
<!-- Unfallverlauf -->
|
<!-- Unfallverlauf -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-5">
|
<div class="col-6">
|
||||||
<h4>Unfallverlauf von <?=$numLatestYear?> bis <?=$numStartYear?></h4>
|
<h4>Unfallverlauf von <?=$numLatestYear?> bis <?=$numStartYear?></h4>
|
||||||
<table class='table table-sm'>
|
<table class='table table-sm'>
|
||||||
<tr><th></th><th>2023</th><th>2022</th><th>2021</th><th>2020</th><th>2019</th></tr>
|
<tr><th></th><?= titleYears($numLatestYear, $numStartYear) ?></tr>
|
||||||
<tr><td><?= $arrCategory[1]?></td><?= get_row($resultVerlauf,1) ?></tr>
|
<tr><td><?= $arrCategory[1]?></td><?= get_row($resultVerlauf,1) ?></tr>
|
||||||
<tr><td><?= $arrCategory[2]?></td><?= get_row($resultVerlauf,2) ?></tr>
|
<tr><td><?= $arrCategory[2]?></td><?= get_row($resultVerlauf,2) ?></tr>
|
||||||
<tr><td><?= $arrCategory[3]?></td><?= get_row($resultVerlauf,3) ?></tr>
|
<tr><td><?= $arrCategory[3]?></td><?= get_row($resultVerlauf,3) ?></tr>
|
||||||
<tr><th>Gesamt</th><?= get_row($resultVerlauf,0) ?></tr>
|
<tr><th>Gesamt</th><?= get_row($resultVerlauf,0) ?></tr>
|
||||||
</table>
|
</table>
|
||||||
|
<p><strong>Beachte:</strong> Die Zahlen beziehen sich auf die Unfälle, die eindeutig einer Straße zugeordent werden konnten
|
||||||
|
und entsprechen laut IT.NRW nur ca. 90 % der insgesamt erfassten Unfälle.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-7">
|
<div class="col-6">
|
||||||
<div id="c_unfallverlauf"></div>
|
<div id="c_unfallverlauf"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user