{ "info": { "author": "Jacob Wasserman", "author_email": "jwasserman@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "============\ngeojsonio.py\n============\n\nOpen GeoJSON data on `geojson.io `_ from Python.\n``geojsonio.py`` also contains a command line utility that is a Python port of `geojsonio-cli\n`_.\n\n.. image:: https://travis-ci.org/jwass/geojsonio.py.svg?branch=master\n :target: https://travis-ci.org/jwass/geojsonio.py\n\nUsage\n-----\n\nSend data to geojson.io and open a browser within python\n\n.. code-block:: python\n\n from geojsonio import display\n \n with open('map.geojson') as f:\n contents = f.read()\n display(contents)\n \nData\n----\nThere are two methods by which ``geojsonio.py`` gets geojson.io to render the data:\n\n- Embedding the GeoJSON contents in the geojson.io URL directly\n- Creating an anonymous Github gist and embedding the gist id in the geojson.io URL.\n\n``geojsonio.py`` automatically determines which method is used based on the length of the GeoJSON contents.\nIf the contents are small enough, they will be embedded in the URL. Otherwise ``geojsonio.py`` creates an anonymous\nGist on Github with the GeoJSON contents. Note: when an anonymous gist is created, the data is uploaded to Github\nand a unique gist ID is created. If anyone else is able to obtain the gist ID, they will be able to see your data.\n \nGoes Great With GeoPandas\n-------------------------\n``geojsonio.py`` integrates nicely with `GeoPandas `_ to\ndisplay data in a ``GeoDataFrame``.\n\nSay you have a file containing the borders of all states called ``states.geojson``. Each GeoJSON record has a\nproperty called ``'Name'``. Quickly display all the states whose names start with ``'M'``\n\n.. code-block:: python\n\n import geopandas as gpd\n import geojsonio\n \n states = gpd.read_file('states.geojson')\n m_states = states[states['Name'].str.startswith('M')]\n geojsonio.display(m_states.to_json())\n\nThis will open a browser to the geojson.io window with the polygons drawn on the slippy map.\n\nIPython Notebook Integration\n----------------------------\n \nTo easily embed geojson.io in an iframe in a Jupyter/IPython notebook, use\nthe ``embed()`` method\n\n.. code-block:: python\n\n embed(contents)\n\nCommand Line Interface\n----------------------\n\nIt can also be used on the command line. Read or pipe a file\n\n::\n\n $ geojsonio map.geojson\n $ geojsonio < run.geojson\n\nOptions:\n\n::\n\n --print prints the url rather than opening it\n --domain=\"http://custominstancedomain.com/\"\n\nInstallation\n------------\nInstall with ``pip``\n\n::\n\n $ pip install geojsonio", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jwass/geojsonio.py", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "geojsonio", "package_url": "https://pypi.org/project/geojsonio/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/geojsonio/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jwass/geojsonio.py" }, "release_url": "https://pypi.org/project/geojsonio/0.0.3/", "requires_dist": null, "requires_python": null, "summary": "geojsonio CLI - Python.", "version": "0.0.3" }, "last_serial": 2721085, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "ea2da268e5fefd1865581f065eae22ff", "sha256": "51611f9eaaaa73ef69de408d4f6ff55b4243bf54a97bc5188918b67c92aa6d87" }, "downloads": -1, "filename": "geojsonio-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ea2da268e5fefd1865581f065eae22ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3864, "upload_time": "2014-12-31T05:42:26", "url": "https://files.pythonhosted.org/packages/25/c3/48b90e25879828c9e5138520b27b3361ad1e81decf3762368df919ef5446/geojsonio-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "e75b0ec0786d456dc630f93874106bfd", "sha256": "c118a4c954df47c7b481458c4752c1abfcaf9803bb6340b3526b00f821a50f09" }, "downloads": -1, "filename": "geojsonio-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e75b0ec0786d456dc630f93874106bfd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4392, "upload_time": "2015-01-06T14:08:07", "url": "https://files.pythonhosted.org/packages/45/45/cf3f4a656134729786010ef01174b5c91556d765acb16662d103856dd91f/geojsonio-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "a1900a2e37cbd6a14dbae053f599f8af", "sha256": "2afe91d9a86e30aaf0c449f430a024ab03503db3efce2e26ff5f1057f32f1083" }, "downloads": -1, "filename": "geojsonio-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a1900a2e37cbd6a14dbae053f599f8af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4692, "upload_time": "2017-03-21T16:43:04", "url": "https://files.pythonhosted.org/packages/7f/42/a773a4d4a6a78261dce418269cd017d8ff401206bc5724d9390084ebbf3d/geojsonio-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a1900a2e37cbd6a14dbae053f599f8af", "sha256": "2afe91d9a86e30aaf0c449f430a024ab03503db3efce2e26ff5f1057f32f1083" }, "downloads": -1, "filename": "geojsonio-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a1900a2e37cbd6a14dbae053f599f8af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4692, "upload_time": "2017-03-21T16:43:04", "url": "https://files.pythonhosted.org/packages/7f/42/a773a4d4a6a78261dce418269cd017d8ff401206bc5724d9390084ebbf3d/geojsonio-0.0.3.tar.gz" } ] }