newsworthycharts 1.68.0__py3-none-any.whl → 1.68.1__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.
@@ -1,4 +1,4 @@
1
- __version__ = "1.68.0"
1
+ __version__ = "1.68.1"
2
2
 
3
3
  from .chart import Chart
4
4
  from .choroplethmap import ChoroplethMap
newsworthycharts/chart.py CHANGED
@@ -504,6 +504,9 @@ class Chart(object):
504
504
  except AttributeError:
505
505
  # values is undefined for catCharts
506
506
  pass
507
+ except ValueError:
508
+ # non-numerical data
509
+ pass
507
510
  if all_integers:
508
511
  self.decimals = 0
509
512
  else:
@@ -176,9 +176,12 @@ class DataSet(MutableSequence):
176
176
  self.extend(list(args))
177
177
 
178
178
  def check(self, v):
179
- # Update metadata with newly added data
180
- values = [to_float(x[1]) for x in v]
181
- values = [x for x in values if x is not None]
179
+ # Update metadata with newly added data, if numerical
180
+ try:
181
+ values = [to_float(x[1]) for x in v]
182
+ values = [x for x in values if x is not None]
183
+ except ValueError:
184
+ values = None
182
185
  if values:
183
186
  self.min_val = min(self.min_val, min(values))
184
187
  self.max_val = max(self.max_val, max(values))
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: newsworthycharts
3
- Version: 1.68.0
3
+ Version: 1.68.1
4
4
  Summary: Matplotlib wrapper to create charts and publish them on Amazon S3
5
5
  Home-page: https://github.com/jplusplus/newsworthycharts
6
- Download-URL: https://github.com/jplusplus/newsworthycharts/archive/1.68.0.tar.gz
6
+ Download-URL: https://github.com/jplusplus/newsworthycharts/archive/1.68.1.tar.gz
7
7
  Author: Jens Finnäs and Leo Wallentin, J++ Stockholm
8
8
  Author-email: stockholm@jplusplus.org
9
9
  License: MIT
@@ -11,7 +11,7 @@ Requires-Python: >=3.9
11
11
  Description-Content-Type: text/x-rst
12
12
  License-File: LICENSE.txt
13
13
  Requires-Dist: boto3 >=1.26
14
- Requires-Dist: matplotlib ==3.9.2
14
+ Requires-Dist: matplotlib ==3.9.3
15
15
  Requires-Dist: langcodes >=3.3
16
16
  Requires-Dist: Babel <3,>=2.14.0
17
17
  Requires-Dist: PyYAML >=3
@@ -259,6 +259,11 @@ Roadmap
259
259
  Changelog
260
260
  ---------
261
261
 
262
+ - 1.68.1
263
+
264
+ - Fixed crash in `ChoroplethMap` with non-numerical values
265
+ - Fix Matplotlib version in setup.py
266
+
262
267
  - 1.68.0
263
268
 
264
269
  - Matplotlib==3.9.3
@@ -1,7 +1,7 @@
1
- newsworthycharts/__init__.py,sha256=mYKh_tjxmrmUeF0-2aNRB9IBWJ5VCLOtrAzxZTdITCg,1160
1
+ newsworthycharts/__init__.py,sha256=F3SsT4qDwn9ebj33Gty_CWJGsedd0eN8EtF3MDZmRvM,1160
2
2
  newsworthycharts/bubblemap.py,sha256=nkocWmpiFgfjEuJGAsthjY5X7Q56jXWsZHUGXw4PwgE,2587
3
3
  newsworthycharts/categoricalchart.py,sha256=YL3pzq8a7U5F0MpeRIAEwCAHw1BRDyKjoaAhf-UyRDo,18179
4
- newsworthycharts/chart.py,sha256=JFJVAU7qF_C0zlTfhZkAbtev1wdm05KIvr0LkMm5zmI,34388
4
+ newsworthycharts/chart.py,sha256=jurOkIrm8TRpuL-Fj0AdBJXmjrdkZ-U2w_TaOysQvAs,34489
5
5
  newsworthycharts/choroplethmap.py,sha256=bCLf4kcchp1C2djg5AxcOM8BdbaMj0xg7UHrZsDafhI,8013
