[Python-modules-commits] [gmplot] 01/03: import gmplot-1.1.0.tar.gz

Sandro Tosi morph at moszumanska.debian.org
Wed Dec 23 17:46:50 UTC 2015


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository gmplot.

commit 11bf4305066feabdbba5d16467943aed2a172572
Author: Sandro Tosi <morph at debian.org>
Date:   Wed Dec 23 17:05:52 2015 +0000

    import gmplot-1.1.0.tar.gz
---
 MANIFEST.in                          |   2 +
 PKG-INFO                             |  67 ++++++
 README.rst                           |  56 +++++
 gmplot.egg-info/PKG-INFO             |  67 ++++++
 gmplot.egg-info/SOURCES.txt          | 149 +++++++++++++
 gmplot.egg-info/dependency_links.txt |   1 +
 gmplot.egg-info/requires.txt         |   1 +
 gmplot.egg-info/top_level.txt        |   1 +
 gmplot/__init__.py                   |   1 +
 gmplot/color_dicts.py                | 156 ++++++++++++++
 gmplot/gmplot.py                     | 394 +++++++++++++++++++++++++++++++++++
 gmplot/markers/000000.png            | Bin 0 -> 425 bytes
 gmplot/markers/000080.png            | Bin 0 -> 656 bytes
 gmplot/markers/00008B.png            | Bin 0 -> 658 bytes
 gmplot/markers/0000CD.png            | Bin 0 -> 658 bytes
 gmplot/markers/0000FF.png            | Bin 0 -> 584 bytes
 gmplot/markers/006400.png            | Bin 0 -> 645 bytes
 gmplot/markers/008000.png            | Bin 0 -> 659 bytes
 gmplot/markers/008080.png            | Bin 0 -> 765 bytes
 gmplot/markers/008B8B.png            | Bin 0 -> 767 bytes
 gmplot/markers/00BFFF.png            | Bin 0 -> 775 bytes
 gmplot/markers/00CED1.png            | Bin 0 -> 768 bytes
 gmplot/markers/00FA9A.png            | Bin 0 -> 772 bytes
 gmplot/markers/00FF00.png            | Bin 0 -> 586 bytes
 gmplot/markers/00FF7F.png            | Bin 0 -> 773 bytes
 gmplot/markers/00FFFF.png            | Bin 0 -> 677 bytes
 gmplot/markers/191970.png            | Bin 0 -> 802 bytes
 gmplot/markers/1E90FF.png            | Bin 0 -> 853 bytes
 gmplot/markers/20B2AA.png            | Bin 0 -> 854 bytes
 gmplot/markers/228B22.png            | Bin 0 -> 828 bytes
 gmplot/markers/2E8B57.png            | Bin 0 -> 851 bytes
 gmplot/markers/2F4F4F.png            | Bin 0 -> 824 bytes
 gmplot/markers/32CD32.png            | Bin 0 -> 841 bytes
 gmplot/markers/3CB371.png            | Bin 0 -> 853 bytes
 gmplot/markers/40E0D0.png            | Bin 0 -> 865 bytes
 gmplot/markers/4169E1.png            | Bin 0 -> 853 bytes
 gmplot/markers/4682B4.png            | Bin 0 -> 860 bytes
 gmplot/markers/483D8B.png            | Bin 0 -> 850 bytes
 gmplot/markers/48D1CC.png            | Bin 0 -> 862 bytes
 gmplot/markers/4B0082.png            | Bin 0 -> 769 bytes
 gmplot/markers/556B2F.png            | Bin 0 -> 847 bytes
 gmplot/markers/5F9EA0.png            | Bin 0 -> 857 bytes
 gmplot/markers/6495ED.png            | Bin 0 -> 864 bytes
 gmplot/markers/66CDAA.png            | Bin 0 -> 866 bytes
 gmplot/markers/696969.png            | Bin 0 -> 824 bytes
 gmplot/markers/6A5ACD.png            | Bin 0 -> 852 bytes
 gmplot/markers/6B8E23.png            | Bin 0 -> 840 bytes
 gmplot/markers/708090.png            | Bin 0 -> 856 bytes
 gmplot/markers/778899.png            | Bin 0 -> 866 bytes
 gmplot/markers/7B68EE.png            | Bin 0 -> 855 bytes
 gmplot/markers/7CFC00.png            | Bin 0 -> 769 bytes
 gmplot/markers/7FFF00.png            | Bin 0 -> 774 bytes
 gmplot/markers/7FFFD4.png            | Bin 0 -> 876 bytes
 gmplot/markers/800000.png            | Bin 0 -> 664 bytes
 gmplot/markers/800080.png            | Bin 0 -> 767 bytes
 gmplot/markers/808000.png            | Bin 0 -> 765 bytes
 gmplot/markers/808080.png            | Bin 0 -> 834 bytes
 gmplot/markers/87CEEB.png            | Bin 0 -> 874 bytes
 gmplot/markers/87CEFA.png            | Bin 0 -> 878 bytes
 gmplot/markers/8A2BE2.png            | Bin 0 -> 857 bytes
 gmplot/markers/8B0000.png            | Bin 0 -> 667 bytes
 gmplot/markers/8B008B.png            | Bin 0 -> 766 bytes
 gmplot/markers/8B4513.png            | Bin 0 -> 832 bytes
 gmplot/markers/8FBC8F.png            | Bin 0 -> 867 bytes
 gmplot/markers/90EE90.png            | Bin 0 -> 865 bytes
 gmplot/markers/9370DB.png            | Bin 0 -> 866 bytes
 gmplot/markers/9400D3.png            | Bin 0 -> 783 bytes
 gmplot/markers/98FB98.png            | Bin 0 -> 872 bytes
 gmplot/markers/9932CC.png            | Bin 0 -> 858 bytes
 gmplot/markers/9ACD32.png            | Bin 0 -> 863 bytes
 gmplot/markers/A0522D.png            | Bin 0 -> 840 bytes
 gmplot/markers/A52A2A.png            | Bin 0 -> 829 bytes
 gmplot/markers/A9A9A9.png            | Bin 0 -> 851 bytes
 gmplot/markers/ADD8E6.png            | Bin 0 -> 878 bytes
 gmplot/markers/ADFF2F.png            | Bin 0 -> 856 bytes
 gmplot/markers/AFEEEE.png            | Bin 0 -> 876 bytes
 gmplot/markers/B0C4DE.png            | Bin 0 -> 876 bytes
 gmplot/markers/B0E0E6.png            | Bin 0 -> 877 bytes
 gmplot/markers/B22222.png            | Bin 0 -> 828 bytes
 gmplot/markers/B8860B.png            | Bin 0 -> 824 bytes
 gmplot/markers/BA55D3.png            | Bin 0 -> 867 bytes
 gmplot/markers/BC8F8F.png            | Bin 0 -> 865 bytes
 gmplot/markers/BDB76B.png            | Bin 0 -> 866 bytes
 gmplot/markers/C0C0C0.png            | Bin 0 -> 855 bytes
 gmplot/markers/C71585.png            | Bin 0 -> 843 bytes
 gmplot/markers/CD5C5C.png            | Bin 0 -> 845 bytes
 gmplot/markers/CD853F.png            | Bin 0 -> 866 bytes
 gmplot/markers/D2691E.png            | Bin 0 -> 848 bytes
 gmplot/markers/D2B48C.png            | Bin 0 -> 878 bytes
 gmplot/markers/D3D3D3.png            | Bin 0 -> 844 bytes
 gmplot/markers/D8BFD8.png            | Bin 0 -> 867 bytes
 gmplot/markers/DA70D6.png            | Bin 0 -> 868 bytes
 gmplot/markers/DAA520.png            | Bin 0 -> 862 bytes
 gmplot/markers/DB7093.png            | Bin 0 -> 864 bytes
 gmplot/markers/DC143C.png            | Bin 0 -> 824 bytes
 gmplot/markers/DCDCDC.png            | Bin 0 -> 847 bytes
 gmplot/markers/DDA0DD.png            | Bin 0 -> 868 bytes
 gmplot/markers/DEB887.png            | Bin 0 -> 883 bytes
 gmplot/markers/E0FFFF.png            | Bin 0 -> 790 bytes
 gmplot/markers/E6E6FA.png            | Bin 0 -> 809 bytes
 gmplot/markers/E9967A.png            | Bin 0 -> 872 bytes
 gmplot/markers/EE82EE.png            | Bin 0 -> 862 bytes
 gmplot/markers/EEE8AA.png            | Bin 0 -> 879 bytes
 gmplot/markers/F08080.png            | Bin 0 -> 865 bytes
 gmplot/markers/F0E68C.png            | Bin 0 -> 879 bytes
 gmplot/markers/F0F8FF.png            | Bin 0 -> 777 bytes
 gmplot/markers/F0FFF0.png            | Bin 0 -> 785 bytes
 gmplot/markers/F0FFFF.png            | Bin 0 -> 759 bytes
 gmplot/markers/F4A460.png            | Bin 0 -> 874 bytes
 gmplot/markers/F5DEB3.png            | Bin 0 -> 885 bytes
 gmplot/markers/F5F5DC.png            | Bin 0 -> 810 bytes
 gmplot/markers/F5F5F5.png            | Bin 0 -> 769 bytes
 gmplot/markers/F5FFFA.png            | Bin 0 -> 762 bytes
 gmplot/markers/F8F8FF.png            | Bin 0 -> 757 bytes
 gmplot/markers/FA8072.png            | Bin 0 -> 868 bytes
 gmplot/markers/FAEBD7.png            | Bin 0 -> 844 bytes
 gmplot/markers/FAF0E6.png            | Bin 0 -> 808 bytes
 gmplot/markers/FAFAD2.png            | Bin 0 -> 808 bytes
 gmplot/markers/FDF5E6.png            | Bin 0 -> 798 bytes
 gmplot/markers/FF0000.png            | Bin 0 -> 593 bytes
 gmplot/markers/FF00FF.png            | Bin 0 -> 672 bytes
 gmplot/markers/FF1493.png            | Bin 0 -> 839 bytes
 gmplot/markers/FF4500.png            | Bin 0 -> 767 bytes
 gmplot/markers/FF6347.png            | Bin 0 -> 856 bytes
 gmplot/markers/FF69B4.png            | Bin 0 -> 873 bytes
 gmplot/markers/FF7F50.png            | Bin 0 -> 864 bytes
 gmplot/markers/FF8C00.png            | Bin 0 -> 779 bytes
 gmplot/markers/FFA07A.png            | Bin 0 -> 873 bytes
 gmplot/markers/FFA500.png            | Bin 0 -> 779 bytes
 gmplot/markers/FFB6C1.png            | Bin 0 -> 878 bytes
 gmplot/markers/FFC0CB.png            | Bin 0 -> 885 bytes
 gmplot/markers/FFD700.png            | Bin 0 -> 718 bytes
 gmplot/markers/FFDAB9.png            | Bin 0 -> 883 bytes
 gmplot/markers/FFDEAD.png            | Bin 0 -> 889 bytes
 gmplot/markers/FFE4B5.png            | Bin 0 -> 878 bytes
 gmplot/markers/FFE4C4.png            | Bin 0 -> 877 bytes
 gmplot/markers/FFE4E1.png            | Bin 0 -> 814 bytes
 gmplot/markers/FFEBCD.png            | Bin 0 -> 844 bytes
 gmplot/markers/FFEFD5.png            | Bin 0 -> 820 bytes
 gmplot/markers/FFF0F5.png            | Bin 0 -> 773 bytes
 gmplot/markers/FFF5EE.png            | Bin 0 -> 774 bytes
 gmplot/markers/FFF8DC.png            | Bin 0 -> 799 bytes
 gmplot/markers/FFFACD.png            | Bin 0 -> 818 bytes
 gmplot/markers/FFFAF0.png            | Bin 0 -> 773 bytes
 gmplot/markers/FFFAFA.png            | Bin 0 -> 754 bytes
 gmplot/markers/FFFF00.png            | Bin 0 -> 670 bytes
 gmplot/markers/FFFFE0.png            | Bin 0 -> 787 bytes
 gmplot/markers/FFFFF0.png            | Bin 0 -> 757 bytes
 gmplot/markers/FFFFFF.png            | Bin 0 -> 737 bytes
 setup.cfg                            |   5 +
 setup.py                             |  25 +++
 151 files changed, 925 insertions(+)

diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..f25d5cd
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,2 @@
+recursive-include gmplot *.png
+recursive-include gmplot *.py
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..3a74960
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,67 @@
+Metadata-Version: 1.0
+Name: gmplot
+Version: 1.1.0
+Summary: Provide a matplotlib like interface to plotting data with Google Maps
+Home-page: https://github.com/vgm64/gmplot
+Author: Michael Woods
+Author-email: physicsmichael at gmail.com
+License: MIT
+Description: gmplot
+        ======
+        
+        Plotting data on Google Maps, the easy way. A matplotlib-like
+        interface to generate the HTML and javascript to render all the
+        data you'd like on top of Google Maps. Several plotting methods
+        make creating exploratory map views effortless. Here's a crash course:
+        
+        ::
+        
+            import gmplot
+        
+            gmap = gmplot.GoogleMapPlotter(37.428, -122.145, 16)
+        
+            gmap.plot(latitudes, longitudes, 'cornflowerblue', edge_width=10)
+            gmap.scatter(more_lats, more_lngs, '#3B0B39', size=40, marker=False)
+            gmap.scatter(marker_lats, marker_lngs, 'k', marker=True)
+            gmap.heatmap(heat_lats, heat_lngs)
+        
+            gmap.draw("mymap.html")
+        
+        
+        Geocoding
+        ---------
+        
+        ``gmplot`` contains a simple wrapper around Google's geocoding service enabling
+        map initilization to the location of your choice. Rather than providing latitude,
+        longitude, and zoom level during initialization, grab your gmplot instance with
+        a location:
+        
+        ::
+        
+            gmap = gmplot.from_geocode("San Francisco")
+        
+        Plot types
+        ----------
+        
+        * Polygons with fills.
+        * Drop pins.
+        * Scatter points.
+        * Grid lines.
+        * Heatmaps.
+        
+        .. image:: http://i.imgur.com/dTNkbZ7.png
+        
+        Misc.
+        -----
+        
+        Code hosted on `GitHub <https://github.com/vgm64/gmplot>`_
+        
+        Install easily with ``pip install gmplot`` from PyPI.
+        
+        Inspired by Yifei Jiang's (jiangyifei at gmail.com) pygmaps_ module.
+        
+        .. _pygmaps: http://code.google.com/p/pygmaps/
+        
+        
+Keywords: python wrapper google maps
+Platform: UNKNOWN
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..cdb2c48
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,56 @@
+gmplot
+======
+
+Plotting data on Google Maps, the easy way. A matplotlib-like
+interface to generate the HTML and javascript to render all the
+data you'd like on top of Google Maps. Several plotting methods
+make creating exploratory map views effortless. Here's a crash course:
+
+::
+
+    import gmplot
+
+    gmap = gmplot.GoogleMapPlotter(37.428, -122.145, 16)
+
+    gmap.plot(latitudes, longitudes, 'cornflowerblue', edge_width=10)
+    gmap.scatter(more_lats, more_lngs, '#3B0B39', size=40, marker=False)
+    gmap.scatter(marker_lats, marker_lngs, 'k', marker=True)
+    gmap.heatmap(heat_lats, heat_lngs)
+
+    gmap.draw("mymap.html")
+
+
+Geocoding
+---------
+
+``gmplot`` contains a simple wrapper around Google's geocoding service enabling
+map initilization to the location of your choice. Rather than providing latitude,
+longitude, and zoom level during initialization, grab your gmplot instance with
+a location:
+
+::
+
+    gmap = gmplot.from_geocode("San Francisco")
+
+Plot types
+----------
+
+* Polygons with fills.
+* Drop pins.
+* Scatter points.
+* Grid lines.
+* Heatmaps.
+
+.. image:: http://i.imgur.com/dTNkbZ7.png
+
+Misc.
+-----
+
+Code hosted on `GitHub <https://github.com/vgm64/gmplot>`_
+
+Install easily with ``pip install gmplot`` from PyPI.
+
+Inspired by Yifei Jiang's (jiangyifei at gmail.com) pygmaps_ module.
+
+.. _pygmaps: http://code.google.com/p/pygmaps/
+
diff --git a/gmplot.egg-info/PKG-INFO b/gmplot.egg-info/PKG-INFO
new file mode 100644
index 0000000..3a74960
--- /dev/null
+++ b/gmplot.egg-info/PKG-INFO
@@ -0,0 +1,67 @@
+Metadata-Version: 1.0
+Name: gmplot
+Version: 1.1.0
+Summary: Provide a matplotlib like interface to plotting data with Google Maps
+Home-page: https://github.com/vgm64/gmplot
+Author: Michael Woods
+Author-email: physicsmichael at gmail.com
+License: MIT
+Description: gmplot
+        ======
+        
+        Plotting data on Google Maps, the easy way. A matplotlib-like
+        interface to generate the HTML and javascript to render all the
+        data you'd like on top of Google Maps. Several plotting methods
+        make creating exploratory map views effortless. Here's a crash course:
+        
+        ::
+        
+            import gmplot
+        
+            gmap = gmplot.GoogleMapPlotter(37.428, -122.145, 16)
+        
+            gmap.plot(latitudes, longitudes, 'cornflowerblue', edge_width=10)
+            gmap.scatter(more_lats, more_lngs, '#3B0B39', size=40, marker=False)
+            gmap.scatter(marker_lats, marker_lngs, 'k', marker=True)
+            gmap.heatmap(heat_lats, heat_lngs)
+        
+            gmap.draw("mymap.html")
+        
+        
+        Geocoding
+        ---------
+        
+        ``gmplot`` contains a simple wrapper around Google's geocoding service enabling
+        map initilization to the location of your choice. Rather than providing latitude,
+        longitude, and zoom level during initialization, grab your gmplot instance with
+        a location:
+        
+        ::
+        
+            gmap = gmplot.from_geocode("San Francisco")
+        
+        Plot types
+        ----------
+        
+        * Polygons with fills.
+        * Drop pins.
+        * Scatter points.
+        * Grid lines.
+        * Heatmaps.
+        
+        .. image:: http://i.imgur.com/dTNkbZ7.png
+        
+        Misc.
+        -----
+        
+        Code hosted on `GitHub <https://github.com/vgm64/gmplot>`_
+        
+        Install easily with ``pip install gmplot`` from PyPI.
+        
+        Inspired by Yifei Jiang's (jiangyifei at gmail.com) pygmaps_ module.
+        
+        .. _pygmaps: http://code.google.com/p/pygmaps/
+        
+        
+Keywords: python wrapper google maps
+Platform: UNKNOWN
diff --git a/gmplot.egg-info/SOURCES.txt b/gmplot.egg-info/SOURCES.txt
new file mode 100644
index 0000000..aa42ad4
--- /dev/null
+++ b/gmplot.egg-info/SOURCES.txt
@@ -0,0 +1,149 @@
+MANIFEST.in
+README.rst
+setup.py
+gmplot/__init__.py
+gmplot/color_dicts.py
+gmplot/gmplot.py
+gmplot.egg-info/PKG-INFO
+gmplot.egg-info/SOURCES.txt
+gmplot.egg-info/dependency_links.txt
+gmplot.egg-info/requires.txt
+gmplot.egg-info/top_level.txt
+gmplot/markers/000000.png
+gmplot/markers/000080.png
+gmplot/markers/00008B.png
+gmplot/markers/0000CD.png
+gmplot/markers/0000FF.png
+gmplot/markers/006400.png
+gmplot/markers/008000.png
+gmplot/markers/008080.png
+gmplot/markers/008B8B.png
+gmplot/markers/00BFFF.png
+gmplot/markers/00CED1.png
+gmplot/markers/00FA9A.png
+gmplot/markers/00FF00.png
+gmplot/markers/00FF7F.png
+gmplot/markers/00FFFF.png
+gmplot/markers/191970.png
+gmplot/markers/1E90FF.png
+gmplot/markers/20B2AA.png
+gmplot/markers/228B22.png
+gmplot/markers/2E8B57.png
+gmplot/markers/2F4F4F.png
+gmplot/markers/32CD32.png
+gmplot/markers/3CB371.png
+gmplot/markers/40E0D0.png
+gmplot/markers/4169E1.png
+gmplot/markers/4682B4.png
+gmplot/markers/483D8B.png
+gmplot/markers/48D1CC.png
+gmplot/markers/4B0082.png
+gmplot/markers/556B2F.png
+gmplot/markers/5F9EA0.png
+gmplot/markers/6495ED.png
+gmplot/markers/66CDAA.png
+gmplot/markers/696969.png
+gmplot/markers/6A5ACD.png
+gmplot/markers/6B8E23.png
+gmplot/markers/708090.png
+gmplot/markers/778899.png
+gmplot/markers/7B68EE.png
+gmplot/markers/7CFC00.png
+gmplot/markers/7FFF00.png
+gmplot/markers/7FFFD4.png
+gmplot/markers/800000.png
+gmplot/markers/800080.png
+gmplot/markers/808000.png
+gmplot/markers/808080.png
+gmplot/markers/87CEEB.png
+gmplot/markers/87CEFA.png
+gmplot/markers/8A2BE2.png
+gmplot/markers/8B0000.png
+gmplot/markers/8B008B.png
+gmplot/markers/8B4513.png
+gmplot/markers/8FBC8F.png
+gmplot/markers/90EE90.png
+gmplot/markers/9370DB.png
+gmplot/markers/9400D3.png
+gmplot/markers/98FB98.png
+gmplot/markers/9932CC.png
+gmplot/markers/9ACD32.png
+gmplot/markers/A0522D.png
+gmplot/markers/A52A2A.png
+gmplot/markers/A9A9A9.png
+gmplot/markers/ADD8E6.png
+gmplot/markers/ADFF2F.png
+gmplot/markers/AFEEEE.png
+gmplot/markers/B0C4DE.png
+gmplot/markers/B0E0E6.png
+gmplot/markers/B22222.png
+gmplot/markers/B8860B.png
+gmplot/markers/BA55D3.png
+gmplot/markers/BC8F8F.png
+gmplot/markers/BDB76B.png
+gmplot/markers/C0C0C0.png
+gmplot/markers/C71585.png
+gmplot/markers/CD5C5C.png
+gmplot/markers/CD853F.png
+gmplot/markers/D2691E.png
+gmplot/markers/D2B48C.png
+gmplot/markers/D3D3D3.png
+gmplot/markers/D8BFD8.png
+gmplot/markers/DA70D6.png
+gmplot/markers/DAA520.png
+gmplot/markers/DB7093.png
+gmplot/markers/DC143C.png
+gmplot/markers/DCDCDC.png
+gmplot/markers/DDA0DD.png
+gmplot/markers/DEB887.png
+gmplot/markers/E0FFFF.png
+gmplot/markers/E6E6FA.png
+gmplot/markers/E9967A.png
+gmplot/markers/EE82EE.png
+gmplot/markers/EEE8AA.png
+gmplot/markers/F08080.png
+gmplot/markers/F0E68C.png
+gmplot/markers/F0F8FF.png
+gmplot/markers/F0FFF0.png
+gmplot/markers/F0FFFF.png
+gmplot/markers/F4A460.png
+gmplot/markers/F5DEB3.png
+gmplot/markers/F5F5DC.png
+gmplot/markers/F5F5F5.png
+gmplot/markers/F5FFFA.png
+gmplot/markers/F8F8FF.png
+gmplot/markers/FA8072.png
+gmplot/markers/FAEBD7.png
+gmplot/markers/FAF0E6.png
+gmplot/markers/FAFAD2.png
+gmplot/markers/FDF5E6.png
+gmplot/markers/FF0000.png
+gmplot/markers/FF00FF.png
+gmplot/markers/FF1493.png
+gmplot/markers/FF4500.png
+gmplot/markers/FF6347.png
+gmplot/markers/FF69B4.png
+gmplot/markers/FF7F50.png
+gmplot/markers/FF8C00.png
+gmplot/markers/FFA07A.png
+gmplot/markers/FFA500.png
+gmplot/markers/FFB6C1.png
+gmplot/markers/FFC0CB.png
+gmplot/markers/FFD700.png
+gmplot/markers/FFDAB9.png
+gmplot/markers/FFDEAD.png
+gmplot/markers/FFE4B5.png
+gmplot/markers/FFE4C4.png
+gmplot/markers/FFE4E1.png
+gmplot/markers/FFEBCD.png
+gmplot/markers/FFEFD5.png
+gmplot/markers/FFF0F5.png
+gmplot/markers/FFF5EE.png
+gmplot/markers/FFF8DC.png
+gmplot/markers/FFFACD.png
+gmplot/markers/FFFAF0.png
+gmplot/markers/FFFAFA.png
+gmplot/markers/FFFF00.png
+gmplot/markers/FFFFE0.png
+gmplot/markers/FFFFF0.png
+gmplot/markers/FFFFFF.png
\ No newline at end of file
diff --git a/gmplot.egg-info/dependency_links.txt b/gmplot.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/gmplot.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/gmplot.egg-info/requires.txt b/gmplot.egg-info/requires.txt
new file mode 100644
index 0000000..663bd1f
--- /dev/null
+++ b/gmplot.egg-info/requires.txt
@@ -0,0 +1 @@
+requests
\ No newline at end of file
diff --git a/gmplot.egg-info/top_level.txt b/gmplot.egg-info/top_level.txt
new file mode 100644
index 0000000..7f12740
--- /dev/null
+++ b/gmplot.egg-info/top_level.txt
@@ -0,0 +1 @@
+gmplot
diff --git a/gmplot/__init__.py b/gmplot/__init__.py
new file mode 100644
index 0000000..52216be
--- /dev/null
+++ b/gmplot/__init__.py
@@ -0,0 +1 @@
+from gmplot import GoogleMapPlotter
\ No newline at end of file
diff --git a/gmplot/color_dicts.py b/gmplot/color_dicts.py
new file mode 100644
index 0000000..c152251
--- /dev/null
+++ b/gmplot/color_dicts.py
@@ -0,0 +1,156 @@
+mpl_color_map = {
+    'b': 'blue',
+    'g': 'green',
+    'r': 'red',
+    'c': 'cyan',
+    'm': 'magenta',
+    'y': 'yellow',
+    'k': 'black',
+    'w': 'white'
+}
+
+# TODO: Copy matplotlib.colors.cnames
+# That list has 147 colors. The below is only 120. =(
+html_color_codes = {
+    'aliceblue': '#F0F8FF',
+    'antiquewhite': '#FAEBD7',
+    'aqua': '#00FFFF',
+    'aquamarine': '#7FFFD4',
+    'azure': '#F0FFFF',
+    'beige': '#F5F5DC',
+    'bisque': '#FFE4C4',
+    'black': '#000000',
+    'blanchedalmond': '#FFEBCD',
+    'blue': '#0000FF',
+    'blueviolet': '#8A2BE2',
+    'brown': '#A52A2A',
+    'burlywood': '#DEB887',
+    'cadetblue': '#5F9EA0',
+    'chartreuse': '#7FFF00',
+    'chocolate': '#D2691E',
+    'coral': '#FF7F50',
+    'cornflowerblue': '#6495ED',
+    'cornsilk': '#FFF8DC',
+    'crimson': '#DC143C',
+    'cyan': '#00FFFF',
+    'darkblue': '#00008B',
+    'darkcyan': '#008B8B',
+    'darkgoldenrod': '#B8860B',
+    'darkgray': '#A9A9A9',
+    'darkgreen': '#006400',
+    'darkkhaki': '#BDB76B',
+    'darkmagenta': '#8B008B',
+    'darkolivegreen': '#556B2F',
+    'darkorange': '#FF8C00',
+    'darkorchid': '#9932CC',
+    'darkred': '#8B0000',
+    'darksalmon': '#E9967A',
+    'darkseagreen': '#8FBC8F',
+    'darkslateblue': '#483D8B',
+    'darkslategray': '#2F4F4F',
+    'darkturquoise': '#00CED1',
+    'darkviolet': '#9400D3',
+    'deeppink': '#FF1493',
+    'deepskyblue': '#00BFFF',
+    'dimgray': '#696969',
+    'dodgerblue': '#1E90FF',
+    'firebrick': '#B22222',
+    'floralwhite': '#FFFAF0',
+    'forestgreen': '#228B22',
+    'fuchsia': '#FF00FF',
+    'gainsboro': '#DCDCDC',
+    'ghostwhite': '#F8F8FF',
+    'gold': '#FFD700',
+    'goldenrod': '#DAA520',
+    'gray': '#808080',
+    'green': '#008000',
+    'greenyellow': '#ADFF2F',
+    'honeydew': '#F0FFF0',
+    'hotpink': '#FF69B4',
+    'indianred': '#CD5C5C',
+    'indigo': '#4B0082',
+    'ivory': '#FFFFF0',
+    'khaki': '#F0E68C',
+    'lavender': '#E6E6FA',
+    'lavenderblush': '#FFF0F5',
+    'lawngreen': '#7CFC00',
+    'lemonchiffon': '#FFFACD',
+    'lightblue': '#ADD8E6',
+    'lightcoral': '#F08080',
+    'lightcyan': '#E0FFFF',
+    'lightgoldenrodyellow': '#FAFAD2',
+    'lightgray': '#D3D3D3',
+    'lightgreen': '#90EE90',
+    'lightpink': '#FFB6C1',
+    'lightsalmon': '#FFA07A',
+    'lightseagreen': '#20B2AA',
+    'lightskyblue': '#87CEFA',
+    'lightslategray': '#778899',
+    'lightsteelblue': '#B0C4DE',
+    'lightyellow': '#FFFFE0',
+    'lime': '#00FF00',
+    'limegreen': '#32CD32',
+    'linen': '#FAF0E6',
+    'magenta': '#FF00FF',
+    'maroon': '#800000',
+    'mediumaquamarine': '#66CDAA',
+    'mediumblue': '#0000CD',
+    'mediumorchid': '#BA55D3',
+    'mediumpurple': '#9370DB',
+    'mediumseagreen': '#3CB371',
+    'mediumslateblue': '#7B68EE',
+    'mediumspringgreen': '#00FA9A',
+    'mediumturquoise': '#48D1CC',
+    'mediumvioletred': '#C71585',
+    'midnightblue': '#191970',
+    'mintcream': '#F5FFFA',
+    'mistyrose': '#FFE4E1',
+    'moccasin': '#FFE4B5',
+    'navajowhite': '#FFDEAD',
+    'navy': '#000080',
+    'oldlace': '#FDF5E6',
+    'olive': '#808000',
+    'olivedrab': '#6B8E23',
+    'orange': '#FFA500',
+    'orangered': '#FF4500',
+    'orchid': '#DA70D6',
+    'palegoldenrod': '#EEE8AA',
+    'palegreen': '#98FB98',
+    'paleturquoise': '#AFEEEE',
+    'palevioletred': '#DB7093',
+    'papayawhip': '#FFEFD5',
+    'peachpuff': '#FFDAB9',
+    'peru': '#CD853F',
+    'pink': '#FFC0CB',
+    'plum': '#DDA0DD',
+    'powderblue': '#B0E0E6',
+    'purple': '#800080',
+    'red': '#FF0000',
+    'rosybrown': '#BC8F8F',
+    'royalblue': '#4169E1',
+    'saddlebrown': '#8B4513',
+    'salmon': '#FA8072',
+    'sandybrown': '#F4A460',
+    'seagreen': '#2E8B57',
+    'seashell': '#FFF5EE',
+    'sienna': '#A0522D',
+    'silver': '#C0C0C0',
+    'skyblue': '#87CEEB',
+    'slateblue': '#6A5ACD',
+    'slategray': '#708090',
+    'snow': '#FFFAFA',
+    'springgreen': '#00FF7F',
+    'steelblue': '#4682B4',
+    'tan': '#D2B48C',
+    'teal': '#008080',
+    'thistle': '#D8BFD8',
+    'tomato': '#FF6347',
+    'turquoise': '#40E0D0',
+    'violet': '#EE82EE',
+    'wheat': '#F5DEB3',
+    'white': '#FFFFFF',
+    'whitesmoke': '#F5F5F5',
+    'yellow': '#FFFF00',
+    'yellowgreen': '#9ACD32'
+}
+
diff --git a/gmplot/gmplot.py b/gmplot/gmplot.py
new file mode 100644
index 0000000..cb80186
--- /dev/null
+++ b/gmplot/gmplot.py
@@ -0,0 +1,394 @@
+import math
+import requests
+import json
+import os
+
+from color_dicts import mpl_color_map, html_color_codes
+
+
+def safe_iter(var):
+    try:
+        return iter(var)
+    except TypeError:
+        return [var]
+
+
+class GoogleMapPlotter(object):
+
+    def __init__(self, center_lat, center_lng, zoom):
+        self.center = (float(center_lat), float(center_lng))
+        self.zoom = int(zoom)
+        self.grids = None
+        self.paths = []
+        self.shapes = []
+        self.points = []
+        self.heatmap_points = []
+        self.radpoints = []
+        self.gridsetting = None
+        self.coloricon = os.path.join(os.path.dirname(__file__), 'markers/%s.png')
+        self.color_dict = mpl_color_map
+        self.html_color_codes = html_color_codes
+
+    @classmethod
+    def from_geocode(cls, location_string, zoom=13):
+        lat, lng = cls.geocode(location_string)
+        return cls(lat, lng, zoom)
+
+    @classmethod
+    def geocode(self, location_string):
+        geocode = requests.get(
+            'http://maps.googleapis.com/maps/api/geocode/json?address="%s"' % location_string)
+        geocode = json.loads(geocode.text)
+        latlng_dict = geocode['results'][0]['geometry']['location']
+        return latlng_dict['lat'], latlng_dict['lng']
+
+    def grid(self, slat, elat, latin, slng, elng, lngin):
+        self.gridsetting = [slat, elat, latin, slng, elng, lngin]
+
+    def marker(self, lat, lng, color='#FF0000', c=None):
+        if c:
+            color = c
+        color = self.color_dict.get(color, color)
+        color = self.html_color_codes.get(color, color)
+        self.points.append((lat, lng, color[1:]))
+
+    def scatter(self, lats, lngs, color=None, size=None, marker=True, c=None, s=None, **kwargs):
+        color = color or c
+        size = size or s or 40
+        kwargs["color"] = color
+        kwargs["size"] = size
+        settings = self._process_kwargs(kwargs)
+        for lat, lng in zip(lats, lngs):
+            if marker:
+                self.marker(lat, lng, settings['color'])
+            else:
+                self.circle(lat, lng, size, **settings)
+
+    def circle(self, lat, lng, radius, color=None, c=None, **kwargs):
+        color = color or c
+        kwargs.setdefault('face_alpha', 0.5)
+        kwargs.setdefault('face_color', "#000000")
+        kwargs.setdefault("color", color)
+        settings = self._process_kwargs(kwargs)
+        path = self.get_cycle(lat, lng, radius)
+        self.shapes.append((path, settings))
+
+    def _process_kwargs(self, kwargs):
+        settings = dict()
+        settings["edge_color"] = kwargs.get("color", None) or \
+                                 kwargs.get("edge_color", None) or \
+                                 kwargs.get("ec", None) or \
+                                 "#000000"
+
+        settings["edge_alpha"] = kwargs.get("alpha", None) or \
+                                 kwargs.get("edge_alpha", None) or \
+                                 kwargs.get("ea", None) or \
+                                 1.0
+        settings["edge_width"] = kwargs.get("edge_width", None) or \
+                                 kwargs.get("ew", None) or \
+                                 1.0
+        settings["face_alpha"] = kwargs.get("alpha", None) or \
+                                 kwargs.get("face_alpha", None) or \
+                                 kwargs.get("fa", None) or \
+                                 0.3
+        settings["face_color"] = kwargs.get("color", None) or \
+                                 kwargs.get("face_color", None) or \
+                                 kwargs.get("fc", None) or \
+                                 "#000000"
+
+        settings["color"] = kwargs.get("color", None) or \
+                            kwargs.get("c", None) or \
+                            settings["edge_color"] or \
+                            settings["face_color"]
+
+        # Need to replace "plum" with "#DDA0DD" and "c" with "#00FFFF" (cyan).
+        for key, color in settings.iteritems():
+            if 'color' in key:
+                color = self.color_dict.get(color, color)
+                color = self.html_color_codes.get(color, color)
+                settings[key] = color
+
+        settings["closed"] = kwargs.get("closed", None)
+
+        return settings
+
+    def plot(self, lats, lngs, color=None, c=None, **kwargs):
+        color = color or c
+        kwargs.setdefault("color", color)
+        settings = self._process_kwargs(kwargs)
+        path = zip(lats, lngs)
+        self.paths.append((path, settings))
+
+    def heatmap(self, lats, lngs, threshold=10, radius=10, gradient=None, opacity=0.6, dissipating=True):
+        """
+        :param lats: list of latitudes
+        :param lngs: list of longitudes
+        :param threshold:
+        :param radius: The hardest param. Example (string):
+        :return:
+        """
+        settings = {}
+        settings['threshold'] = threshold
+        settings['radius'] = radius
+        settings['gradient'] = gradient
+        settings['opacity'] = opacity
+        settings['dissipating'] = dissipating
+        settings = self._process_heatmap_kwargs(settings)
+
+        heatmap_points = []
+        for lat, lng in zip(lats, lngs):
+            heatmap_points.append((lat, lng))
+        self.heatmap_points.append((heatmap_points, settings))
+
+    def _process_heatmap_kwargs(self, settings_dict):
+        settings_string = ''
+        settings_string += "heatmap.set('threshold', %d);\n" % settings_dict['threshold']
+        settings_string += "heatmap.set('radius', %d);\n" % settings_dict['radius']
+        settings_string += "heatmap.set('opacity', %f);\n" % settings_dict['opacity']
+
+        dissipation_string = 'true' if settings_dict['dissipating'] else 'false'
+        settings_string += "heatmap.set('dissipating', %s);\n" % (dissipation_string)
+
+        gradient = settings_dict['gradient']
+        if gradient:
+            gradient_string = "var gradient = [\n"
+            for r, g, b, a in gradient:
+                gradient_string += "\t" + "'rgba(%d, %d, %d, %d)',\n" % (r, g, b, a)
+            gradient_string += '];' + '\n'
+            gradient_string += "heatmap.set('gradient', gradient);\n"
+
+            settings_string += gradient_string
+
+        return settings_string
+
+    def polygon(self, lats, lngs, color=None, c=None, **kwargs):
+        color = color or c
+        kwargs.setdefault("color", color)
+        settings = self._process_kwargs(kwargs)
+        shape = zip(lats, lngs)
+        self.shapes.append((shape, settings))
+
+    # create the html file which include one google map and all points and
+    # paths
+    def draw(self, htmlfile):
+        f = open(htmlfile, 'w')
+        f.write('<html>\n')
+        f.write('<head>\n')
+        f.write(
+            '<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />\n')
+        f.write(
+            '<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>\n')
+        f.write('<title>Google Maps - pygmaps </title>\n')
+        f.write('<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=visualization&sensor=true_or_false"></script>\n')
+        f.write('<script type="text/javascript">\n')
+        f.write('\tfunction initialize() {\n')
+        self.write_map(f)
+        self.write_grids(f)
+        self.write_points(f)
+        self.write_paths(f)
+        self.write_shapes(f)
+        self.write_heatmap(f)
+        f.write('\t}\n')
+        f.write('</script>\n')
+        f.write('</head>\n')
+        f.write(
+            '<body style="margin:0px; padding:0px;" onload="initialize()">\n')
+        f.write(
+            '\t<div id="map_canvas" style="width: 100%; height: 100%;"></div>\n')
+        f.write('</body>\n')
+        f.write('</html>\n')
+        f.close()
+
+    #############################################
+    # # # # # # Low level Map Drawing # # # # # #
+    #############################################
+
+    def write_grids(self, f):
+        if self.gridsetting is None:
+            return
+        slat = self.gridsetting[0]
+        elat = self.gridsetting[1]
+        latin = self.gridsetting[2]
+        slng = self.gridsetting[3]
+        elng = self.gridsetting[4]
+        lngin = self.gridsetting[5]
+        self.grids = []
+
+        r = [
+            slat + float(x) * latin for x in range(0, int((elat - slat) / latin))]
+        for lat in r:
+            self.grids.append(
+                [(lat + latin / 2.0, slng + lngin / 2.0), (lat + latin / 2.0, elng + lngin / 2.0)])
+
+        r = [
+            slng + float(x) * lngin for x in range(0, int((elng - slng) / lngin))]
+        for lng in r:
+            self.grids.append(
+                [(slat + latin / 2.0, lng + lngin / 2.0), (elat + latin / 2.0, lng + lngin / 2.0)])
+
+        for line in self.grids:
+            settings = self._process_kwargs({"color": "#000000"})
+            self.write_polyline(f, line, settings)
+
+    def write_points(self, f):
+        for point in self.points:
+            self.write_point(f, point[0], point[1], point[2])
+
+    def get_cycle(self, lat, lng, rad):
+        # unit of radius: meter
+        cycle = []
+        d = (rad / 1000.0) / 6378.8
+        lat1 = (math.pi / 180.0) * lat
+        lng1 = (math.pi / 180.0) * lng
+
+        r = [x * 10 for x in range(36)]
+        for a in r:
+            tc = (math.pi / 180.0) * a
+            y = math.asin(
+                math.sin(lat1) * math.cos(d) + math.cos(lat1) * math.sin(d) * math.cos(tc))
+            dlng = math.atan2(math.sin(
+                tc) * math.sin(d) * math.cos(lat1), math.cos(d) - math.sin(lat1) * math.sin(y))
+            x = ((lng1 - dlng + math.pi) % (2.0 * math.pi)) - math.pi
+            cycle.append(
+                (float(y * (180.0 / math.pi)), float(x * (180.0 / math.pi))))
+        return cycle
+
+    def write_paths(self, f):
+        for path, settings in self.paths:
+            self.write_polyline(f, path, settings)
+
+    def write_shapes(self, f):
+        for shape, settings in self.shapes:
+            self.write_polygon(f, shape, settings)
+
+    # TODO: Add support for mapTypeId: google.maps.MapTypeId.SATELLITE
+    def write_map(self,  f):
+        f.write('\t\tvar centerlatlng = new google.maps.LatLng(%f, %f);\n' %
+                (self.center[0], self.center[1]))
+        f.write('\t\tvar myOptions = {\n')
+        f.write('\t\t\tzoom: %d,\n' % (self.zoom))
+        f.write('\t\t\tcenter: centerlatlng,\n')
+        f.write('\t\t\tmapTypeId: google.maps.MapTypeId.ROADMAP\n')
... 717 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/gmplot.git



More information about the Python-modules-commits mailing list