Skip to main content

Explore geodata interactively.

Project description

geo-explorer

Explore geodata interactively in an app.

Opprettet av: ort ort@ssb.no


To install, use either:

poetry add geo-explorer

Or:

pip install geo-explorer

GeoExplorer

It's best to run the app in the terminal.

Create a python file like this:

from geo_explorer import GeoExplorer
from geo_explorer import LocalFileSystem

explorer = GeoExplorer(
    start_dir="/buckets/delt-kart/analyse_data/klargjorte-data/2025",
    favorites=[
        "/buckets/delt-kart/analyse_data/klargjorte-data/2025",
        "/buckets/delt-kart/visualisering_data/klargjorte-data/2025/parquet",
    ],
    zoom=13,
    center=(59.91740845, 10.71394444),
    file_system=LocalFileSystem(),
    port=3000,
).run()

And run the file.

You can also use other file systems, for instance GCSFileSystem for Google Cloud Storage:

from geo_explorer import GeoExplorer
from gcsfs import GCSFileSystem

GeoExplorer(
    start_dir="ssb-areal-data-delt-kart-prod/analyse_data/klargjorte-data/2025",
    favorites=[
        "ssb-areal-data-delt-kart-prod/analyse_data/klargjorte-data/2025",
        "ssb-areal-data-delt-kart-prod/visualisering_data/klargjorte-data/2025/parquet",
    ],
    zoom=13,
    center=(59.91740845, 10.71394444),
    file_system=GCSFileSystem(),
    port=3000,
).run()

The file system should act like fsspec's AbstractFileSystem and implement the methods ls and glob.

Developer information

Git LFS

The data in the testdata directory is stored with Git LFS. Make sure git-lfs is installed and that you have run the command git lfs install at least once. You only need to run this once per user account.

Dependencies

Poetry is used for dependency management. Install poetry and run the command below from the root directory to install the dependencies.

poetry install -E test --no-root

Tests

Use the following command from the root directory to run the tests:

poetry run pytest  # from root directory

For VS Code there are extensions for opening a python script as Jupyter Notebook, for example: Jupytext for Notebooks.

Code quality

Run 'ruff' on all files with safe fixes:

poetry run ruff check --fix .

Formatting

Format the code with black and isort by running the following command from the root directory:

poetry run black .
poetry run isort .

Pre-commit hooks

We are using pre-commit hooks to make sure the code is correctly formatted and consistent before committing. Use the following command from the root directory in the repo to install the pre-commit hooks:

poetry run pre-commit install

It then checks the changed files before committing. You can run the pre-commit checks on all files by using this command:

poetry run pre-commit run --all-files

Documentation

To generate the API-documentation locally, run the following command from the root directory:

poetry run sphinx-build -W docs docs/_build

Then open the file docs/_build/index.html.

To check and run the docstrings examples, run this command:

poetry run xdoctest --command=all ./src/sgis

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, SSB sgis is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from Statistics Norway's SSB PyPI Template.

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

geo_explorer-0.4.4.tar.gz (47.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geo_explorer-0.4.4-py3-none-any.whl (47.8 kB view details)

Uploaded Python 3

File details

Details for the file geo_explorer-0.4.4.tar.gz.

File metadata

  • Download URL: geo_explorer-0.4.4.tar.gz
  • Upload date:
  • Size: 47.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for geo_explorer-0.4.4.tar.gz
Algorithm Hash digest
SHA256 8279a72e7c37df44a28c185b0c3f5c0d4bd3e50231393434aed36b3f780a0c35
MD5 1512b97a8add39baea05ce58ed2681c2
BLAKE2b-256 c0692c6940cf29e5102f88d38d804154ddb98b931cf11e0d6fe8dc66d89abf46

See more details on using hashes here.

Provenance

The following attestation bundles were made for geo_explorer-0.4.4.tar.gz:

Publisher: release.yml on statisticsnorway/geo-explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file geo_explorer-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: geo_explorer-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 47.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for geo_explorer-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8be357964cfd1306c25a8691ba382239112a89276373228c37dd78ae18c16032
MD5 24069ab6cbccdcc93487fceb29e30801
BLAKE2b-256 69c731f9f4ed3fb8c33d6ed14cd7f96af86dc4a7d4551e84959eefff78847e91

See more details on using hashes here.

Provenance

The following attestation bundles were made for geo_explorer-0.4.4-py3-none-any.whl:

Publisher: release.yml on statisticsnorway/geo-explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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