6
6
  newsworthycharts/datawrapper.py,sha256=RRkAVTpfP4updKxUIBaSmKuBi2RUVPaBRF8HDQhlGGA,11250
7
7
  newsworthycharts/map.py,sha256=c409jEO4L8Yr780sJRC0RchR44roAlgOUDAkuk1SfRg,6057
@@ -16,7 +16,7 @@ newsworthycharts/custom/climate_cars.py,sha256=WyNLgjgRCv_zRrzVuk_BmcigFSzpzudjE
16
16
  newsworthycharts/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  newsworthycharts/lib/color_fn.py,sha256=ck65GzTS9oPgHUCnKDwX2z8zlnNyzncw97MmhXwi8z8,1282
18
18
  newsworthycharts/lib/colors.py,sha256=U04TDkvoMQkcldRFXfnwyLOTwq1SWW2se-Ad-DNcw9o,485
19
- newsworthycharts/lib/datalist.py,sha256=ZyGHnHbn57npITgr2HmtfrS-Xv8U1muCMDOcOwQnlM8,6345
19
+ newsworthycharts/lib/datalist.py,sha256=-LdGFE0SOvjLnIRZ6eoJoijDaG3SeUPNIDPBjbm5A2U,6433
20
20
  newsworthycharts/lib/formatter.py,sha256=GNH43hE0bC17OgiV8LYH3YUrEhm7OJh9XzfSV4HVtHo,4838
21
21
  newsworthycharts/lib/geography.py,sha256=K0_teFmuPJwXX7Py-amJB_1YY5_gL2kBYhz1LrRCyTg,584
22
22
  newsworthycharts/lib/locator.py,sha256=rJHdgiA0LASRzdLINhTeU5zOoq1TCMgge4KOBWSagnM,3041
@@ -28,8 +28,8 @@ newsworthycharts/rc/newsworthy,sha256=yOIZvYS6PG1u19VMcdtfj9vbihKQsey5IprwqK59Kg
28
28
  newsworthycharts/translations/datawrapper_regions.csv,sha256=fzZcQRX6RFMlNNP8mpgfYNdR3Y0QAlQxDXk8FXTaWWI,9214
29
29
  newsworthycharts/translations/regions.py,sha256=Nv1McQjggD4S3JRu82rDMTG3pqUVR13E5-FBpSYbm98,239
30
30
  newsworthycharts/translations/se_municipalities.csv,sha256=br_mm-IvzQtj_W55_ATREhJ97jWnCweBFlDAVY2EBxA,7098
31
- newsworthycharts-1.68.0.dist-info/LICENSE.txt,sha256=Sq6kGICrehbhC_FolNdXf0djKjTpv3YqjFCIYsxdQN4,1069
32
- newsworthycharts-1.68.0.dist-info/METADATA,sha256=WhMJRk_z8Ydhb6N4UvYvzaSwchigCwWRU0nRZdblJ_8,31376
33
- newsworthycharts-1.68.0.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
34
- newsworthycharts-1.68.0.dist-info/top_level.txt,sha256=dn_kzIj8UgUCMsh1PHdVEQJHVGSsN7Z8YJF-8xXa8n0,17
35
- newsworthycharts-1.68.0.dist-info/RECORD,,
31
+ newsworthycharts-1.68.1.dist-info/LICENSE.txt,sha256=Sq6kGICrehbhC_FolNdXf0djKjTpv3YqjFCIYsxdQN4,1069
32
+ newsworthycharts-1.68.1.dist-info/METADATA,sha256=-IKPmEFJ4voMBH5obNcNZz_tcu3XShDR4e4SNuzjBzY,31487
33
+ newsworthycharts-1.68.1.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
34
+ newsworthycharts-1.68.1.dist-info/top_level.txt,sha256=dn_kzIj8UgUCMsh1PHdVEQJHVGSsN7Z8YJF-8xXa8n0,17
35
+ newsworthycharts-1.68.1.dist-info/RECORD,,