newsworthycharts 1.65.1__py3-none-any.whl → 1.65.2__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.65.1"
1
+ __version__ = "1.65.2"
2
2
 
3
3
  from .chart import Chart
4
4
  from .choroplethmap import ChoroplethMap
newsworthycharts/chart.py CHANGED
@@ -633,8 +633,10 @@ class Chart(object):
633
633
 
634
634
  # Fit area below chart
635
635
  try:
636
- tick_label_height = max([self._text_rel_height(lbl)
637
- for lbl in self.ax.get_xticklabels()])
636
+ tick_label_height = max(
637
+ [self._text_rel_height(lbl)
638
+ for lbl in self.ax.get_xticklabels()]
639
+ )
638
640
  except ValueError:
639
641
  # handle charts without ticks
640
642
  tick_label_height = 0
@@ -643,7 +645,7 @@ class Chart(object):
643
645
  # ticks labels
644
646
  tick_label_height
645
647
  # some padding
646
- + 30 / self._h
648
+ # + 30 / self._h
647
649
  # chart notes (if any)
648
650
  + self._note_rel_height
649
651
  # chart caption and logo (if any)
@@ -842,7 +844,8 @@ class Chart(object):
842
844
  if self._title_elem:
843
845
  rel_height += self._text_rel_height(self._title_elem)
844
846
  # Adds a fixed margin below
845
- rel_height += 30 / self._h
847
+ rel_height += 0.01
848
+ # rel_height += 30 / self._h
846
849
  return rel_height
847
850
 
848
851
  @property
@@ -6,7 +6,7 @@ backend : Agg
6
6
  figure.dpi : 150
7
7
 
8
8
  # Margins
9
- savefig.pad_inches : 0.2
9
+ savefig.pad_inches : 0.2
10
10
  legend.borderaxespad : 0.7 # the margin between legend box and axes
11
11
 
12
12
  # Axes and ticks
@@ -65,4 +65,3 @@ lines.markersize : 8
65
65
  # Fill between lines
66
66
  #! fill_between_color : F7F4F4
67
67
  #! fill_between_alpha : 0.5
68
-
@@ -1,29 +1,29 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: newsworthycharts
3
- Version: 1.65.1
3
+ Version: 1.65.2
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.65.1.tar.gz
6
+ Download-URL: https://github.com/jplusplus/newsworthycharts/archive/1.65.2.tar.gz
7
7
  Author: Jens Finnäs and Leo Wallentin, J++ Stockholm
8
8
  Author-email: stockholm@jplusplus.org
9
9
  License: MIT
10
10
  Requires-Python: >=3.9
11
11
  Description-Content-Type: text/x-rst
12
12
  License-File: LICENSE.txt
13
- Requires-Dist: boto3>=1.26
14
- Requires-Dist: matplotlib==3.9.2
15
- Requires-Dist: langcodes>=3.3
16
- Requires-Dist: Babel<3,>=2.14.0
17
- Requires-Dist: PyYAML>=3
18
- Requires-Dist: adjustText==0.7.3
19
- Requires-Dist: numpy>2
20
- Requires-Dist: python-dateutil<3,>=2
21
- Requires-Dist: Pillow==11.0.0
22
- Requires-Dist: requests>=2.22
23
- Requires-Dist: matplotlib-label-lines==0.5.1
24
- Requires-Dist: geopandas>=1
25
- Requires-Dist: mapclassify==2.8.1
26
- Requires-Dist: puremagic>=1
13
+ Requires-Dist: boto3 >=1.26
14
+ Requires-Dist: matplotlib ==3.9.2
15
+ Requires-Dist: langcodes >=3.3
16
+ Requires-Dist: Babel <3,>=2.14.0
17
+ Requires-Dist: PyYAML >=3
18
+ Requires-Dist: adjustText ==0.7.3
19
+ Requires-Dist: numpy >2
20
+ Requires-Dist: python-dateutil <3,>=2
21
+ Requires-Dist: Pillow ==11.0.0
22
+ Requires-Dist: requests >=2.22
23
+ Requires-Dist: matplotlib-label-lines ==0.5.1
24
+ Requires-Dist: geopandas >=1
25
+ Requires-Dist: mapclassify ==2.8.1
26
+ Requires-Dist: puremagic >=1
27
27
 
