Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e28a175
update django to 4.2.26
struan Nov 13, 2025
83c8d04
config to import council safeguarding data
struan Nov 5, 2025
2c0afb6
drop any empty cols before converting to int
struan Nov 5, 2025
f14a8d1
allow for integer ranges on area page
struan Nov 5, 2025
44f964c
don't display % sign for non percentage ranges
struan Nov 5, 2025
174a430
fix charts to not auto add %age etc
struan Nov 5, 2025
7915b40
migration to change overlaps related names
struan Nov 6, 2025
557ab72
add is_time_series property to DataSet
struan Nov 6, 2025
d0d5eea
add setting time_series property to import_from_config
struan Nov 6, 2025
e1816fc
display time series graphs on area page
struan Nov 6, 2025
16e0330
add in female specific safeguarding data
struan Nov 6, 2025
ec80571
handlge multiple area types in import from config
struan Nov 6, 2025
451ab1a
handle time series data on explore page
struan Nov 6, 2025
667bc08
only convert policing data using STC councils
struan Nov 10, 2025
dee2b4f
allow filtering on column values when importing from conf
struan Nov 10, 2025
ae1dd42
standardise policing areas to use & and not and in names
struan Nov 10, 2025
d18472c
do not fail on importing policing areas if name data missing
struan Nov 10, 2025
e37c470
import conf and generator for evaw policing data
struan Nov 10, 2025
cc70e02
fixup! display time series graphs on area page
struan Nov 11, 2025
09c013d
Improve school safeguarding dataset labels
zarino Nov 11, 2025
35ade83
Improve wording and rounding for Council of Europe recommendations
zarino Nov 11, 2025
6164099
Show only current Site’s datasets on Data Sources page
zarino Nov 11, 2025
6c2b4f8
Add fake “datasets” to Area page, for EVAW demo
zarino Nov 11, 2025
bee47fa
Make PCC datasets shadeable on Explore map
zarino Nov 12, 2025
cdf0761
add party colours to PCC import result
struan Nov 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
285 changes: 285 additions & 0 deletions conf/imports.json
Original file line number Diff line number Diff line change
Expand Up @@ -1845,5 +1845,290 @@
"data_col":"Other"
}
]
},
{
"name":"council_safeguarding_referrals_overall",
"label":"Safeguarding referrals from schools",
"description":"",
"data_type":"integer",
"category":"place",
"subcategory":null,
"release_date":"October 2025",
"source_label":"FOI requests by mySociety",
"source":"https://www.whatdotheyknow.com/info_request_batch/6552",
"source_type":"csv",
"data_url":"",
"table":"areadata",
"default_value":0,
"comparators":"numerical",
"exclude_countries":["Northern Ireland"],
"unit_type":"raw",
"unit_distribution":"point",
"fill_blanks":false,
"is_public":true,
"is_filterable":true,
"is_shadeable":true,
"data_file":"safeguarding.csv",
"uses_gss":true,
"do_not_delete":true,
"file_type":"csv",
"area_type":"STC",
"delete_first": true,
"is_range": true,
"is_time_series": true,
"constituency_col":"gss-code",
"gss_map": {
"E08000016": "E08000038",
"E08000019": "E08000039",
"E10000027": "E06000066",
"E10000023": "E06000065"
},
"data_types": [
{
"name":"council_safeguarding_referrals_overall_2020",
"label":"2020",
"order": 1,
"data_col":"Total referrals, year beginning 2020"
},
{
"name":"council_safeguarding_referrals_overall_2021",
"label":"2021",
"order": 2,
"data_col":"Total referrals, year beginning 2021"
},
{
"name":"council_safeguarding_referrals_overall_2022",
"label":"2022",
"order": 3,
"data_col":"Total referrals, year beginning 2022"
},
{
"name":"council_safeguarding_referrals_overall_2023",
"label":"2023",
"order": 4,
"data_col":"Total referrals, year beginning 2023"
},
{
"name":"council_safeguarding_referrals_overall_2024",
"label":"2024",
"order": 5,
"data_col":"Total referrals, year beginning 2024"
}
]
},
{
"name":"council_safeguarding_referrals_females",
"label":"Safeguarding referrals about girls, from schools",
"description":"",
"data_type":"integer",
"category":"place",
"subcategory":null,
"release_date":"October 2025",
"source_label":"FOI requests by mySociety",
"source":"https://www.whatdotheyknow.com/info_request_batch/6552",
"source_type":"csv",
"data_url":"",
"table":"areadata",
"default_value":0,
"comparators":"numerical",
"exclude_countries":["Northern Ireland"],
"unit_type":"raw",
"unit_distribution":"point",
"fill_blanks":false,
"is_public":true,
"is_filterable":true,
"is_shadeable":true,
"data_file":"safeguarding.csv",
"uses_gss":true,
"do_not_delete":true,
"file_type":"csv",
"area_type":"STC",
"delete_first": true,
"is_range": true,
"is_time_series": true,
"constituency_col":"gss-code",
"do_not_convert": true,
"gss_map": {
"E08000016": "E08000038",
"E08000019": "E08000039",
"E10000027": "E06000066",
"E10000023": "E06000065"
},
"data_types": [
{
"name":"council_safeguarding_referrals_females_2020",
"label":"2020",
"order": 1,
"data_col":"Female referrals, year beginning 2020"
},
{
"name":"council_safeguarding_referrals_females_2021",
"label":"2021",
"order": 2,
"data_col":"Female referrals, year beginning 2021"
},
{
"name":"council_safeguarding_referrals_females_2022",
"label":"2022",
"order": 3,
"data_col":"Female referrals, year beginning 2022"
},
{
"name":"council_safeguarding_referrals_females_2023",
"label":"2023",
"order": 4,
"data_col":"Female referrals, year beginning 2023"
},
{
"name":"council_safeguarding_referrals_females_2024",
"label":"2024",
"order": 5,
"data_col":"Female referrals, year beginning 2024"
}
]
},
{
"name":"reported_rapes_per_100k",
"label":"Reported incidents of rape, per 100,000 people",
"description":"",
"data_type":"integer",
"is_range":false,
"category":"place",
"subcategory":null,
"release_date":"July 2025",
"source_label":"UK and Scottish governments, combined by mySociety",
"source":"https://www.gov.uk/government/statistical-data-sets/police-recorded-crime-and-outcomes-open-data-tables, https://www.gov.scot/collections/recorded-crime-in-scotland/",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor thing, but I think this will cause an issue in the Area and Sources templates, where they expect the dataset’s source url to be a single URL which can be put inside the href attribute of a single link. If we want datasets with multiple sources (good idea!) we will need to update the template and/or view to handle that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, yes, yes it will. I will leave it as now and then we can sort it out later, if that's ok?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! Can you ticket up, so we don’t forget?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ticket at #705

"source_type":"csv",
"data_url":"",
"table":"areadata",
"default_value":"",
"comparators":"numerical",
"exclude_countries":["Northern Ireland"],
"unit_type":"raw",
"unit_distribution":"point",
"fill_blanks":false,
"is_public":true,
"is_filterable":true,
"is_shadeable":true,
"data_file":"combined_police_data.csv",
"uses_gss":false,
"do_not_delete":false,
"file_type":"csv",
"area_type":"PFA",
"delete_first": true,
"multiply_percentage": false,
"constituency_col":"force",
"is_time_series": true,
"do_not_convert": true,
"data_types": [
{
"name":"reported_rapes_2020_per_100k",
"label":"2020",
"order": 1,
"data_col":"rapes per 100k in 2020"
},
{
"name":"reported_rapes_2021_per_100k",
"label":"2021",
"order": 2,
"data_col":"rapes per 100k in 2021"
},
{
"name":"reported_rapes_2022_per_100k",
"label":"2022",
"order": 3,
"data_col":"rapes per 100k in 2022"
},
{
"name":"reported_rapes_2023_per_100k",
"label":"2023",
"order": 4,
"data_col":"rapes per 100k in 2023"
},
{
"name":"reported_rapes_2024_per_100k",
"label":"2024",
"order": 5,
"data_col":"rapes per 100k in 2024"
},
{
"name":"reported_rapes_2025_per_100k",
"label":"2025",
"order": 6,
"data_col":"rapes per 100k in 2025"
}
]
},
{
"name":"reported_rapes",
"label":"Total reported incidents of rape",
"description":"",
"data_type":"integer",
"is_range":false,
"category":"place",
"subcategory":null,
"release_date":"July 2025",
"source_label":"UK and Scottish governments, combined by mySociety",
"source":"https://www.gov.uk/government/statistical-data-sets/police-recorded-crime-and-outcomes-open-data-tables, https://www.gov.scot/collections/recorded-crime-in-scotland/",
"source_type":"csv",
"data_url":"",
"table":"areadata",
"default_value":"",
"comparators":"numerical",
"exclude_countries":["Northern Ireland"],
"unit_type":"raw",
"unit_distribution":"point",
"fill_blanks":false,
"is_public":true,
"is_filterable":true,
"is_shadeable":true,
"data_file":"combined_police_data.csv",
"uses_gss":false,
"do_not_delete":false,
"file_type":"csv",
"area_type":"PFA",
"delete_first": true,
"multiply_percentage": false,
"constituency_col":"force",
"is_time_series": true,
"do_not_convert": true,
"data_types": [
{
"name":"reported_rapes_2020",
"label":"2020",
"order": 1,
"data_col":"rapes in 2020"
},
{
"name":"reported_rapes_2021",
"label":"2021",
"order": 2,
"data_col":"rapes in 2021"
},
{
"name":"reported_rapes_2022",
"label":"2022",
"order": 3,
"data_col":"rapes in 2022"
},
{
"name":"reported_rapes_2023",
"label":"2023",
"order": 4,
"data_col":"rapes in 2023"
},
{
"name":"reported_rapes_2024",
"label":"2024",
"order": 5,
"data_col":"rapes in 2024"
},
{
"name":"reported_rapes_2025",
"label":"2025",
"order": 6,
"data_col":"rapes in 2025"
}
]
}
]
2 changes: 1 addition & 1 deletion hub/management/commands/convert_data_to_policing_areas.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def convert(self):
)

data_types = DataType.objects.filter(
data_set=ds, area_type__code__in=["DIS", "STC"]
data_set=ds, area_type__code__in=["STC"]
)

for dt in data_types:
Expand Down
Loading
Loading