{ "info": { "author": "Malte Vogl", "author_email": "mvogl@mpiwg-berlin.mpg.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3", "Topic :: Text Processing :: General", "Topic :: Text Processing :: Indexing" ], "description": "convert2geojson\n===============\n\nConvert databases to geojson, useful for displaying datasets on maps.\n\nA FeatureCollection is generated from those dataframe rows containing\nvalues for latitude and longitude.\n\n*Note:* To limit the size of the GeoJSON file, lookup tables are\ngenerated automatically for fields with a limited number of values (<20)\nand saved as a top-level 'properties' key in the JSON file. This is not\npart of the GeoJSON standard and can lead to problems with linters, e.g.\n`GeoJSONLint `__.\n\nContent\n-------\n\n1. `Installation <#installation>`__\n2. `Basics <#basic-usage>`__\n\n- `Loading data <#loading-data>`__\n- `Generating geojson <#generating-geojson>`__\n- `Plotting <#plotting>`__\n\n3. `Examples <#examples>`__\n\nInstallation\n------------\n\nThe package can be installed by\n\n::\n\n pip install convert2geojson\n\nThe latest development version of the package can be installed from\nGitHub by running\n\n::\n\n pip install git+https://github.com/computational-antiquity/convert2geojson.git\n\nThis installs the most recent version of the master branch.\n\nIf the plotting on maps in JupyterLab is not yielding results, there\nmight be problems with your `ipyleaflet\ninstalltion `__\nor `ipywidgets\ninstalltion `__.\n\nBasic usage\n-----------\n\nImport the package with\n\n.. code:: python\n\n from convert2geojson import Convert2GeoJson\n\nLoading data\n~~~~~~~~~~~~\n\nThe package is instantiated by providing a dataframe containing the\ngeodata ,e.g. ``dataframe=df``, a list of columns of the dataframe,\nwhich should be shown as information for every geo feature, e.g.\n``properties=df.columns`` to show everything, and the column titles for\nlongitudal and latitudal data (standard parameter names are\n``lat='latitude'`` and ``lon='longitude'``).\n\n.. code:: python\n\n data = Convert2GeoJson(\n df,\n df.columns,\n lat='latitude',\n lon='longitude'\n )\n\nThe geo data is expected to be gievn as float numbers. Rows with empty\nlongitudal or latitudel data, or marked as ``NaN`` are droped from the\nsupplied dataframe.\n\nThe original dataframe can however still be accessed as ``data.rawDF``.\n\nGenerate geoJson\n~~~~~~~~~~~~~~~~\n\nTo generate the geoJSON simple run\n\n.. code:: python\n\n data.convert()\n\nThis generates a geoJSON formated dictionary which is available at\n\n.. code:: python\n\n data.geojson()\n\nTo save the geoJSON to a file, run\n\n.. code:: python\n\n data.save()\n\nYou can provide parameters for the name and path, standards are\n``name='data.geojson'`` and ``path='.'``.\n\nPlotting\n~~~~~~~~\n\nFor plotting the package is leveraging the `ipyleaflet\npackage `__ which is also\navailable as a JupyterLab extension.\n\nFor a first overview use\n\n.. code:: python\n\n data.display()\n\nThis plots the geoJSON features as a layer on a basemap.\n\nThe basic plotting can be changed by parameters for the map layout\n(``mapLayout=dict()``), and the basemap data (``basemap=dict()``).\n\nTo use a custom basemap, you can provide a dictionary of the format\n\n.. code:: python\n\n customBasemap = {\n 'url': 'https://{s}.URL_to_mapdata/{z}/{x}/{y}.png',\n 'max_zoom': 'max available zoom level',\n 'attribution': 'Attribution',\n 'name': 'Name for layer control'\n }\n\nScreenshot\n''''''''''\n\n.. figure:: example/mapExample.png\n :alt: Screenshot of generated map\n\n Screenshot of generated map\n\nGrouped Plotting\n^^^^^^^^^^^^^^^^\n\nFor densely distributed geographical data, to styling options are\navailable.\n\nBy choosing ``style='grouped'`` ipyleaflets MarkerCluster is used to\nshow groups of markers depending on the zoom level. By clicking on a\ncluster, the map zooms to the level, which contains the selected markers\nin the cluster .\n\nAdditionally, since markers are now single entities, by clicking on any\nmarker a popup shows the information of the dataframe belonging to the\ngeographical point.\n\nScreenshot\n''''''''''\n\n.. figure:: example/clusterMap.png\n :alt: Screenshot of generated cluster map\n\n Screenshot of generated cluster map\n\nCategorical plotting as pie chart distribution\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nBy choosing ``style='pie'`` and providing a category found in the\ndataframe columns, by setting ``groupBy='Category'``, the package\ngenerates a standalone map showing the clustered markers as pie charts\nseparated into sub-groups by the chosen category.\n\nScreenshot\n''''''''''\n\n.. figure:: example/pieChartMap.png\n :alt: Screenshot of generated pie chart map\n\n Screenshot of generated pie charts map\n\nExamples\n--------\n\nHave a look at the `Loading datasets `__\nor the `Advanced Plotting `__\nnotebooks in the ``/example`` folder\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/computational-antiquity/convert2geojson/", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "convert2geojson", "package_url": "https://pypi.org/project/convert2geojson/", "platform": "", "project_url": "https://pypi.org/project/convert2geojson/", "project_urls": { "Download": "https://github.com/computational-antiquity/convert2geojson/archive/0.0.2.tar.gz", "Home": "https://github.com/computational-antiquity/convert2geojson/", "Homepage": "https://github.com/computational-antiquity/convert2geojson/", "Tracker": "https://github.com/computational-antiquity/convert2geojson/issues" }, "release_url": "https://pypi.org/project/convert2geojson/0.0.2/", "requires_dist": [ "pandas", "xlrd", "citableclass", "ipyleaflet", "ipywidgets", "jinja2", "ipython" ], "requires_python": ">=3", "summary": "Tools for converting dataframes to GeoJSON format.", "version": "0.0.2" }, "last_serial": 4283291, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9b2b4e7bbe37d2fc098f785332d8e40e", "sha256": "2c525b140d396df914f9d4d66b9f5aafc628e973917cc53558973be11fcc8641" }, "downloads": -1, "filename": "convert2geojson-0.0.1-py3.6.egg", "has_sig": false, "md5_digest": "9b2b4e7bbe37d2fc098f785332d8e40e", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": ">=3", "size": 10722, "upload_time": "2018-09-18T11:50:56", "url": "https://files.pythonhosted.org/packages/55/aa/0755e25ccb7a4b36eaa052db1000179664898bc528405cf0f1e53a4e3504/convert2geojson-0.0.1-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "ff8e5fecc374c1d96dbe3dcf26cbd2ea", "sha256": "70286673f464fc557d52e480c6e8a2f17701043f280579e7d91ee8bdb43d2b87" }, "downloads": -1, "filename": "convert2geojson-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ff8e5fecc374c1d96dbe3dcf26cbd2ea", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 12243, "upload_time": "2018-09-18T11:50:54", "url": "https://files.pythonhosted.org/packages/1e/73/f6bb939a7f26a6fc5e189c4248ecddde87950cab16abbe1dd80aaae97f4c/convert2geojson-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d83e4c38fdfa6768441502b2050462ab", "sha256": "8df231bf1c61f878f67c13eb9659b9a10945d230ced99eb536dad0b16b6ecd5b" }, "downloads": -1, "filename": "convert2geojson-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d83e4c38fdfa6768441502b2050462ab", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 21529, "upload_time": "2018-09-18T11:50:57", "url": "https://files.pythonhosted.org/packages/fd/07/937ea5d6a1ccd3fe4c2c40ada3184cffda936483cc4ead7add12cc172788/convert2geojson-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "608388646503311c4f99d634c89f7725", "sha256": "985d7c5e2194b04c4e75284980bc7e993122c9fcd759360af6ccdd12bb2543e0" }, "downloads": -1, "filename": "convert2geojson-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "608388646503311c4f99d634c89f7725", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 15281, "upload_time": "2018-09-18T12:00:48", "url": "https://files.pythonhosted.org/packages/8d/78/941687e80634f07350a5dbc532bf2165a775fa98da65e379d0e0546fdb21/convert2geojson-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b94b12970ebb98338e0d5c205fa6aeb2", "sha256": "821228f527147ed816c58d26be0c40f85f5c951c13be5fd39be81c57461aa8f3" }, "downloads": -1, "filename": "convert2geojson-0.0.2.tar.gz", "has_sig": false, "md5_digest": "b94b12970ebb98338e0d5c205fa6aeb2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 21668, "upload_time": "2018-09-18T12:00:51", "url": "https://files.pythonhosted.org/packages/05/5b/0e12f512b3022e8328816769ca709fc9e118d256f4782e521207a3a16fa2/convert2geojson-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "608388646503311c4f99d634c89f7725", "sha256": "985d7c5e2194b04c4e75284980bc7e993122c9fcd759360af6ccdd12bb2543e0" }, "downloads": -1, "filename": "convert2geojson-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "608388646503311c4f99d634c89f7725", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 15281, "upload_time": "2018-09-18T12:00:48", "url": "https://files.pythonhosted.org/packages/8d/78/941687e80634f07350a5dbc532bf2165a775fa98da65e379d0e0546fdb21/convert2geojson-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b94b12970ebb98338e0d5c205fa6aeb2", "sha256": "821228f527147ed816c58d26be0c40f85f5c951c13be5fd39be81c57461aa8f3" }, "downloads": -1, "filename": "convert2geojson-0.0.2.tar.gz", "has_sig": false, "md5_digest": "b94b12970ebb98338e0d5c205fa6aeb2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 21668, "upload_time": "2018-09-18T12:00:51", "url": "https://files.pythonhosted.org/packages/05/5b/0e12f512b3022e8328816769ca709fc9e118d256f4782e521207a3a16fa2/convert2geojson-0.0.2.tar.gz" } ] }