28
28
  This module contains methods for producing graphs and publishing them on Amazon S3, or in the location of your choice.
29
29
 
@@ -259,6 +259,10 @@ Roadmap
259
259
  Changelog
260
260
  ---------
261
261
 
262
+ - 1.65.2
263
+
264
+ - Title margin adjustments
265
+
262
266
  - 1.65.1
263
267
 
264
268
  - Fixed legend bug in ProgressChart
@@ -1,7 +1,7 @@
1
- newsworthycharts/__init__.py,sha256=EGDm4UzvQMtB6QL_R1B1b9K2q75byHoVZtmNgz2imX4,1160
1
+ newsworthycharts/__init__.py,sha256=Ls4rdrPaC7IzvGI5F9AK1YPkSdJwvSZihYFsMKjwCDg,1160
2
2
  newsworthycharts/bubblemap.py,sha256=nkocWmpiFgfjEuJGAsthjY5X7Q56jXWsZHUGXw4PwgE,2587
3
3
  newsworthycharts/categoricalchart.py,sha256=wLrS8H69Sx3FT-0r3w3ZOIC83IHb8HCHD0zTsXiIiNA,15737
4
- newsworthycharts/chart.py,sha256=y-OjOcFYL4YaqgJEdUyqN6sAqk-8a0wOz5vjktRCr6E,34170
4
+ newsworthycharts/chart.py,sha256=pAWvd0_-f6NsOYnBZDNl3w5jmzxZSnD-S0S2EuqAMaU,34219
5
5
  newsworthycharts/choroplethmap.py,sha256=bCLf4kcchp1C2djg5AxcOM8BdbaMj0xg7UHrZsDafhI,8013
6
6
  newsworthycharts/datawrapper.py,sha256=RRkAVTpfP4updKxUIBaSmKuBi2RUVPaBRF8HDQhlGGA,11250
7
7
  newsworthycharts/map.py,sha256=c409jEO4L8Yr780sJRC0RchR44roAlgOUDAkuk1SfRg,6057
@@ -13,8 +13,6 @@ newsworthycharts/storage.py,sha256=myERhlpvXyExXxUByBq9eW1bWkCyfH9SwTZbsWSyy3Q,4
13
13
  newsworthycharts/stripechart.py,sha256=9B6PX2MyLuKNQ8W0OGdKbP0-U32kju0K_NHHwwz_J68,1547
14
14
  newsworthycharts/custom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  newsworthycharts/custom/climate_cars.py,sha256=WyNLgjgRCv_zRrzVuk_BmcigFSzpzudjEAYmdvdBe8I,9407
16
- newsworthycharts/custom/pts.py,sha256=B_7y0rwvUMSlGoGopqlaS9RipjRrQ7cc4NXmQV_U31E,220
17
- newsworthycharts/custom/temperature.py,sha256=8WE5xXTzP1zLc655ltqdE7ypl2pguC6kX9HG_paW4BE,679
18
16
  newsworthycharts/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
17
  newsworthycharts/lib/color_fn.py,sha256=ck65GzTS9oPgHUCnKDwX2z8zlnNyzncw97MmhXwi8z8,1282
20
18
  newsworthycharts/lib/colors.py,sha256=U04TDkvoMQkcldRFXfnwyLOTwq1SWW2se-Ad-DNcw9o,485
@@ -26,14 +24,12 @@ newsworthycharts/lib/mimetypes.py,sha256=bL9HtVWbn2Of39LcBt4u4yelkr4bGZiyebq3OfL
26
24
  newsworthycharts/lib/utils.py,sha256=l4SUVB-8lnm3XHqHNo5KgZuZNv_VaFnrH76hrZmDq1s,7231
27
25
  newsworthycharts/maps/se-4.gpkg,sha256=oWw5j7FPVpI0ig67jNDim8qSn5SG8rcHp0014-uTKZM,290816
28
26
  newsworthycharts/maps/se-7.gpkg,sha256=Vmvqudq_ZtgV0sd6TY6kuk7vzqmYZCJmaxtsJ87q2a8,331776
