newsworthycharts 1.76.1__tar.gz → 1.76.2__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.
- {newsworthycharts-1.76.1/newsworthycharts.egg-info → newsworthycharts-1.76.2}/PKG-INFO +32 -3
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/README.rst +5 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/__init__.py +1 -1
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/chart.py +20 -2
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2/newsworthycharts.egg-info}/PKG-INFO +32 -3
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts.egg-info/requires.txt +7 -7
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/setup.py +1 -1
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/LICENSE.txt +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/MANIFEST.in +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/bubblemap.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/categoricalchart.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/choroplethmap.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/custom/__init__.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/custom/climate_cars.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/datawrapper.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/lib/__init__.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/lib/color_fn.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/lib/colors.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/lib/datalist.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/lib/formatter.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/lib/geography.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/lib/locator.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/lib/mimetypes.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/lib/utils.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/map.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/maps/se-4.gpkg +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/maps/se-7.gpkg +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/rangeplot.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/rankchart.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/rc/newsworthy +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/scatterplot.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/seasonalchart.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/serialchart.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/storage.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/stripechart.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/translations/datawrapper_regions.csv +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/translations/regions.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/translations/se_municipalities.csv +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts.egg-info/SOURCES.txt +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts.egg-info/dependency_links.txt +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts.egg-info/not-zip-safe +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts.egg-info/top_level.txt +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/setup.cfg +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/test/test_categorical_chart.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/test/test_choropleth_maps.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/test/test_custom_climate_cars.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/test/test_data_list.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/test/test_datawrapper.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/test/test_main.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/test/test_rangeplot.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/test/test_scatterplot.py +0 -0
- {newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/test/test_serial_chart.py +0 -0
@@ -1,15 +1,39 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: newsworthycharts
|
3
|
-
Version: 1.76.
|
3
|
+
Version: 1.76.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.76.
|
6
|
+
Download-URL: https://github.com/jplusplus/newsworthycharts/archive/1.76.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.10
|
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.10.6
|
15
|
+
Requires-Dist: langcodes>=3.3
|
16
|
+
Requires-Dist: Babel<3,>=2.14.0
|
17
|
+
Requires-Dist: PyYAML>=3
|
18
|
+
Requires-Dist: adjustText==1.3.0
|
19
|
+
Requires-Dist: numpy>2
|
20
|
+
Requires-Dist: python-dateutil<3,>=2
|
21
|
+
Requires-Dist: Pillow==11.3.0
|
22
|
+
Requires-Dist: requests>=2.22
|
23
|
+
Requires-Dist: matplotlib-label-lines==0.5.1
|
24
|
+
Requires-Dist: geopandas==1.1.1
|
25
|
+
Requires-Dist: mapclassify==2.10.0
|
26
|
+
Dynamic: author
|
27
|
+
Dynamic: author-email
|
28
|
+
Dynamic: description
|
29
|
+
Dynamic: description-content-type
|
30
|
+
Dynamic: download-url
|
31
|
+
Dynamic: home-page
|
32
|
+
Dynamic: license
|
33
|
+
Dynamic: license-file
|
34
|
+
Dynamic: requires-dist
|
35
|
+
Dynamic: requires-python
|
36
|
+
Dynamic: summary
|
13
37
|
|
14
38
|
This module contains methods for producing graphs and publishing them on Amazon S3, or in the location of your choice.
|
15
39
|
|
@@ -263,6 +287,11 @@ Roadmap
|
|
263
287
|
Changelog
|
264
288
|
---------
|
265
289
|
|
290
|
+
- 1.76.2
|
291
|
+
|
292
|
+
- Use custom locator for crowded weekly data
|
293
|
+
- matplotlib==3.10.6
|
294
|
+
|
266
295
|
- 1.76.1
|
267
296
|
|
268
297
|
- Fixed a bug where x axis labels would sometimes get mixed up in long weekly data series
|
@@ -250,6 +250,11 @@ Roadmap
|
|
250
250
|
Changelog
|
251
251
|
---------
|
252
252
|
|
253
|
+
- 1.76.2
|
254
|
+
|
255
|
+
- Use custom locator for crowded weekly data
|
256
|
+
- matplotlib==3.10.6
|
257
|
+
|
253
258
|
- 1.76.1
|
254
259
|
|
255
260
|
- Fixed a bug where x axis labels would sometimes get mixed up in long weekly data series
|
@@ -18,7 +18,7 @@ from matplotlib.font_manager import FontProperties
|
|
18
18
|
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
|
19
19
|
from matplotlib.figure import Figure
|
20
20
|
from matplotlib.ticker import FuncFormatter
|
21
|
-
from matplotlib.dates import DateFormatter, num2date, YearLocator
|
21
|
+
from matplotlib.dates import DateFormatter, num2date, date2num, YearLocator
|
22
22
|
|
23
23
|
from langcodes import standardize_tag
|
24
24
|
from PIL import Image
|
@@ -420,11 +420,29 @@ class Chart(object):
|
|
420
420
|
|
421
421
|
else:
|
422
422
|
loc = get_best_locator(delta, len(dates), self.interval, max_ticks=self.max_ticks)
|
423
|
+
print(loc)
|
423
424
|
self.ax.xaxis.set_major_locator(loc)
|
424
425
|
formatter = Formatter(self._language)
|
425
426
|
|
427
|
+
if self.interval == "weekly" and delta.days > 90:
|
428
|
+
# custom locator _and_ ticks: Put month label on start of each new month
|
429
|
+
# only the first occurance of each month
|
430
|
+
_loc_ticks = [
|
431
|
+
date2num(to_date(x)) for (i, x) in enumerate(self.data.x_points)
|
432
|
+
if i == 0 or x[5:7] != self.data.x_points[i - 1][5:7]
|
433
|
+
]
|
434
|
+
import matplotlib.ticker as ticker
|
435
|
+
loc = ticker.FixedLocator(_loc_ticks)
|
436
|
+
self.ax.xaxis.set_major_locator(loc)
|
437
|
+
|
438
|
+
def fmt(x, pos):
|
439
|
+
d = num2date(x).isoformat()[:10]
|
440
|
+
if pos and self.data.x_points[pos - 1][0:4] != self.data.x_points[pos][0:4]:
|
441
|
+
return formatter.date(d, "MMM y")
|
442
|
+
else:
|
443
|
+
return formatter.date(d, "MMM")
|
426
444
|
# if isinstance(loc, WeekdayLocator):
|
427
|
-
|
445
|
+
elif self.interval == "weekly":
|
428
446
|
# We consider dates to be more informative than week numbers
|
429
447
|
def fmt(x, pos):
|
430
448
|
d = num2date(x).isoformat()[:10]
|
@@ -1,15 +1,39 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: newsworthycharts
|
3
|
-
Version: 1.76.
|
3
|
+
Version: 1.76.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.76.
|
6
|
+
Download-URL: https://github.com/jplusplus/newsworthycharts/archive/1.76.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.10
|
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.10.6
|
15
|
+
Requires-Dist: langcodes>=3.3
|
16
|
+
Requires-Dist: Babel<3,>=2.14.0
|
17
|
+
Requires-Dist: PyYAML>=3
|
18
|
+
Requires-Dist: adjustText==1.3.0
|
19
|
+
Requires-Dist: numpy>2
|
20
|
+
Requires-Dist: python-dateutil<3,>=2
|
21
|
+
Requires-Dist: Pillow==11.3.0
|
22
|
+
Requires-Dist: requests>=2.22
|
23
|
+
Requires-Dist: matplotlib-label-lines==0.5.1
|
24
|
+
Requires-Dist: geopandas==1.1.1
|
25
|
+
Requires-Dist: mapclassify==2.10.0
|
26
|
+
Dynamic: author
|
27
|
+
Dynamic: author-email
|
28
|
+
Dynamic: description
|
29
|
+
Dynamic: description-content-type
|
30
|
+
Dynamic: download-url
|
31
|
+
Dynamic: home-page
|
32
|
+
Dynamic: license
|
33
|
+
Dynamic: license-file
|
34
|
+
Dynamic: requires-dist
|
35
|
+
Dynamic: requires-python
|
36
|
+
Dynamic: summary
|
13
37
|
|
14
38
|
This module contains methods for producing graphs and publishing them on Amazon S3, or in the location of your choice.
|
15
39
|
|
@@ -263,6 +287,11 @@ Roadmap
|
|
263
287
|
Changelog
|
264
288
|
---------
|
265
289
|
|
290
|
+
- 1.76.2
|
291
|
+
|
292
|
+
- Use custom locator for crowded weekly data
|
293
|
+
- matplotlib==3.10.6
|
294
|
+
|
266
295
|
- 1.76.1
|
267
296
|
|
268
297
|
- Fixed a bug where x axis labels would sometimes get mixed up in long weekly data series
|
@@ -1,13 +1,13 @@
|
|
1
|
+
boto3>=1.26
|
2
|
+
matplotlib==3.10.6
|
3
|
+
langcodes>=3.3
|
1
4
|
Babel<3,>=2.14.0
|
2
|
-
Pillow==11.3.0
|
3
5
|
PyYAML>=3
|
4
6
|
adjustText==1.3.0
|
5
|
-
boto3>=1.26
|
6
|
-
geopandas==1.1.1
|
7
|
-
langcodes>=3.3
|
8
|
-
mapclassify==2.10.0
|
9
|
-
matplotlib-label-lines==0.5.1
|
10
|
-
matplotlib==3.10.3
|
11
7
|
numpy>2
|
12
8
|
python-dateutil<3,>=2
|
9
|
+
Pillow==11.3.0
|
13
10
|
requests>=2.22
|
11
|
+
matplotlib-label-lines==0.5.1
|
12
|
+
geopandas==1.1.1
|
13
|
+
mapclassify==2.10.0
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts/translations/regions.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{newsworthycharts-1.76.1 → newsworthycharts-1.76.2}/newsworthycharts.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|