mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 09:28:25 -04:00
Remove Sizewell from the demo areas library
We added this for the 25 May demo. We’re unlikely to need it again. We’re also unlikely to need this library again, so this commit removes the source and the code that creates it.
This commit is contained in:
Binary file not shown.
@@ -187,7 +187,6 @@ def estimate_number_of_smartphones_in_area(country_or_ward_code):
|
||||
|
||||
|
||||
test_filepath = source_files_path / "Test.geojson"
|
||||
demo_filepath = source_files_path / "Demo.geojson"
|
||||
ctry19_filepath = source_files_path / "Countries.geojson"
|
||||
|
||||
# https://geoportal.statistics.gov.uk/datasets/wards-may-2020-boundaries-uk-bgc
|
||||
@@ -282,42 +281,6 @@ def add_test_areas():
|
||||
repo.insert_broadcast_areas(areas_to_add, keep_old_polygons)
|
||||
|
||||
|
||||
def add_demo_areas():
|
||||
dataset_id = 'demo'
|
||||
dataset_geojson = geojson.loads(demo_filepath.read_text())
|
||||
repo.insert_broadcast_area_library(
|
||||
dataset_id,
|
||||
name='Demo areas',
|
||||
name_singular='demo area',
|
||||
is_group=False,
|
||||
)
|
||||
|
||||
areas_to_add = []
|
||||
for feature in dataset_geojson["features"]:
|
||||
f_id = feature["properties"]['id']
|
||||
f_name = feature["properties"]['name']
|
||||
f_count_of_phones = feature["properties"]['count_of_phones']
|
||||
|
||||
print() # noqa: T001
|
||||
print(f_name) # noqa: T001
|
||||
|
||||
feature, _, utm_crs = polygons_and_simplified_polygons(
|
||||
feature["geometry"]
|
||||
)
|
||||
|
||||
print(' Phones: ', f_count_of_phones) # noqa: T001
|
||||
|
||||
areas_to_add.append([
|
||||
f'{dataset_id}-{f_id}', f_name,
|
||||
dataset_id, None,
|
||||
feature, feature,
|
||||
utm_crs,
|
||||
f_count_of_phones,
|
||||
])
|
||||
|
||||
repo.insert_broadcast_areas(areas_to_add, keep_old_polygons)
|
||||
|
||||
|
||||
def add_countries():
|
||||
dataset_id = 'ctry19'
|
||||
dataset_geojson = geojson.loads(ctry19_filepath.read_text())
|
||||
@@ -471,7 +434,6 @@ else:
|
||||
repo.delete_db()
|
||||
repo.create_tables()
|
||||
add_test_areas()
|
||||
add_demo_areas()
|
||||
add_countries()
|
||||
add_wards_local_authorities_and_counties()
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"id": "sizewell",
|
||||
"name": "East Suffolk",
|
||||
"count_of_phones": 700
|
||||
},
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [[
|
||||
[1.58242, 52.22035],
|
||||
[1.58491, 52.19521],
|
||||
[1.59971, 52.19325],
|
||||
[1.62352, 52.19372],
|
||||
[1.62599, 52.21901],
|
||||
[1.58242, 52.22035]
|
||||
]]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user