29
- newsworthycharts/rc/newsworthy,sha256=vbYTav1w3DmB5tpaaV7Xl5q7TQJsc9eou6pLCoWc2vs,1589
30
- newsworthycharts/translations/.~lock.datawrapper_regions.csv#,sha256=lISyvTWrw8LTG01qMC_F5RxDwamXBeq9vJRKKwBYtRg,75
31
- newsworthycharts/translations/.~lock.se_municipalities.csv#,sha256=MEff-0d958fdtjBWyt0UnzZWf8OBFx-6PFKeGqGR8NM,80
27
+ newsworthycharts/rc/newsworthy,sha256=yOIZvYS6PG1u19VMcdtfj9vbihKQsey5IprwqK59KgE,1589
32
28
  newsworthycharts/translations/datawrapper_regions.csv,sha256=fzZcQRX6RFMlNNP8mpgfYNdR3Y0QAlQxDXk8FXTaWWI,9214
33
29
  newsworthycharts/translations/regions.py,sha256=Nv1McQjggD4S3JRu82rDMTG3pqUVR13E5-FBpSYbm98,239
34
30
  newsworthycharts/translations/se_municipalities.csv,sha256=br_mm-IvzQtj_W55_ATREhJ97jWnCweBFlDAVY2EBxA,7098
35
- newsworthycharts-1.65.1.dist-info/LICENSE.txt,sha256=Sq6kGICrehbhC_FolNdXf0djKjTpv3YqjFCIYsxdQN4,1069
36
- newsworthycharts-1.65.1.dist-info/METADATA,sha256=tGThxBsEGRsa_-sZGyAbldfJZQEdW9h-JxqN5kpGJSs,30708
37
- newsworthycharts-1.65.1.dist-info/WHEEL,sha256=bFJAMchF8aTQGUgMZzHJyDDMPTO3ToJ7x23SLJa1SVo,92
38
- newsworthycharts-1.65.1.dist-info/top_level.txt,sha256=dn_kzIj8UgUCMsh1PHdVEQJHVGSsN7Z8YJF-8xXa8n0,17
39
- newsworthycharts-1.65.1.dist-info/RECORD,,
31
+ newsworthycharts-1.65.2.dist-info/LICENSE.txt,sha256=Sq6kGICrehbhC_FolNdXf0djKjTpv3YqjFCIYsxdQN4,1069
32
+ newsworthycharts-1.65.2.dist-info/METADATA,sha256=CUcPOQZOIhoB0qcm0_-LhhPmGeIaLfdwT31PNxwvErw,30762
33
+ newsworthycharts-1.65.2.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
34
+ newsworthycharts-1.65.2.dist-info/top_level.txt,sha256=dn_kzIj8UgUCMsh1PHdVEQJHVGSsN7Z8YJF-8xXa8n0,17
35
+ newsworthycharts-1.65.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.45.0)
2
+ Generator: setuptools (74.1.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,8 +0,0 @@
1
- """Custom charts for bredbandsutredningen.
2
- """
3
-
4
- from newsworthycharts import CategoricalChart
5
-
6
- class BroadbandTargetChart(CategoricalChart):
7
- def _add_data(self):
8
- super(BroadbandTargetChart, self)._add_data()
@@ -1,20 +0,0 @@
1
- from newsworthycharts import SerialChart
2
- import numpy as np
3
-
4
- class TemperatueChart(SerialChart):
5
- def _add_data(self):
6
- self.color_fn = "positive_negative"
7
- if len(self.data) != 1:
8
- raise ValueError("TemperatueChart takes one and only one data series.")
9
-
10
- dates = [x[0] for x in self.data[0]]
11
- values = [x[1] for x in self.data[0]]
12
- s = np.array(values, dtype=np.float)
13
- mean = np.nanmean(s)
14
- vs_mean = s - mean
15
- self.data[0] = list(zip(dates, vs_mean.tolist()))
16
- self._ymin = np.nanmin(vs_mean)
17
- self.data.max_val = np.nanmax(vs_mean)
18
-
19
-
20
- super(TemperatueChart, self)._add_data()
@@ -1 +0,0 @@
1
- ,jens,jens-XPS-13,10.02.2020 11:26,file:///home/jens/.config/libreoffice/4;
@@ -1 +0,0 @@
1
- ,jens,jens-XPS-13-9310,20.03.2023 13:52,file:///home/jens/.config/libreoffice/4;