mirror of
https://github.com/Findus23/RainbowRoad.git
synced 2024-09-19 16:03:52 +02:00
some more
This commit is contained in:
parent
5c8f2c9485
commit
842b790c74
5 changed files with 138 additions and 3 deletions
18
commands/stats.ts
Normal file
18
commands/stats.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import * as fs from "fs";
|
||||
import type {Crossing} from "../interfaces";
|
||||
|
||||
function runstats() {
|
||||
const data: Crossing[] = JSON.parse(fs.readFileSync("../data/data.json", 'utf8'));
|
||||
|
||||
|
||||
const bezirke = data.map(c => c.bezirk)
|
||||
const counts: { [key: number]: number } = {};
|
||||
|
||||
for (const num of bezirke) {
|
||||
counts[num] = counts[num] ? counts[num] + 1 : 1;
|
||||
}
|
||||
console.log(counts)
|
||||
|
||||
}
|
||||
|
||||
runstats()
|
113
data/data.json
113
data/data.json
|
@ -36,8 +36,15 @@
|
|||
{
|
||||
"id": 2,
|
||||
"name": "Spitalgasse/Lazarettgasse",
|
||||
"bezirk": 5,
|
||||
"bezirk": 9,
|
||||
"type": "transFlag",
|
||||
"sources": [
|
||||
{
|
||||
"type": "news",
|
||||
"url": "https://www.meinbezirk.at/alsergrund/c-lokales/erster-trans-pride-zebrastreifen-in-wien_a4559450",
|
||||
"date": "2021-03-31"
|
||||
}
|
||||
],
|
||||
"geosource": {
|
||||
"type": "OSMnodes",
|
||||
"nodes": [
|
||||
|
@ -464,5 +471,107 @@
|
|||
],
|
||||
"length": 13.05
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"name": "Simmeringer Platz",
|
||||
"bezirk": 11,
|
||||
"type": "prideFlag",
|
||||
"sources": [
|
||||
{
|
||||
"type": "news",
|
||||
"url": "https://www.ggg.at/2021/06/11/erster-regenbogen-zebrastreifen-in-wien-simmering/",
|
||||
"date": "2021-06-11"
|
||||
}
|
||||
],
|
||||
"geosource": {
|
||||
"type": "OSMnodes",
|
||||
"nodes": [
|
||||
3635936885,
|
||||
1187573973,
|
||||
3635936886
|
||||
]
|
||||
},
|
||||
"geo": {
|
||||
"coords": [
|
||||
[
|
||||
16.4204776,
|
||||
48.1699476
|
||||
],
|
||||
[
|
||||
16.4207196,
|
||||
48.1697158
|
||||
]
|
||||
],
|
||||
"length": 31.41
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"name": "Mauer Hauptplatz",
|
||||
"bezirk": 23,
|
||||
"type": "prideFlag",
|
||||
"sources": [
|
||||
{
|
||||
"type": "news",
|
||||
"url": "https://www.meinbezirk.at/liesing/c-lokales/der-erste-regenbogenschutzweg-im-23-bezirk-wurde-eingeweiht_a4867192#gallery=null",
|
||||
"date": "2021-09-07"
|
||||
}
|
||||
],
|
||||
"geosource": {
|
||||
"type": "OSMnodes",
|
||||
"nodes": [
|
||||
4813210229,
|
||||
3324119404,
|
||||
4813210228
|
||||
]
|
||||
},
|
||||
"geo": {
|
||||
"coords": [
|
||||
[
|
||||
16.2687464,
|
||||
48.1507156
|
||||
],
|
||||
[
|
||||
16.2686484,
|
||||
48.1505228
|
||||
]
|
||||
],
|
||||
"length": 22.64
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"name": "Elterleinplatz/Kalvarienberggasse",
|
||||
"bezirk": 17,
|
||||
"type": "prideFlag",
|
||||
"sources": [
|
||||
{
|
||||
"type": "official",
|
||||
"url": "https://www.wien.gv.at/bezirke/hernals/politik/regenbogen-schutzweg.html",
|
||||
"date": "2021-05-05"
|
||||
}
|
||||
],
|
||||
"geosource": {
|
||||
"type": "OSMnodes",
|
||||
"nodes": [
|
||||
2888584160,
|
||||
2560176397,
|
||||
2560176389
|
||||
]
|
||||
},
|
||||
"geo": {
|
||||
"coords": [
|
||||
[
|
||||
16.3323528,
|
||||
48.2182154
|
||||
],
|
||||
[
|
||||
16.3324665,
|
||||
48.2181988
|
||||
]
|
||||
],
|
||||
"length": 8.62
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
6
missing.md
Normal file
6
missing.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
https://www.ggg.at/2020/07/31/am-guertel-gibt-es-jetzt-den-laengsten-regenbogen-zebrastreifen/
|
||||
Gürtel/Felberstraße (7x)
|
||||
|
||||
Josefstädter Straße/Albertgasse (1+2)
|
||||
https://www.ggg.at/2021/04/23/neue-regenbogen-zebrastreifen-in-der-josefstadt-und-in-floridsdorf/
|
||||
Floridsdorfer Spitz (3x)
|
|
@ -4,6 +4,7 @@
|
|||
"description": "",
|
||||
"scripts": {
|
||||
"fetch": "cd commands && ts-node fetch.ts",
|
||||
"stats": "cd commands && ts-node stats.ts",
|
||||
"dev": "vite",
|
||||
"build": "tsc --skipLibCheck && vite build",
|
||||
"preview": "vite preview",
|
||||
|
|
|
@ -46,7 +46,8 @@ const map = new Map({
|
|||
view: new View({
|
||||
center: fromLonLat([16.3787, 48.2089]),
|
||||
zoom: 13,
|
||||
extent: transformExtent([16.2988, 48.1353, 16.4986, 48.2974], 'EPSG:4326', 'EPSG:3857'),
|
||||
// https://www.wien.gv.at/statistik/lebensraum/tabellen/stadtgebiet-eckdaten.html
|
||||
extent: transformExtent([16.18278, 48.11833, 16.58, 48.32306], 'EPSG:4326', 'EPSG:3857'),
|
||||
constrainOnlyCenter: true
|
||||
})
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue