blob: 197e5b1f73f5754a2a85858c783006ba8078d96e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
= Living space
:description: Documentation for the Living space
:sectanchors:
:url-repo: https://git.tammi.cc/housing.git
SVG and WGS84 https://www.w3.org/TR/SVG11/coords.html
The project consists of three parts:
1. Application (native web browser)
2. CouchDB and S3
3. Scraper (Golang)
The developments tools are listed in flake.nix. The development environment can be start with command:
[source,bash]
----
nix develop
----
== Application
There is a development server `server.js` that serves the app and static assets.
The application resides in app directory.
[%header,format=tsv]
|===
include::./app/requirements.tsv[]
|===
Run (the development server) with:
[source,bash]
----
node server.js
----
Static assets are deployed directly to a web server with Git.
Later it could be possible to download the assets to CounchDB.
== Scraper runner
Golang implementation fetches the data to CouchDB.
The runner resides in scrape directory.
[%header,format=tsv]
|===
include::./scrape/requirements.tsv[]
|===
The running will require some cookies to be gotten from a web browser. Run with:
[source,bash]
----
export OTA_TOKEN=...
export OTA_CUID=...
export OTA_LOADED=...
export PHPSESSID=...
go run main.go
----
== Next steps
- Implement additional map features: "koulut", "päiväkodit"
- User journey matching for features and fixes accordingly
- UTM projection for geometry
- WebGL?
- Better colors for map
- Lots of refactoring across everything. Code can be reduced by atleast 40% with smarter use
- Make touch gestures work better
== Analysis Data processing
List of open WFS data sources are in:
https://kartta.hel.fi/avoindata/dokumentit/Aineistolista_wfs_avoindata.html
WFS Capabilities can be found from:
https://kartta.hel.fi/ws/geoserver/avoindata/wfs?version=2.0.0&request=GetCapabilities
The node.js script `download.js` downloads the material.
Description of the statistical data can be found from:
https://hri.fi/data/fi/dataset/helsingin-seudun-aluesarjat-tilastotietokannan-tiedot-paikkatietona
, and the description at:
https://www.hel.fi/static/avoindata/dokumentit/Aluesarjat_Avainluvut_2024.pdf
|