Skip to main content

CityJSON renderer for Jupyter Notebook / JupyterLab

Project description

CityView

CityJSON loader and renderer for three.js, react-three-fiber, and Jupyter Notebook / JupyterLab.

Supports CityJSON format and CityJSONSeq format.

Contents

Packages

Package Name Description
cityview (top-level package) Python package
three-cityjson JavaScript / TypeScript package

Installation

pip install cityview

Usage

Basic usage

VirtualView

import cityview as cv

view = cv.VirtualView(theme="light")

with open("./packages/three-cityjson/public/sample/daiba_sta.city.jsonl", "r") as f:
    data = f.read()

view.layers = [
    cv.CityJSONLayer(data=data, format="cityjsonseq")
]

view.update()

view

VirtualView

MapView

import cityview as cv

view = cv.MapView(theme="dark")

with open("./packages/three-cityjson/public/sample/daiba_sta.city.jsonl", "r") as f:
    data = f.read()

view.layers = [
    cv.CityJSONLayer(data=data, format="cityjsonseq")
]

view.update()

view

VirtualView

Handling click events

import cityview as cv

view = cv.VirtualView(theme="light")

with open("./packages/three-cityjson/public/sample/daiba_sta.city.jsonl", "r") as f:
    data = f.read()

def handler(change):
    print(change["new"])

view.observe(handler, names="click")

view.layers = [
    cv.CityJSONLayer(data=data, format="cityjsonseq")
]

view.update()

view

Roadmap

TBA

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cityview-0.1.0.tar.gz (963.7 kB view details)

Uploaded Source

Built Distribution

cityview-0.1.0-py3-none-any.whl (967.0 kB view details)

Uploaded Python 3

File details

Details for the file cityview-0.1.0.tar.gz.

File metadata

  • Download URL: cityview-0.1.0.tar.gz
  • Upload date:
  • Size: 963.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/21.6.0

File hashes

Hashes for cityview-0.1.0.tar.gz
Algorithm Hash digest
SHA256 46642e341a08069c00a9bc1aff9ce373cb57ad20651bf7f487e211bf987ab287
MD5 4f0eaa2b02874fba30bb386c5af87c27
BLAKE2b-256 8d6341029e8b2c52bb298732553bce2cad73498afcc4c3c9b377d1b9d6755843

See more details on using hashes here.

File details

Details for the file cityview-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cityview-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 967.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/21.6.0

File hashes

Hashes for cityview-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f5f0380e751490ab15b2807c937712250f6ac731875e32bafe529ba717ccc65
MD5 0b83dd8e3c9b5f63a794ce7e78611416
BLAKE2b-256 36b9c6a3556f62e1447618382c906bf4beb354773d6d4ff45b0d48f8c559658d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page