popgrid 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- popgrid/__init__.py +40 -0
- popgrid/cartogram.py +747 -0
- popgrid/core.py +1127 -0
- popgrid/data.py +432 -0
- popgrid/exceptions.py +19 -0
- popgrid/geometry.py +223 -0
- popgrid/grid.py +231 -0
- popgrid/render.py +954 -0
- popgrid/resources/population.csv +797 -0
- popgrid-0.4.0.dist-info/METADATA +184 -0
- popgrid-0.4.0.dist-info/RECORD +14 -0
- popgrid-0.4.0.dist-info/WHEEL +5 -0
- popgrid-0.4.0.dist-info/licenses/LICENSE +21 -0
- popgrid-0.4.0.dist-info/top_level.txt +1 -0
popgrid/__init__.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""
|
|
2
|
+
popgrid — Population grid maps for any country.
|
|
3
|
+
|
|
4
|
+
Every country rasterised into N equal-area square cells,
|
|
5
|
+
coloured by administrative region.
|
|
6
|
+
|
|
7
|
+
Quick start
|
|
8
|
+
-----------
|
|
9
|
+
>>> from popgrid import AreaGrid
|
|
10
|
+
>>> import matplotlib.pyplot as plt
|
|
11
|
+
>>>
|
|
12
|
+
>>> ag = AreaGrid("ESP", n=1000)
|
|
13
|
+
>>> fig = ag.plot()
|
|
14
|
+
>>> plt.show()
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from .core import AreaGrid, PopGrid
|
|
18
|
+
from .data import KNOWN_DISSOLVE, RECOMMENDED_SETTINGS, REGION_LABELS
|
|
19
|
+
from .exceptions import (
|
|
20
|
+
CountryNotFoundError,
|
|
21
|
+
DataNotFoundError,
|
|
22
|
+
GeometryError,
|
|
23
|
+
PopGridError,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
__version__ = "0.4.0"
|
|
27
|
+
__author__ = "Josep Ferrer"
|
|
28
|
+
__email__ = "rfeers@gmail.com"
|
|
29
|
+
|
|
30
|
+
__all__ = [
|
|
31
|
+
"AreaGrid",
|
|
32
|
+
"PopGrid",
|
|
33
|
+
"KNOWN_DISSOLVE",
|
|
34
|
+
"RECOMMENDED_SETTINGS",
|
|
35
|
+
"REGION_LABELS",
|
|
36
|
+
"PopGridError",
|
|
37
|
+
"DataNotFoundError",
|
|
38
|
+
"CountryNotFoundError",
|
|
39
|
+
"GeometryError",
|
|
40
|
+
]
|