Skip to main content

A matplotlib-like interface to plot data with Google Maps.

Project description

A matplotlib-like interface to render all the data you’d like on top of Google Maps.

Several plotting methods make creating exploratory map views effortless.

To install: pip install gmplot

Documentation (with examples): API Reference

Crash course

import gmplot

# Create the map plotter:
apikey = '' # (your API key here)
gmap = gmplot.GoogleMapPlotter(37.766956, -122.448481, 14, apikey=apikey)

# Outline the Golden Gate Park:
golden_gate_park = zip(*[
    (37.771269, -122.511015),
    (37.773495, -122.464830),
    (37.774797, -122.454538),
    (37.771988, -122.454018),
    (37.773646, -122.440979),
    (37.772742, -122.440797),
    (37.771096, -122.453889),
    (37.768669, -122.453518),
    (37.766227, -122.460213),
    (37.764028, -122.510347)
])
gmap.polygon(*golden_gate_park, color='cornflowerblue', edge_width=10)

# Highlight some attractions:
attractions_lats, attractions_lngs = zip(*[
    (37.769901, -122.498331),
    (37.768645, -122.475328),
    (37.771478, -122.468677),
    (37.769867, -122.466102),
    (37.767187, -122.467496),
    (37.770104, -122.470436)
])
gmap.scatter(attractions_lats, attractions_lngs, color='#3B0B39', size=40, marker=False)

# Mark a hidden gem:
gmap.marker(37.770776, -122.461689, color='cornflowerblue')

# Draw the map:
gmap.draw('map.html')
https://raw.githubusercontent.com/gmplot/gmplot/master/docs/images/README_Example.png

Inspired by Yifei Jiang’s (jiangyifei@gmail.com) pygmaps module.

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

gmplot-1.4.0.tar.gz (134.6 kB view details)

Uploaded Source

Built Distribution

gmplot-1.4.0-py3-none-any.whl (163.2 kB view details)

Uploaded Python 3

File details

Details for the file gmplot-1.4.0.tar.gz.

File metadata

  • Download URL: gmplot-1.4.0.tar.gz
  • Upload date:
  • Size: 134.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for gmplot-1.4.0.tar.gz
Algorithm Hash digest
SHA256 5f9dfd7e929fcc0c3e56cf11ed9de96a894781a7b23b3186007d992350082f0c
MD5 10998a58e86f0a121605c1bcbfb0341e
BLAKE2b-256 a6d47b76b3bffd53834e39379d9a63eb047820c11d79452d56d7f1a96f4ab985

See more details on using hashes here.

File details

Details for the file gmplot-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: gmplot-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 163.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for gmplot-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d62b3a3957d8d615962c5aeded29f8d7031742a081ca390a17f1db3edef4d84
MD5 4648ba1ca07404c03a8632b660357836
BLAKE2b-256 08fb7bfa7eddf001a1de803cf453959a071e4b4d45ffa2d845f7ee61313f58e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page