Skip to content

Instantly share code, notes, and snippets.

@mfa
Last active December 31, 2020 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfa/7a21d9d156e4198f983ef916f820d4c6 to your computer and use it in GitHub Desktop.
Save mfa/7a21d9d156e4198f983ef916f820d4c6 to your computer and use it in GitHub Desktop.

Datasette DEMO for CozyConf 2020

Download data

https://qri.cloud/mfdz/stuttgart_gelbekarten – needs login :(

Install required packages

pip install csvs-to-sqlite datasette datasette-cluster-map

Convert csv to sqlite

unzip stuttgart_gelbekarten.zip
csvs-to-sqlite body.csv gkarten.db

Add metadata.yml

(for cluster-map plugin)

---
title: Gelbe Karten Stuttgart
plugins:
  datasette-cluster-map:
    latitude_column: lat
    longitude_column: lon

Run in datasette

datasette gkarten.db -m metadata.yml

goto http://localhost:8001

Run on Google Cloud Run

datasette publish cloudrun gkarten.db --service gelbekartenstuttgart --install=datasette-cluster-map -m metadata.yml 

Live version (not online anymore): https://gelbekartenstuttgart-ejn6yf4k4q-ez.a.run.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment