matplotlib-map-utils 2.0.2__tar.gz → 2.1.0__tar.gz
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.
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/PKG-INFO +53 -4
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/README.md +50 -2
- matplotlib_map_utils-2.1.0/matplotlib_map_utils/utils/__init__.py +3 -0
- matplotlib_map_utils-2.1.0/matplotlib_map_utils/utils/usa.json +1038 -0
- matplotlib_map_utils-2.1.0/matplotlib_map_utils/utils/usa.py +336 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils.egg-info/PKG-INFO +53 -4
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils.egg-info/SOURCES.txt +3 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/pyproject.toml +4 -1
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/LICENSE +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils/__init__.py +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils/core/__init__.py +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils/core/north_arrow.py +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils/core/scale_bar.py +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils/defaults/__init__.py +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils/defaults/north_arrow.py +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils/defaults/scale_bar.py +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils/scratch/map_utils.py +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils/scratch/north_arrow_old_classes.py +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils/validation/__init__.py +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils/validation/functions.py +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils/validation/north_arrow.py +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils/validation/scale_bar.py +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils.egg-info/dependency_links.txt +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils.egg-info/requires.txt +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/matplotlib_map_utils.egg-info/top_level.txt +0 -0
- {matplotlib_map_utils-2.0.2 → matplotlib_map_utils-2.1.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: matplotlib-map-utils
|
3
|
-
Version: 2.0
|
3
|
+
Version: 2.1.0
|
4
4
|
Summary: A suite of tools for creating maps in matplotlib
|
5
5
|
Author-email: David Moss <davidmoss1221@gmail.com>
|
6
6
|
Project-URL: Homepage, https://github.com/moss-xyz/matplotlib-map-utils/
|
@@ -14,6 +14,7 @@ License-File: LICENSE
|
|
14
14
|
Requires-Dist: matplotlib>=3.9.0
|
15
15
|
Requires-Dist: cartopy>=0.23.0
|
16
16
|
Requires-Dist: great-circle-calculator>=1.3.1
|
17
|
+
Dynamic: license-file
|
17
18
|
|
18
19
|
# matplotlib-map-utils
|
19
20
|
|
@@ -29,12 +30,14 @@ Requires-Dist: great-circle-calculator>=1.3.1
|
|
29
30
|
|
30
31
|
`matplotlib_map_utils` is intended to be a package that provides various functions and objects that assist with the the creation of maps using [`matplotlib`](https://matplotlib.org/stable/).
|
31
32
|
|
32
|
-
As of `v2.x` (the current version), this includes two tools:
|
33
|
+
As of `v2.x` (the current version), this includes two tools and one utility:
|
33
34
|
|
34
35
|
* `north_arrow.py`, which generates a high quality, context-aware north arrow for a given plot.
|
35
36
|
|
36
37
|
* `scale_bar.py`, which generates a high quality, context-aware scale bar to a given plot.
|
37
38
|
|
39
|
+
* `usa.py`, which contains a class that helps filter for states and territories within the USA based on given characteristics.
|
40
|
+
|
38
41
|
Future releases (if the project is continued) might provide a similar tool inset maps, or other functions that I have created myself that give more control in the formatting of maps.
|
39
42
|
|
40
43
|
---
|
@@ -78,6 +81,10 @@ package_name/
|
|
78
81
|
│ ├── __init__.py
|
79
82
|
│ ├── north_arrow.py
|
80
83
|
│ └── scale_bar.py
|
84
|
+
├── utils/
|
85
|
+
│ ├── __init__.py
|
86
|
+
│ ├── usa.py
|
87
|
+
│ └── usa.json
|
81
88
|
```
|
82
89
|
|
83
90
|
Where:
|
@@ -230,6 +237,38 @@ Refer to `docs\howto_scale_bar` for details on how to customize each facet of th
|
|
230
237
|
|
231
238
|
---
|
232
239
|
|
240
|
+
### Utilities
|
241
|
+
|
242
|
+
<details>
|
243
|
+
<summary><i>Expand instructions</i></summary>
|
244
|
+
|
245
|
+
#### Quick Start
|
246
|
+
|
247
|
+
Importing the bundled utility functions and classes can be done like so:
|
248
|
+
|
249
|
+
```py
|
250
|
+
from matplotlib_map_utils.utils import USA
|
251
|
+
```
|
252
|
+
|
253
|
+
As of `v2.1.0`, there is only one utility class available: `USA`, an object to help quickly filter for subsets of US states and territories. This utility class is still in beta, and might change.
|
254
|
+
|
255
|
+
An example:
|
256
|
+
|
257
|
+
```python
|
258
|
+
# Loading the object
|
259
|
+
usa = USA()
|
260
|
+
# Getting a list FIPS codes for US States
|
261
|
+
usa.filter(states=True, to_return="fips")
|
262
|
+
# Getting a list of State Names for states in the South and Midwest regions
|
263
|
+
usa.filter(region=["South","Midtwest"], to_return="name")
|
264
|
+
```
|
265
|
+
|
266
|
+
Refer to `docs\howto_utils` for details on how to use this class, including with `pandas.apply()`.
|
267
|
+
|
268
|
+
</details>
|
269
|
+
|
270
|
+
---
|
271
|
+
|
233
272
|
### Development Notes
|
234
273
|
|
235
274
|
#### Inspiration and Thanks
|
@@ -248,6 +287,8 @@ Two more projects assisted with the creation of this script:
|
|
248
287
|
|
249
288
|
- `v2.0.2`: Changed f-string formatting to alternate double and single quotes, so as to maintain compatibility with versions of Python before 3.12 (see [here](https://github.com/moss-xyz/matplotlib-map-utils/issues/3)). However, this did reveal that another aspect of the code, namely concatenating `type` in function arguments, requires 3.10, and so the minimum python version was incremented.
|
250
289
|
|
290
|
+
- `v2.1.0`: Added a utility class, `USA`, for filtering subsets of US states and territories based on FIPS code, name, abbreviation, region, division, and more. This is considered a beta release, and might be subject to change later on.
|
291
|
+
|
251
292
|
#### Future Roadmap
|
252
293
|
|
253
294
|
With the release of `v2.x`, and the addition of **Scale Bar** tools, this project has achieved the two main objectives that I set out to.
|
@@ -270,7 +311,15 @@ If I continue development of this project, I will be looking to add or fix the f
|
|
270
311
|
|
271
312
|
* Create more styles for the bar, potentiallly including dual boxes and a sawtooth bar
|
272
313
|
|
273
|
-
|
314
|
+
* **Utils:**
|
315
|
+
|
316
|
+
* (USA): Stronger fuzzy search mechanics, so that it will accept flexible inputs for FIPS/abbr/name
|
317
|
+
|
318
|
+
* (USA): More integrated class types to allow for a more fully-formed object model (USA being a `Country`, with subclasses related to `State` and `Territory` that have their own classes of attributes, etc.)
|
319
|
+
|
320
|
+
* (USA): Stronger typing options, so you don't have to recall which `region` or `division` types are available, etc.
|
321
|
+
|
322
|
+
If that goes well, `v3` can then either create a tool for generating inset maps (which `matplotlib` has *some* support for), or the various functions that I have created in the past that assist with formatting a map "properly", such as centering on a given object.
|
274
323
|
|
275
324
|
I am also open to ideas for other extensions to create!
|
276
325
|
|
@@ -12,12 +12,14 @@
|
|
12
12
|
|
13
13
|
`matplotlib_map_utils` is intended to be a package that provides various functions and objects that assist with the the creation of maps using [`matplotlib`](https://matplotlib.org/stable/).
|
14
14
|
|
15
|
-
As of `v2.x` (the current version), this includes two tools:
|
15
|
+
As of `v2.x` (the current version), this includes two tools and one utility:
|
16
16
|
|
17
17
|
* `north_arrow.py`, which generates a high quality, context-aware north arrow for a given plot.
|
18
18
|
|
19
19
|
* `scale_bar.py`, which generates a high quality, context-aware scale bar to a given plot.
|
20
20
|
|
21
|
+
* `usa.py`, which contains a class that helps filter for states and territories within the USA based on given characteristics.
|
22
|
+
|
21
23
|
Future releases (if the project is continued) might provide a similar tool inset maps, or other functions that I have created myself that give more control in the formatting of maps.
|
22
24
|
|
23
25
|
---
|
@@ -61,6 +63,10 @@ package_name/
|
|
61
63
|
│ ├── __init__.py
|
62
64
|
│ ├── north_arrow.py
|
63
65
|
│ └── scale_bar.py
|
66
|
+
├── utils/
|
67
|
+
│ ├── __init__.py
|
68
|
+
│ ├── usa.py
|
69
|
+
│ └── usa.json
|
64
70
|
```
|
65
71
|
|
66
72
|
Where:
|
@@ -213,6 +219,38 @@ Refer to `docs\howto_scale_bar` for details on how to customize each facet of th
|
|
213
219
|
|
214
220
|
---
|
215
221
|
|
222
|
+
### Utilities
|
223
|
+
|
224
|
+
<details>
|
225
|
+
<summary><i>Expand instructions</i></summary>
|
226
|
+
|
227
|
+
#### Quick Start
|
228
|
+
|
229
|
+
Importing the bundled utility functions and classes can be done like so:
|
230
|
+
|
231
|
+
```py
|
232
|
+
from matplotlib_map_utils.utils import USA
|
233
|
+
```
|
234
|
+
|
235
|
+
As of `v2.1.0`, there is only one utility class available: `USA`, an object to help quickly filter for subsets of US states and territories. This utility class is still in beta, and might change.
|
236
|
+
|
237
|
+
An example:
|
238
|
+
|
239
|
+
```python
|
240
|
+
# Loading the object
|
241
|
+
usa = USA()
|
242
|
+
# Getting a list FIPS codes for US States
|
243
|
+
usa.filter(states=True, to_return="fips")
|
244
|
+
# Getting a list of State Names for states in the South and Midwest regions
|
245
|
+
usa.filter(region=["South","Midtwest"], to_return="name")
|
246
|
+
```
|
247
|
+
|
248
|
+
Refer to `docs\howto_utils` for details on how to use this class, including with `pandas.apply()`.
|
249
|
+
|
250
|
+
</details>
|
251
|
+
|
252
|
+
---
|
253
|
+
|
216
254
|
### Development Notes
|
217
255
|
|
218
256
|
#### Inspiration and Thanks
|
@@ -231,6 +269,8 @@ Two more projects assisted with the creation of this script:
|
|
231
269
|
|
232
270
|
- `v2.0.2`: Changed f-string formatting to alternate double and single quotes, so as to maintain compatibility with versions of Python before 3.12 (see [here](https://github.com/moss-xyz/matplotlib-map-utils/issues/3)). However, this did reveal that another aspect of the code, namely concatenating `type` in function arguments, requires 3.10, and so the minimum python version was incremented.
|
233
271
|
|
272
|
+
- `v2.1.0`: Added a utility class, `USA`, for filtering subsets of US states and territories based on FIPS code, name, abbreviation, region, division, and more. This is considered a beta release, and might be subject to change later on.
|
273
|
+
|
234
274
|
#### Future Roadmap
|
235
275
|
|
236
276
|
With the release of `v2.x`, and the addition of **Scale Bar** tools, this project has achieved the two main objectives that I set out to.
|
@@ -253,7 +293,15 @@ If I continue development of this project, I will be looking to add or fix the f
|
|
253
293
|
|
254
294
|
* Create more styles for the bar, potentiallly including dual boxes and a sawtooth bar
|
255
295
|
|
256
|
-
|
296
|
+
* **Utils:**
|
297
|
+
|
298
|
+
* (USA): Stronger fuzzy search mechanics, so that it will accept flexible inputs for FIPS/abbr/name
|
299
|
+
|
300
|
+
* (USA): More integrated class types to allow for a more fully-formed object model (USA being a `Country`, with subclasses related to `State` and `Territory` that have their own classes of attributes, etc.)
|
301
|
+
|
302
|
+
* (USA): Stronger typing options, so you don't have to recall which `region` or `division` types are available, etc.
|
303
|
+
|
304
|
+
If that goes well, `v3` can then either create a tool for generating inset maps (which `matplotlib` has *some* support for), or the various functions that I have created in the past that assist with formatting a map "properly", such as centering on a given object.
|
257
305
|
|
258
306
|
I am also open to ideas for other extensions to create!
|
259
307
|
|