gov-uk-dashboards 26.25.0__tar.gz → 26.27.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.
- {gov_uk_dashboards-26.25.0/gov_uk_dashboards.egg-info → gov_uk_dashboards-26.27.0}/PKG-INFO +2 -2
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/colours.py +21 -2
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/context_card.py +4 -4
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/plotly/time_series_chart.py +89 -11
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0/gov_uk_dashboards.egg-info}/PKG-INFO +2 -2
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/setup.py +2 -2
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/LICENSE +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/MANIFEST.in +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/README.md +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/attach-event-to-dash.js +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/custom_map_style_functions.js +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/dashboard.css +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/download-map.js +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/fonts/bold-affa96571d-v2.woff +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/fonts/light-f591b13f7d-v2.woff +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/get_assets_folder.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/govuk-frontend-3.14.0.min.js +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/CHASE_icon.svg +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/DLUHC_WHITE_Master_AW_sm.png +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/MHCLG-favicon.png +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/MHCLG_favicon.png +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/dcms_coatofarms.png +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/dluhc_favicon.ico +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/explore_data_logo.svg +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/gov_favicon.ico +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/govuk-crest.svg +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/hm-government-logo.png +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/mhclg_coat_of_arms.png +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/mhclg_white_no_background.png +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/oflog/MedianAbsolute.png +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/oflog/how_to_1_selecting_data.png +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/oflog/how_to_2_viewing_tabs.png +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/oflog/how_to_3_viewing_charts.png +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/oflog/how_to_4_viewing_trends.png +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/images/oflog/how_to_5_viewing_tables.png +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/index.html +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/mobile-nav.js +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/register_maps +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/scripts.js +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/topojson/usa_110m.json +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/topojson/world_110m.json +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/apply_and_reset_filters_buttons.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/banners.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/card.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/card_full_width.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/collapsible_panel.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/comparison_la_filter_button.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/context_banner.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/dashboard_container.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/data_quality_banner.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/details.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/download_button.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/filter_panel.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/footer.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/graph.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/green_button.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/header.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/heading.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/home_page_link_button.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/html_list.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/key_value_pair.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/main_content.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/navbar.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/no_data_message.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/notification_banner.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/paragraph.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/phase_banner.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/row_component.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/side_navbar.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/table.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/tooltip.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/tooltip_title.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/visualisation_commentary.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/visualisation_title.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/warning_text.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/helpers/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/helpers/display_chart_or_table_with_header.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/helpers/generate_dash_graph_from_figure.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/helpers/get_chart_for_download.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/helpers/plotting_helper_functions.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/helpers/update_layout_bgcolor_margin.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/leaflet/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/leaflet/leaflet_choropleth_map.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/plotly/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/plotly/captioned_figure.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/plotly/choropleth_map.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/plotly/enums.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/plotly/stacked_barchart.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/constants.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/figures/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/figures/enums/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/figures/enums/dash_patterns.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/figures/line_chart.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/figures/styles/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/figures/styles/line_style.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/formatting/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/formatting/human_readable.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/formatting/number_formatting.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/formatting/round_and_add_prefix_and_suffix.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/formatting/rounding.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/formatting/text_functions.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/dap/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/dap/dap_deployment.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/dap/get_dataframe_from_cds.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/datetime_functions/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/datetime_functions/datetime_functions.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/download_functions/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/download_functions/convert_fig_to_image_and_download.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/download_functions/download_csv_with_headers.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/enable_basic_auth.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/http_headers.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/logging.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/testing_functions/__init__.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/testing_functions/barchart_data_test_assertions.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/testing_functions/data_test_assertions.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/testing_functions/data_test_helper_functions.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/testing_functions/timeseries_data_test_assertions.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/warning_text_sensitive.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/log_kpi.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/symbols.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/template.html +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/template.py +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards.egg-info/SOURCES.txt +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards.egg-info/dependency_links.txt +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards.egg-info/requires.txt +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards.egg-info/top_level.txt +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/pyproject.toml +0 -0
- {gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/setup.cfg +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gov_uk_dashboards
|
|
3
|
-
Version: 26.
|
|
3
|
+
Version: 26.27.0
|
|
4
4
|
Summary: Provides access to functionality common to creating a data dashboard.
|
|
5
|
-
Author:
|
|
5
|
+
Author: Ministry of Housing, Communities & Local Government
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
7
|
License-File: LICENSE
|
|
8
8
|
Requires-Dist: setuptools<81.0,>=59.8
|
|
@@ -95,8 +95,27 @@ class AFAccessibleColours(Enum):
|
|
|
95
95
|
ORANGE = "#F46A25"
|
|
96
96
|
DARK_GREY = "#3D3D3D"
|
|
97
97
|
LIGHT_PURPLE = "#A285D1"
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
MUSTARD = "#9C7A00"
|
|
99
|
+
CRIMSON = "#C62828"
|
|
100
|
+
OLIVE = "#7A9A01"
|
|
101
|
+
MAGENTA = "#D81B60"
|
|
102
|
+
BROWN = "#8C5A2B"
|
|
103
|
+
TEAL_BLUE = "#1F77B4"
|
|
104
|
+
|
|
105
|
+
CATEGORICAL = [
|
|
106
|
+
DARK_BLUE,
|
|
107
|
+
TURQUOISE,
|
|
108
|
+
DARK_PINK,
|
|
109
|
+
ORANGE,
|
|
110
|
+
DARK_GREY,
|
|
111
|
+
LIGHT_PURPLE,
|
|
112
|
+
MUSTARD,
|
|
113
|
+
CRIMSON,
|
|
114
|
+
OLIVE,
|
|
115
|
+
MAGENTA,
|
|
116
|
+
BROWN,
|
|
117
|
+
TEAL_BLUE,
|
|
118
|
+
]
|
|
100
119
|
|
|
101
120
|
# three shades of blue from dark to light to use for sequential data
|
|
102
121
|
BLUE_SEQUENTIAL = ["#12436D", "#2073BC", "#6BACE6"]
|
|
@@ -624,8 +624,8 @@ class ContextCard:
|
|
|
624
624
|
When True, comparison tags show the difference between the current VALUE and
|
|
625
625
|
the comparison VALUE converted to weeks/days via `convert_days_to_weeks_and_days`.
|
|
626
626
|
Tag prefix becomes:
|
|
627
|
-
- "
|
|
628
|
-
- "
|
|
627
|
+
- "longer than ..." if percent-change is positive,
|
|
628
|
+
- "shorter than ..." if percent-change is negative,
|
|
629
629
|
- "unchanged from ..." if zero.
|
|
630
630
|
Requires both current and comparison values to be present.
|
|
631
631
|
NOTE: This cannot be True at the same time as `use_previous_value_rather_than_change`.
|
|
@@ -877,9 +877,9 @@ class ContextCard:
|
|
|
877
877
|
)
|
|
878
878
|
|
|
879
879
|
if percentage_change > 0:
|
|
880
|
-
comparison_period_text_prefix = "
|
|
880
|
+
comparison_period_text_prefix = "longer than "
|
|
881
881
|
elif percentage_change < 0:
|
|
882
|
-
comparison_period_text_prefix = "
|
|
882
|
+
comparison_period_text_prefix = "shorter than "
|
|
883
883
|
else:
|
|
884
884
|
comparison_period_text_prefix = "unchanged from "
|
|
885
885
|
|
|
@@ -64,6 +64,7 @@ class TimeSeriesChart:
|
|
|
64
64
|
filtered_df: pl.DataFrame,
|
|
65
65
|
trace_name_list: list[str],
|
|
66
66
|
dashed_trace_name_list: list[str] = None,
|
|
67
|
+
trace_colour_groups: list[str, str] = None,
|
|
67
68
|
initially_hidden_traces: Optional[list[str]] = None,
|
|
68
69
|
hover_data_for_traces_with_different_hover_for_last_point: Optional[
|
|
69
70
|
HoverDataByTrace
|
|
@@ -99,6 +100,7 @@ class TimeSeriesChart:
|
|
|
99
100
|
self.filtered_df = filtered_df
|
|
100
101
|
self.trace_name_list = trace_name_list
|
|
101
102
|
self.dashed_trace_name_list = dashed_trace_name_list
|
|
103
|
+
self.trace_colour_groups = trace_colour_groups
|
|
102
104
|
self.initially_hidden_traces = initially_hidden_traces
|
|
103
105
|
self.legend_dict = legend_dict
|
|
104
106
|
self.trace_name_column = trace_name_column
|
|
@@ -125,6 +127,12 @@ class TimeSeriesChart:
|
|
|
125
127
|
"triangle-up",
|
|
126
128
|
"x",
|
|
127
129
|
"triangle-down",
|
|
130
|
+
"cross",
|
|
131
|
+
"star",
|
|
132
|
+
"pentagon",
|
|
133
|
+
"hexagon",
|
|
134
|
+
"triangle-left",
|
|
135
|
+
"triangle-right",
|
|
128
136
|
]
|
|
129
137
|
self.number_of_traces_colour_shift_dict = number_of_traces_colour_shift_dict
|
|
130
138
|
self.additional_line = additional_line
|
|
@@ -677,27 +685,97 @@ class TimeSeriesChart:
|
|
|
677
685
|
return df_list
|
|
678
686
|
|
|
679
687
|
def _get_colour_list(self):
|
|
680
|
-
"""Returns a list of colours.
|
|
688
|
+
"""Returns a list of colours (one per trace in trace_name_list).
|
|
689
|
+
|
|
690
|
+
If `trace_colour_groups` is provided, traces in the same group share a colour.
|
|
691
|
+
Traces not in any group get their own colour from the palette.
|
|
692
|
+
"""
|
|
693
|
+
palette = self._get_base_palette()
|
|
694
|
+
palette = self._apply_colour_shift(palette)
|
|
695
|
+
|
|
696
|
+
groups = getattr(self, "trace_colour_groups", None) or []
|
|
697
|
+
if not groups:
|
|
698
|
+
return palette[: len(self.trace_name_list)]
|
|
699
|
+
|
|
700
|
+
trace_to_group_id = self._build_trace_to_group_id(groups)
|
|
701
|
+
return self._assign_colours_with_groups(palette, trace_to_group_id)
|
|
702
|
+
|
|
703
|
+
def _get_base_palette(self) -> list[str]:
|
|
681
704
|
number_of_traces = len(self.trace_name_list)
|
|
682
705
|
if number_of_traces == 2 and self.filled_traces_dict is None:
|
|
683
|
-
|
|
706
|
+
return [
|
|
684
707
|
AFAccessibleColours.DARK_BLUE.value,
|
|
685
708
|
AFAccessibleColours.ORANGE.value,
|
|
686
|
-
]
|
|
687
|
-
|
|
688
|
-
|
|
709
|
+
]
|
|
710
|
+
return AFAccessibleColours.CATEGORICAL.value.copy()
|
|
711
|
+
|
|
712
|
+
def _apply_colour_shift(self, palette: list[str]) -> list[str]:
|
|
713
|
+
"""Apply number_of_traces_colour_shift_dict; may replace palette with explicit list."""
|
|
714
|
+
number_of_traces = len(self.trace_name_list)
|
|
689
715
|
colour_shift_dict = (
|
|
690
716
|
{"default": 0}
|
|
691
717
|
if self.number_of_traces_colour_shift_dict is None
|
|
692
718
|
else self.number_of_traces_colour_shift_dict
|
|
693
719
|
)
|
|
694
|
-
|
|
695
720
|
colour_shift_value = colour_shift_dict.get(
|
|
696
721
|
number_of_traces, colour_shift_dict["default"]
|
|
697
722
|
)
|
|
723
|
+
|
|
698
724
|
if isinstance(colour_shift_value, list):
|
|
699
|
-
return colour_shift_value
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
725
|
+
return colour_shift_value
|
|
726
|
+
|
|
727
|
+
# rotate left by colour_shift_value
|
|
728
|
+
shift = int(colour_shift_value)
|
|
729
|
+
if shift <= 0:
|
|
730
|
+
return palette
|
|
731
|
+
|
|
732
|
+
shift = shift % len(palette)
|
|
733
|
+
return palette[shift:] + palette[:shift]
|
|
734
|
+
|
|
735
|
+
def _build_trace_to_group_id(self, groups: list[list[str]]) -> dict[str, int]:
|
|
736
|
+
"""Validate groups and return a mapping of trace -> group_id."""
|
|
737
|
+
trace_set = set(self.trace_name_list)
|
|
738
|
+
trace_to_group_id: dict[str, int] = {}
|
|
739
|
+
|
|
740
|
+
for group_id, group in enumerate(groups):
|
|
741
|
+
for trace in group:
|
|
742
|
+
if trace not in trace_set:
|
|
743
|
+
raise ValueError(
|
|
744
|
+
f"trace_colour_groups contains '{trace}', but it's not in trace_name_list."
|
|
745
|
+
)
|
|
746
|
+
if trace in trace_to_group_id:
|
|
747
|
+
raise ValueError(
|
|
748
|
+
f"Trace '{trace}' appears in more than one trace_colour_group."
|
|
749
|
+
)
|
|
750
|
+
trace_to_group_id[trace] = group_id
|
|
751
|
+
|
|
752
|
+
return trace_to_group_id
|
|
753
|
+
|
|
754
|
+
def _assign_colours_with_groups(
|
|
755
|
+
self,
|
|
756
|
+
palette: list[str],
|
|
757
|
+
trace_to_group_id: dict[str, int],
|
|
758
|
+
) -> list[str]:
|
|
759
|
+
"""Assign one colour per group (first-seen), and one per ungrouped trace."""
|
|
760
|
+
group_colour: dict[int, str] = {}
|
|
761
|
+
trace_colour: dict[str, str] = {}
|
|
762
|
+
colour_idx = 0
|
|
763
|
+
|
|
764
|
+
# assign colours to groups in order of first appearance in trace_name_list
|
|
765
|
+
for trace in self.trace_name_list:
|
|
766
|
+
group_id = trace_to_group_id.get(trace)
|
|
767
|
+
if group_id is not None and group_id not in group_colour:
|
|
768
|
+
group_colour[group_id] = palette[colour_idx % len(palette)]
|
|
769
|
+
colour_idx += 1
|
|
770
|
+
|
|
771
|
+
# apply group colours to grouped traces
|
|
772
|
+
for trace, group_id in trace_to_group_id.items():
|
|
773
|
+
trace_colour[trace] = group_colour[group_id]
|
|
774
|
+
|
|
775
|
+
# assign colours to ungrouped traces
|
|
776
|
+
for trace in self.trace_name_list:
|
|
777
|
+
if trace not in trace_colour:
|
|
778
|
+
trace_colour[trace] = palette[colour_idx % len(palette)]
|
|
779
|
+
colour_idx += 1
|
|
780
|
+
|
|
781
|
+
return [trace_colour[t] for t in self.trace_name_list]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gov_uk_dashboards
|
|
3
|
-
Version: 26.
|
|
3
|
+
Version: 26.27.0
|
|
4
4
|
Summary: Provides access to functionality common to creating a data dashboard.
|
|
5
|
-
Author:
|
|
5
|
+
Author: Ministry of Housing, Communities & Local Government
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
7
|
License-File: LICENSE
|
|
8
8
|
Requires-Dist: setuptools<81.0,>=59.8
|
|
@@ -7,10 +7,10 @@ long_description = (this_directory / "README.md").read_text(encoding="UTF-8")
|
|
|
7
7
|
|
|
8
8
|
# Call setup function
|
|
9
9
|
setup(
|
|
10
|
-
author="
|
|
10
|
+
author="Ministry of Housing, Communities & Local Government",
|
|
11
11
|
description="Provides access to functionality common to creating a data dashboard.",
|
|
12
12
|
name="gov_uk_dashboards",
|
|
13
|
-
version="26.
|
|
13
|
+
version="26.27.0",
|
|
14
14
|
long_description=long_description,
|
|
15
15
|
long_description_content_type="text/markdown",
|
|
16
16
|
packages=find_packages(),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/dashboard.css
RENAMED
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/download-map.js
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
|
|
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
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/mobile-nav.js
RENAMED
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/assets/register_maps
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/banners.py
RENAMED
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/card.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/details.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/footer.py
RENAMED
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/graph.py
RENAMED
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/header.py
RENAMED
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/heading.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/navbar.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/table.py
RENAMED
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/dash/tooltip.py
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/components/plotly/enums.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/figures/__init__.py
RENAMED
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/figures/enums/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/figures/line_chart.py
RENAMED
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/figures/styles/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/formatting/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/formatting/rounding.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/dap/__init__.py
RENAMED
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/dap/dap_deployment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/enable_basic_auth.py
RENAMED
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards/lib/http_headers.py
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
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards.egg-info/requires.txt
RENAMED
|
File without changes
|
{gov_uk_dashboards-26.25.0 → gov_uk_dashboards-26.27.0}/gov_uk_dashboards.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|