Skip to main content

Explore geodata interactively.

Project description

geo-explorer

Explore geodata interactively.

Opprettet av: ort ort@ssb.no


To install, use one of:

poetry add ssb-sgis
pip install ssb-sgis

GeoExplorer

from geo_explorer import GeoExplorer
from geo_explorer import LocalFileSystem
explorer = GeoExplorer(
    start_dir="C:/users/ort/OneDrive - Statistisk sentralbyrå/data",
    file_system=LocalFileSystem(),
    port=8055,
)
explorer.run(debug=True)

Run locally:

from geo_explorer import GeoExplorer
from geo_explorer import LocalFileSystem
explorer = GeoExplorer(
    start_dir="C:/users/user/data",
    file_system=LocalFileSystem(),
    port=None,
)
explorer.run()

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.2.0.tar.gz (36.4 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.2.0-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: geo_explorer-0.2.0.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.11

File hashes

Hashes for geo_explorer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 05c1007b83bd3720788d8c24dae6ec8ada24f5fefaef26d1c653a1bad0852d3b
MD5 1737a78ec42a10653d9e990c54c1a4e3
BLAKE2b-256 e8c8ab2e887eeeab96fc0aed7fec19c51caafec7ee73a6dada0108ad366a3c60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: geo_explorer-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 35.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.11

File hashes

Hashes for geo_explorer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24a9c9279ca948a2e6555df6c4914ff476a12e419aae75908c65bb492fea3bf3
MD5 eeba81cfe5000f7bc9d5252c10864016
BLAKE2b-256 1fb8547161a98e8f0fb65fc699c28ed2d734454fa30e51bb12fa51d22252d1fb

See more details on using hashes here.

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