topojson


Nametopojson JSON
Version 1.9 PyPI version JSON
download
home_pageNone
Summarytopojson - a powerful library to encode geographic data as topology in Python!🌍
upload_time2024-05-15 06:35:55
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords topojson python github topology geojson
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # topojson

[![PyPI version](https://img.shields.io/pypi/v/topojson.svg)](https://pypi.org/project/topojson)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![github actions](https://github.com/mattijn/topojson/workflows/test/badge.svg)](https://github.com/mattijn/topojson/actions?query=workflow%3Atest)
[![Conda version](https://anaconda.org/conda-forge/topojson/badges/version.svg)](https://anaconda.org/conda-forge/topojson)
![shapely 2.0 compliant](https://img.shields.io/badge/shapely%201%20%26%202-compliant-brightgreen)


# Encode spatial data as topology in Python!

Topojson is a library that is capable of creating a topojson encoded format of merely any spatial object in Python.

With topojson it is possible to reduce the size of your spatial data. Mostly by orders of magnitude. It is able to do so through:

- Eliminating redundancy through computation of a topology
- Fixed-precision integer encoding of coordinates and
- Simplification and quantization of arcs

See [Topojson Documentation Site](https://mattijn.github.io/topojson) for all info how to use this package.

## Usage

The package can be used in multiple different ways, with the main purpose to create a TopoJSON topology. 

See the Python [Topojson Documentation Site](https://mattijn.github.io/topojson) for all info or [this Notebook](https://nbviewer.jupyter.org/github/mattijn/topojson/blob/main/notebooks/topojson.ipynb) with some examples, such as the following:

<p align="center">
<a href="https://nbviewer.jupyter.org/github/mattijn/topojson/blob/main/notebooks/topojson.ipynb" target="_blank" rel="noopener noreferrer"><img src="docs/images/africa_simplify.png" alt="click to open notebook" width="600px"></a>
</p>

_Click on the image to go the Notebook Viewer with code-snippets how these images are created or visit the [Topojson Documentation Site](https://mattijn.github.io/topojson)._ 

## Installation

Installation can be done through PyPI by the following command:

```
python -m pip install topojson
```

And through conda using the following command:

```
conda install topojson -c conda-forge
```

This package `topojson` has the following hard dependencies:

- `numpy`
- `shapely`
- `packaging`

Further, optional soft dependencies are:

- `altair` - enlarge the experience by visualizing your TopoJSON output
- `simplification` - more and quicker simplification options
- `geojson` - parse string input with GeoJSON data
- `geopandas` - parse your TopoJSON output directly into a GeoDataFrame
- `ipywidgets` + (lab)extension - make your life complete with the interactive experience

## Get in touch

For now, just use the Github issues. That can be:

- usage questions
- bug reports
- feature suggestions
- or anything related

Finally, see the Python [Topojson Documentation Site](https://mattijn.github.io/topojson) for all info how to use this package.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "topojson",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "topojson, python, github, topology, geojson",
    "author": null,
    "author_email": "Mattijn van Hoek <mattijn@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e9/c5/41006f71491f29428f1c72713ad26225434a2dd7225bbeb8e3e9a82bceb3/topojson-1.9.tar.gz",
    "platform": null,
    "description": "# topojson\n\n[![PyPI version](https://img.shields.io/pypi/v/topojson.svg)](https://pypi.org/project/topojson)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![github actions](https://github.com/mattijn/topojson/workflows/test/badge.svg)](https://github.com/mattijn/topojson/actions?query=workflow%3Atest)\n[![Conda version](https://anaconda.org/conda-forge/topojson/badges/version.svg)](https://anaconda.org/conda-forge/topojson)\n![shapely 2.0 compliant](https://img.shields.io/badge/shapely%201%20%26%202-compliant-brightgreen)\n\n\n# Encode spatial data as topology in Python!\n\nTopojson is a library that is capable of creating a topojson encoded format of merely any spatial object in Python.\n\nWith topojson it is possible to reduce the size of your spatial data. Mostly by orders of magnitude. It is able to do so through:\n\n- Eliminating redundancy through computation of a topology\n- Fixed-precision integer encoding of coordinates and\n- Simplification and quantization of arcs\n\nSee [Topojson Documentation Site](https://mattijn.github.io/topojson) for all info how to use this package.\n\n## Usage\n\nThe package can be used in multiple different ways, with the main purpose to create a TopoJSON topology. \n\nSee the Python [Topojson Documentation Site](https://mattijn.github.io/topojson) for all info or [this Notebook](https://nbviewer.jupyter.org/github/mattijn/topojson/blob/main/notebooks/topojson.ipynb) with some examples, such as the following:\n\n<p align=\"center\">\n<a href=\"https://nbviewer.jupyter.org/github/mattijn/topojson/blob/main/notebooks/topojson.ipynb\" target=\"_blank\" rel=\"noopener noreferrer\"><img src=\"docs/images/africa_simplify.png\" alt=\"click to open notebook\" width=\"600px\"></a>\n</p>\n\n_Click on the image to go the Notebook Viewer with code-snippets how these images are created or visit the [Topojson Documentation Site](https://mattijn.github.io/topojson)._ \n\n## Installation\n\nInstallation can be done through PyPI by the following command:\n\n```\npython -m pip install topojson\n```\n\nAnd through conda using the following command:\n\n```\nconda install topojson -c conda-forge\n```\n\nThis package `topojson` has the following hard dependencies:\n\n- `numpy`\n- `shapely`\n- `packaging`\n\nFurther, optional soft dependencies are:\n\n- `altair` - enlarge the experience by visualizing your TopoJSON output\n- `simplification` - more and quicker simplification options\n- `geojson` - parse string input with GeoJSON data\n- `geopandas` - parse your TopoJSON output directly into a GeoDataFrame\n- `ipywidgets` + (lab)extension - make your life complete with the interactive experience\n\n## Get in touch\n\nFor now, just use the Github issues. That can be:\n\n- usage questions\n- bug reports\n- feature suggestions\n- or anything related\n\nFinally, see the Python [Topojson Documentation Site](https://mattijn.github.io/topojson) for all info how to use this package.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "topojson - a powerful library to encode geographic data as topology in Python!\ud83c\udf0d",
    "version": "1.9",
    "project_urls": {
        "Documentation": "https://mattijn.github.io/topojson",
        "Releases": "https://github.com/mattijn/topojson/releases",
        "Source": "https://github.com/mattijn/topojson"
    },
    "split_keywords": [
        "topojson",
        " python",
        " github",
        " topology",
        " geojson"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e067bf9a1786862565b12798fd6d9b7aa72ec2b4d6a10e82fb9936ac01f39d97",
                "md5": "cd0927540350524955b76d9b19075731",
                "sha256": "122e6e91fb422549644504580eee86f8a37703dc5ccb1a8e6d8928b750706fe7"
            },
            "downloads": -1,
            "filename": "topojson-1.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cd0927540350524955b76d9b19075731",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 82680,
            "upload_time": "2024-05-15T06:35:49",
            "upload_time_iso_8601": "2024-05-15T06:35:49.473432Z",
            "url": "https://files.pythonhosted.org/packages/e0/67/bf9a1786862565b12798fd6d9b7aa72ec2b4d6a10e82fb9936ac01f39d97/topojson-1.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e9c541006f71491f29428f1c72713ad26225434a2dd7225bbeb8e3e9a82bceb3",
                "md5": "f05871c94d9d7f43d3d2b0bc9a78cb58",
                "sha256": "5a8389ff576d5540660d4430dab56fcadef7c1f90b9f1aa486b1cb140033ff3b"
            },
            "downloads": -1,
            "filename": "topojson-1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "f05871c94d9d7f43d3d2b0bc9a78cb58",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 25451372,
            "upload_time": "2024-05-15T06:35:55",
            "upload_time_iso_8601": "2024-05-15T06:35:55.605384Z",
            "url": "https://files.pythonhosted.org/packages/e9/c5/41006f71491f29428f1c72713ad26225434a2dd7225bbeb8e3e9a82bceb3/topojson-1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-15 06:35:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mattijn",
    "github_project": "topojson",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "topojson"
}
        
Elapsed time: 4.32322s