newsworthycharts 1.76.0__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.0/newsworthycharts.egg-info → newsworthycharts-1.76.2}/PKG-INFO +12 -3
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/README.rst +9 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/__init__.py +1 -1
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/chart.py +22 -3
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2/newsworthycharts.egg-info}/PKG-INFO +12 -3
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts.egg-info/requires.txt +1 -1
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/setup.py +1 -1
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/LICENSE.txt +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/MANIFEST.in +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/bubblemap.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/categoricalchart.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/choroplethmap.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/custom/__init__.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/custom/climate_cars.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/datawrapper.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/lib/__init__.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/lib/color_fn.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/lib/colors.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/lib/datalist.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/lib/formatter.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/lib/geography.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/lib/locator.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/lib/mimetypes.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/lib/utils.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/map.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/maps/se-4.gpkg +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/maps/se-7.gpkg +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/rangeplot.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/rankchart.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/rc/newsworthy +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/scatterplot.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/seasonalchart.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/serialchart.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/storage.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/stripechart.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/translations/datawrapper_regions.csv +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/translations/regions.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts/translations/se_municipalities.csv +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts.egg-info/SOURCES.txt +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts.egg-info/dependency_links.txt +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts.egg-info/not-zip-safe +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/newsworthycharts.egg-info/top_level.txt +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/setup.cfg +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/test/test_categorical_chart.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/test/test_choropleth_maps.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/test/test_custom_climate_cars.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/test/test_data_list.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/test/test_datawrapper.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/test/test_main.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/test/test_rangeplot.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/test/test_scatterplot.py +0 -0
- {newsworthycharts-1.76.0 → newsworthycharts-1.76.2}/test/test_serial_chart.py +0 -0
@@ -1,9 +1,9 @@
|
|
1
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
|
@@ -11,7 +11,7 @@ Requires-Python: >=3.10
|
|
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.10.
|
14
|
+
Requires-Dist: matplotlib==3.10.6
|
15
15
|
Requires-Dist: langcodes>=3.3
|
16
16
|
Requires-Dist: Babel<3,>=2.14.0
|
17
17
|
Requires-Dist: PyYAML>=3
|
@@ -287,6 +287,15 @@ Roadmap
|
|
287
287
|
Changelog
|
288
288
|
---------
|
289
289
|
|
290
|
+
- 1.76.2
|
291
|
+
|
292
|
+
- Use custom locator for crowded weekly data
|
293
|
+
- matplotlib==3.10.6
|
294
|
+
|
295
|
+
- 1.76.1
|
296
|
+
|
297
|
+
- Fixed a bug where x axis labels would sometimes get mixed up in long weekly data series
|
298
|
+
|
290
299
|
- 1.76.0
|
291
300
|
|
292
301
|
- Pillow==11.3.0
|
@@ -250,6 +250,15 @@ 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
|
+
|
258
|
+
- 1.76.1
|
259
|
+
|
260
|
+
- Fixed a bug where x axis labels would sometimes get mixed up in long weekly data series
|
261
|
+
|
253
262
|
- 1.76.0
|
254
263
|
|
255
264
|
- Pillow==11.3.0
|
@@ -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,17 +420,36 @@ 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):
|
448
|
+
d = num2date(x).isoformat()[:10]
|
430
449
|
if pos > len(self.data.x_points):
|
431
450
|
return None
|
432
451
|
try:
|
433
|
-
return formatter.date(
|
452
|
+
return formatter.date(d, "d MMM")
|
434
453
|
except IndexError:
|
435
454
|
return None
|
436
455
|
# fmt = DateFormatter('%-d %b')
|
@@ -1,9 +1,9 @@
|
|
1
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
|
@@ -11,7 +11,7 @@ Requires-Python: >=3.10
|
|
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.10.
|
14
|
+
Requires-Dist: matplotlib==3.10.6
|
15
15
|
Requires-Dist: langcodes>=3.3
|
16
16
|
Requires-Dist: Babel<3,>=2.14.0
|
17
17
|
Requires-Dist: PyYAML>=3
|
@@ -287,6 +287,15 @@ Roadmap
|
|
287
287
|
Changelog
|
288
288
|
---------
|
289
289
|
|
290
|
+
- 1.76.2
|
291
|
+
|
292
|
+
- Use custom locator for crowded weekly data
|
293
|
+
- matplotlib==3.10.6
|
294
|
+
|
295
|
+
- 1.76.1
|
296
|
+
|
297
|
+
- Fixed a bug where x axis labels would sometimes get mixed up in long weekly data series
|
298
|
+
|
290
299
|
- 1.76.0
|
291
300
|
|
292
301
|
- Pillow==11.3.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.0 → newsworthycharts-1.76.2}/newsworthycharts/translations/regions.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{newsworthycharts-1.76.0 → 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
|