Go to file
ttomasz 9d84fcb5bb
Merge pull request #50 from openstreetmap-polska/google_sheets
Google sheets integration
2022-01-24 00:00:11 +01:00
.github/workflows added github actions to run deploys 2021-12-07 23:36:08 +01:00
src Merge pull request #50 from openstreetmap-polska/google_sheets 2022-01-24 00:00:11 +01:00
.gitignore added spreadsheet export 2022-01-14 02:04:32 +01:00
LICENSE Initial commit 2021-11-26 20:01:12 +01:00
README.md updated readme 2022-01-23 20:14:26 +01:00
aed_poland.csv Fixed missing 'location' tag 2022-01-05 17:11:55 +01:00
aed_poland.geojson Fixed missing 'location' tag 2022-01-05 17:11:55 +01:00
aed_poland_metadata.json Fixed missing 'location' tag 2022-01-05 17:11:55 +01:00
download_data.py improvements 2022-01-23 23:58:39 +01:00
index.html Merge pull request #50 from openstreetmap-polska/google_sheets 2022-01-24 00:00:11 +01:00
land.html added poc of functionality for adding nodes within map using ouath to authorize at osm api 2021-12-19 22:20:43 +01:00
requirements.txt added download capability for custom layer from google sheets 2022-01-23 20:15:56 +01:00
site.webmanifest Name in webmanifest 2022-01-02 10:29:00 +01:00
taginfo.json added metadata for taginfo 2021-12-25 12:55:49 +01:00

README.md

Mapa defibrylatorów AED

English: Map presenting locations of defibrillators based on OpenStreetMap data.

To repozytorium zawiera kod strony prezentujacej lokalizacje defibrylatorów AED.

Dane pochodzą z bazy OpenStreetMap, którą każdy może uzupełniać do czego chcemy zachęcić.

Informacje o defibrylatorach są zawyczaj udostępniane przez poszczególnych operatorów lub jednostki samorządowe. Przez taką fragmentację ciężej znaleźć takie urządzenia. OSM jest otwartym zbiorem danych i zawsze taki pozostanie, więc dane mogą być wykorzystywane przez inne aplikacje webowe i mobilne.

Poza pobieraniem danych bezpośrednio z OSM albo za pomocą usług jak Overpass API dane wyświetlane na stronie można pobrać w formacie:

Gitflow

branch 'development' -> branch 'main'

Branch 'development' jest hostowany pod: https://aed.openstreetmap.org.pl/dev/ a branch 'main' pod: https://aed.openstreetmap.org.pl/

Github actions robi deploy gdy pojawiają się nowe commity na tych branch-ach.

Nowe branche powinny być bazowane na 'development' i PR mergowane również do 'development'. Następnie PR z brancha 'development' do 'main'.

Technical information [ENG]

This is a simple static website using HTML and vanilla JavaScript. Any webserver (Nginx/Apache) or things like S3 or GitHub Pages can be used to host frontend part.

The only thing that requires code execution is Python script that downloads data from Overpass API and converts it to GeoJSON and CSV files.

The only external package used is requests which can be installed using pip if not present in the system already.

Example CSV and GeoJSON files are uploaded to repo.

Scripts used to deploy on our server

Stack: Ubuntu/Nginx

Clone repo:

git clone --branch main --single-branch https://github.com/openstreetmap-polska/aed-mapa.git /home/aeduser/aed-mapa/

Deploy to /var/www/:

cd /home/aeduser/aed-mapa/
git pull
rsync --update --recursive --delete --exclude '*.py' --exclude '*.geojson' --exclude '*.json' --exclude '.git*'  --verbose /home/aeduser/aed-mapa/ /var/www/html/

Download new data (set crontab to run it periodically):

python3 /home/aeduser/aed-mapa/src/download_data.py /home/aeduser/aed_poland.geojson /home/aeduser/aed_poland.csv
cp /home/aeduser/aed_poland.geojson /var/www/html/aed_poland.geojson
cp /home/aeduser/aed_poland_metadata.json /var/www/html/aed_poland_metadata.json
cp /home/aeduser/aed_poland.csv /var/www/html/aed_poland.csv

Alternatives / Inne podobne