ckanext-versioned-tiledmap


Nameckanext-versioned-tiledmap JSON
Version 2.2.1 PyPI version JSON
download
home_page
SummaryA CKAN extension with a map view for versioned-datastore backed resources.
upload_time2023-07-17 08:29:25
maintainer
docs_urlNone
author
requires_python>=3.6
licenseGPL-3.0-or-later
keywords ckan data versioned_tiledmap
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            <!--header-start-->
<img src="https://data.nhm.ac.uk/images/nhm_logo.svg" align="left" width="150px" height="100px" hspace="40"/>

# ckanext-versioned-tiledmap

[![Tests](https://img.shields.io/github/actions/workflow/status/NaturalHistoryMuseum/ckanext-versioned-tiledmap/main.yml?style=flat-square)](https://github.com/NaturalHistoryMuseum/ckanext-versioned-tiledmap/actions/workflows/main.yml)
[![Coveralls](https://img.shields.io/coveralls/github/NaturalHistoryMuseum/ckanext-versioned-tiledmap/main?style=flat-square)](https://coveralls.io/github/NaturalHistoryMuseum/ckanext-versioned-tiledmap)
[![CKAN](https://img.shields.io/badge/ckan-2.9.7-orange.svg?style=flat-square)](https://github.com/ckan/ckan)
[![Python](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8-blue.svg?style=flat-square)](https://www.python.org/)
[![Docs](https://img.shields.io/readthedocs/ckanext-versioned-tiledmap?style=flat-square)](https://ckanext-versioned-tiledmap.readthedocs.io)

_A CKAN extension with a map view for versioned-datastore backed resources._

<!--header-end-->

# Overview

<!--overview-start-->
A CKAN plugin with a map view for versioned-datastore backed resources allowing for map visualizations of large resources with millions of data points.

This repository is a fork* of [ckanext-map](https://github.com/NaturalHistoryMuseum/ckanext-map).

_*you can't fork repositories within the same organisation, so this repository is a duplicate of ckanext-map._

<!--overview-end-->

# Installation

<!--installation-start-->
Path variables used below:
- `$INSTALL_FOLDER` (i.e. where CKAN is installed), e.g. `/usr/lib/ckan/default`
- `$CONFIG_FILE`, e.g. `/etc/ckan/default/development.ini`

## Pre-install setup

This extension depends on the following projects, which must be installed _first_:
- [versioned-datastore-tile-server](https://github.com/NaturalHistoryMuseum/versioned-datastore-tile-server)

## Installing from PyPI

```shell
pip install ckanext-versioned-tiledmap
```

## Installing from source

1. Clone the repository into the `src` folder:
   ```shell
   cd $INSTALL_FOLDER/src
   git clone https://github.com/NaturalHistoryMuseum/ckanext-versioned-tiledmap.git
   ```

2. Activate the virtual env:
   ```shell
   . $INSTALL_FOLDER/bin/activate
   ```

3. Install via pip:
   ```shell
   pip install $INSTALL_FOLDER/src/ckanext-versioned-tiledmap
   ```

### Installing in editable mode

Installing from a `pyproject.toml` in editable mode (i.e. `pip install -e`) requires `setuptools>=64`; however, CKAN 2.9 requires `setuptools==44.1.0`. See [our CKAN fork](https://github.com/NaturalHistoryMuseum/ckan) for a version of v2.9 that uses an updated setuptools if this functionality is something you need.

## Post-install setup

1. Add 'versioned_tiledmap' to the list of plugins in your `$CONFIG_FILE`:
   ```ini
   ckan.plugins = ... versioned_tiledmap
   ```

2. Install `lessc` globally:
   ```shell
   npm install -g "less@~4.1"
   ```

3. Add latitude and longitude fields for the resources you want to use this view for.

<!--installation-end-->

# Configuration

<!--configuration-start-->
These are the options that can be specified in your .ini config file.

| Name                                              | Description                                                                                                                                                                                                        | Default                                                            |
|---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| `versioned_tilemap.tile_layer.url`                | The URL to use for the base world tiles                                                                                                                                                                            | `https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`               |
| `versioned_tilemap.tile_layer.attribution`        | The attribution text to show for this layer (can be HTML)                                                                                                                                                          | `Base tiles provided by OpenStreetMap. <a href="openstreetmap.org/copyright">View copyright information</a>`                                                                   |
| `versioned_tilemap.tile_layer.opacity`            | The opacity for the tile layer                                                                                                                                                                                     | `0.8`                                                              |
| `versioned_tilemap.zoom_bounds.min`               | Minimum zoom level for initial display of the resource's data                                                                                                                                                      | `3`                                                                |
| `versioned_tilemap.zoom_bounds.max`               | Maximum zoom level for initial display of the resource's data                                                                                                                                                      | `18`                                                               |
| `versioned_tilemap.style.plot.point_radius`       | The integer radius of the rendered points (including the border)                                                                                                                                                   | `4`                                                                |
| `versioned_tilemap.style.plot.point_colour`       | The hex value to render the points in                                                                                                                                                                              | `#ee0000` ![#ee0000](https://placehold.it/15/ee0000/000000?text=+) |
| `versioned_tilemap.style.plot.border_width`       | The integer border width of the rendered points                                                                                                                                                                    | `1`                                                                |
| `versioned_tilemap.style.plot.border_colour`      | The hex value to render the borders of the points in                                                                                                                                                               | `#ffffff` ![#ffffff](https://placehold.it/15/ffffff/000000?text=+) |
| `versioned_tilemap.style.plot.grid_resolution`    | The integer size of the cells in the grid that each tile is split into for the UTFGrid. The default of `4` produces a 64x64 grid within each tile                                                                  | `4`                                                                |
| `versioned_tilemap.style.gridded.cold_colour`     | The hex value to be used to render the points with the lowest counts                                                                                                                                               | `#f4f11a` ![#f4f11a](https://placehold.it/15/f4f11a/000000?text=+) |
| `versioned_tilemap.style.gridded.hot_colour`      | The hex value to be used to render the points with the highest counts                                                                                                                                              | `#f02323` ![#f02323](https://placehold.it/15/f02323/000000?text=+) |
| `versioned_tilemap.style.gridded.range_size`      | This many colours will be used to render the points dependant on their counts                                                                                                                                      | `12`                                                               |
| `versioned_tilemap.style.gridded.resize_factor`   | A resize value to use when smoothing the tile. This value will be used to scale the tile and then down (with anti-aliasing) to produce a smoother output. Increasing this value will negatively impact performance | `4`                                                                |
| `versioned_tilemap.style.gridded.grid_resolution` | The integer size of the cells in the grid that each tile is split into. The default of `8` produces a 32x32 grid within each tile and therefore matches the default `grid.json` setting too                        | `8`                                                                |
| `versioned_tilemap.style.heatmap.point_radius`    | The integer radius of the rendered points (including the border)                                                                                                                                                   | `8`                                                                |
| `versioned_tilemap.style.heatmap.cold_colour`     | The hex value to be used to render the points with the lowest counts                                                                                                                                               | `#0000ee` ![#0000ee](https://placehold.it/15/0000ee/000000?text=+) |
| `versioned_tilemap.style.heatmap.hot_colour`      | The hex value to be used to render the points with the highest counts                                                                                                                                              | `#ee0000` ![#ee0000](https://placehold.it/15/ee0000/000000?text=+) |
| `versioned_tilemap.style.heatmap.intensity`       | The decimal intensity (between 0 and 1) to render the tile with                                                                                                                                                    | `0.5`                                                              |
| `versioned_tilemap.info_template`                 | The name of the template to use when a point is clicked                                                                                                                                                            | `point_detail`                                                     |
| `versioned_tilemap.quick_info_template`           | The name of the template to use when a point is hovered over                                                                                                                                                       | `point_detail_hover`                                               |

<!--configuration-end-->

# Usage

<!--usage-start-->
After enabling this extension in the list of plugins, the Map view should become available for resources with latitude and longitude values.

<!--usage-end-->

# Testing

<!--testing-start-->
There is a Docker compose configuration available in this repository to make it easier to run tests. The ckan image uses the Dockerfile in the `docker/` folder.

To run the tests against ckan 2.9.x on Python3:

1. Build the required images:
   ```shell
   docker-compose build
   ```

2. Then run the tests.
   The root of the repository is mounted into the ckan container as a volume by the Docker compose
   configuration, so you should only need to rebuild the ckan image if you change the extension's
   dependencies.
   ```shell
   docker-compose run ckan
   ```

<!--testing-end-->

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ckanext-versioned-tiledmap",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "CKAN,data,versioned_tiledmap",
    "author": "",
    "author_email": "Natural History Museum <data@nhm.ac.uk>",
    "download_url": "https://files.pythonhosted.org/packages/91/38/dd54609934f1f088d6dbe84a7a4c1344e1adba62b09eebda64a7eace4da0/ckanext-versioned-tiledmap-2.2.1.tar.gz",
    "platform": null,
    "description": "<!--header-start-->\n<img src=\"https://data.nhm.ac.uk/images/nhm_logo.svg\" align=\"left\" width=\"150px\" height=\"100px\" hspace=\"40\"/>\n\n# ckanext-versioned-tiledmap\n\n[![Tests](https://img.shields.io/github/actions/workflow/status/NaturalHistoryMuseum/ckanext-versioned-tiledmap/main.yml?style=flat-square)](https://github.com/NaturalHistoryMuseum/ckanext-versioned-tiledmap/actions/workflows/main.yml)\n[![Coveralls](https://img.shields.io/coveralls/github/NaturalHistoryMuseum/ckanext-versioned-tiledmap/main?style=flat-square)](https://coveralls.io/github/NaturalHistoryMuseum/ckanext-versioned-tiledmap)\n[![CKAN](https://img.shields.io/badge/ckan-2.9.7-orange.svg?style=flat-square)](https://github.com/ckan/ckan)\n[![Python](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8-blue.svg?style=flat-square)](https://www.python.org/)\n[![Docs](https://img.shields.io/readthedocs/ckanext-versioned-tiledmap?style=flat-square)](https://ckanext-versioned-tiledmap.readthedocs.io)\n\n_A CKAN extension with a map view for versioned-datastore backed resources._\n\n<!--header-end-->\n\n# Overview\n\n<!--overview-start-->\nA CKAN plugin with a map view for versioned-datastore backed resources allowing for map visualizations of large resources with millions of data points.\n\nThis repository is a fork* of [ckanext-map](https://github.com/NaturalHistoryMuseum/ckanext-map).\n\n_*you can't fork repositories within the same organisation, so this repository is a duplicate of ckanext-map._\n\n<!--overview-end-->\n\n# Installation\n\n<!--installation-start-->\nPath variables used below:\n- `$INSTALL_FOLDER` (i.e. where CKAN is installed), e.g. `/usr/lib/ckan/default`\n- `$CONFIG_FILE`, e.g. `/etc/ckan/default/development.ini`\n\n## Pre-install setup\n\nThis extension depends on the following projects, which must be installed _first_:\n- [versioned-datastore-tile-server](https://github.com/NaturalHistoryMuseum/versioned-datastore-tile-server)\n\n## Installing from PyPI\n\n```shell\npip install ckanext-versioned-tiledmap\n```\n\n## Installing from source\n\n1. Clone the repository into the `src` folder:\n   ```shell\n   cd $INSTALL_FOLDER/src\n   git clone https://github.com/NaturalHistoryMuseum/ckanext-versioned-tiledmap.git\n   ```\n\n2. Activate the virtual env:\n   ```shell\n   . $INSTALL_FOLDER/bin/activate\n   ```\n\n3. Install via pip:\n   ```shell\n   pip install $INSTALL_FOLDER/src/ckanext-versioned-tiledmap\n   ```\n\n### Installing in editable mode\n\nInstalling from a `pyproject.toml` in editable mode (i.e. `pip install -e`) requires `setuptools>=64`; however, CKAN 2.9 requires `setuptools==44.1.0`. See [our CKAN fork](https://github.com/NaturalHistoryMuseum/ckan) for a version of v2.9 that uses an updated setuptools if this functionality is something you need.\n\n## Post-install setup\n\n1. Add 'versioned_tiledmap' to the list of plugins in your `$CONFIG_FILE`:\n   ```ini\n   ckan.plugins = ... versioned_tiledmap\n   ```\n\n2. Install `lessc` globally:\n   ```shell\n   npm install -g \"less@~4.1\"\n   ```\n\n3. Add latitude and longitude fields for the resources you want to use this view for.\n\n<!--installation-end-->\n\n# Configuration\n\n<!--configuration-start-->\nThese are the options that can be specified in your .ini config file.\n\n| Name                                              | Description                                                                                                                                                                                                        | Default                                                            |\n|---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|\n| `versioned_tilemap.tile_layer.url`                | The URL to use for the base world tiles                                                                                                                                                                            | `https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`               |\n| `versioned_tilemap.tile_layer.attribution`        | The attribution text to show for this layer (can be HTML)                                                                                                                                                          | `Base tiles provided by OpenStreetMap. <a href=\"openstreetmap.org/copyright\">View copyright information</a>`                                                                   |\n| `versioned_tilemap.tile_layer.opacity`            | The opacity for the tile layer                                                                                                                                                                                     | `0.8`                                                              |\n| `versioned_tilemap.zoom_bounds.min`               | Minimum zoom level for initial display of the resource's data                                                                                                                                                      | `3`                                                                |\n| `versioned_tilemap.zoom_bounds.max`               | Maximum zoom level for initial display of the resource's data                                                                                                                                                      | `18`                                                               |\n| `versioned_tilemap.style.plot.point_radius`       | The integer radius of the rendered points (including the border)                                                                                                                                                   | `4`                                                                |\n| `versioned_tilemap.style.plot.point_colour`       | The hex value to render the points in                                                                                                                                                                              | `#ee0000` ![#ee0000](https://placehold.it/15/ee0000/000000?text=+) |\n| `versioned_tilemap.style.plot.border_width`       | The integer border width of the rendered points                                                                                                                                                                    | `1`                                                                |\n| `versioned_tilemap.style.plot.border_colour`      | The hex value to render the borders of the points in                                                                                                                                                               | `#ffffff` ![#ffffff](https://placehold.it/15/ffffff/000000?text=+) |\n| `versioned_tilemap.style.plot.grid_resolution`    | The integer size of the cells in the grid that each tile is split into for the UTFGrid. The default of `4` produces a 64x64 grid within each tile                                                                  | `4`                                                                |\n| `versioned_tilemap.style.gridded.cold_colour`     | The hex value to be used to render the points with the lowest counts                                                                                                                                               | `#f4f11a` ![#f4f11a](https://placehold.it/15/f4f11a/000000?text=+) |\n| `versioned_tilemap.style.gridded.hot_colour`      | The hex value to be used to render the points with the highest counts                                                                                                                                              | `#f02323` ![#f02323](https://placehold.it/15/f02323/000000?text=+) |\n| `versioned_tilemap.style.gridded.range_size`      | This many colours will be used to render the points dependant on their counts                                                                                                                                      | `12`                                                               |\n| `versioned_tilemap.style.gridded.resize_factor`   | A resize value to use when smoothing the tile. This value will be used to scale the tile and then down (with anti-aliasing) to produce a smoother output. Increasing this value will negatively impact performance | `4`                                                                |\n| `versioned_tilemap.style.gridded.grid_resolution` | The integer size of the cells in the grid that each tile is split into. The default of `8` produces a 32x32 grid within each tile and therefore matches the default `grid.json` setting too                        | `8`                                                                |\n| `versioned_tilemap.style.heatmap.point_radius`    | The integer radius of the rendered points (including the border)                                                                                                                                                   | `8`                                                                |\n| `versioned_tilemap.style.heatmap.cold_colour`     | The hex value to be used to render the points with the lowest counts                                                                                                                                               | `#0000ee` ![#0000ee](https://placehold.it/15/0000ee/000000?text=+) |\n| `versioned_tilemap.style.heatmap.hot_colour`      | The hex value to be used to render the points with the highest counts                                                                                                                                              | `#ee0000` ![#ee0000](https://placehold.it/15/ee0000/000000?text=+) |\n| `versioned_tilemap.style.heatmap.intensity`       | The decimal intensity (between 0 and 1) to render the tile with                                                                                                                                                    | `0.5`                                                              |\n| `versioned_tilemap.info_template`                 | The name of the template to use when a point is clicked                                                                                                                                                            | `point_detail`                                                     |\n| `versioned_tilemap.quick_info_template`           | The name of the template to use when a point is hovered over                                                                                                                                                       | `point_detail_hover`                                               |\n\n<!--configuration-end-->\n\n# Usage\n\n<!--usage-start-->\nAfter enabling this extension in the list of plugins, the Map view should become available for resources with latitude and longitude values.\n\n<!--usage-end-->\n\n# Testing\n\n<!--testing-start-->\nThere is a Docker compose configuration available in this repository to make it easier to run tests. The ckan image uses the Dockerfile in the `docker/` folder.\n\nTo run the tests against ckan 2.9.x on Python3:\n\n1. Build the required images:\n   ```shell\n   docker-compose build\n   ```\n\n2. Then run the tests.\n   The root of the repository is mounted into the ckan container as a volume by the Docker compose\n   configuration, so you should only need to rebuild the ckan image if you change the extension's\n   dependencies.\n   ```shell\n   docker-compose run ckan\n   ```\n\n<!--testing-end-->\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "A CKAN extension with a map view for versioned-datastore backed resources.",
    "version": "2.2.1",
    "project_urls": {
        "changelog": "https://github.com/NaturalHistoryMuseum/ckanext-versioned-tiledmap/blob/main/CHANGELOG.md",
        "repository": "https://github.com/NaturalHistoryMuseum/ckanext-versioned-tiledmap"
    },
    "split_keywords": [
        "ckan",
        "data",
        "versioned_tiledmap"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9c28e46dbdba59f292dd01c3642bb06c4b2aedc08f59f83e01c269ebed44c628",
                "md5": "497c2c2f959635cf814247eab4acb5d7",
                "sha256": "74ed5a9267565daa4cd16f42d8fd9683ffeb4840a9b70469063569403ddb6856"
            },
            "downloads": -1,
            "filename": "ckanext_versioned_tiledmap-2.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "497c2c2f959635cf814247eab4acb5d7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 488840,
            "upload_time": "2023-07-17T08:29:23",
            "upload_time_iso_8601": "2023-07-17T08:29:23.312557Z",
            "url": "https://files.pythonhosted.org/packages/9c/28/e46dbdba59f292dd01c3642bb06c4b2aedc08f59f83e01c269ebed44c628/ckanext_versioned_tiledmap-2.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9138dd54609934f1f088d6dbe84a7a4c1344e1adba62b09eebda64a7eace4da0",
                "md5": "c91272e6da4d001bd5336e9970ec9ab9",
                "sha256": "f795c22a53d49cb7eb916971548a44e19021d001bfa33826a5b8e63b77f627df"
            },
            "downloads": -1,
            "filename": "ckanext-versioned-tiledmap-2.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c91272e6da4d001bd5336e9970ec9ab9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 474253,
            "upload_time": "2023-07-17T08:29:25",
            "upload_time_iso_8601": "2023-07-17T08:29:25.178957Z",
            "url": "https://files.pythonhosted.org/packages/91/38/dd54609934f1f088d6dbe84a7a4c1344e1adba62b09eebda64a7eace4da0/ckanext-versioned-tiledmap-2.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-17 08:29:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NaturalHistoryMuseum",
    "github_project": "ckanext-versioned-tiledmap",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "ckanext-versioned-tiledmap"
}
        
Elapsed time: 0.08908s