Files
notifications-admin/app/broadcast_areas/constants.py
Chris Hill-Scott 8ea3f0141c Give estimates of the number of phones in a broadcast area
We need to give people a better feel for the consequences of
broadcasting an alert. We’ve seen in research that some users will
assume it is subscription based, or opt-in, rather than going to every
phone in the area.

I reckon that the most effective way to communicate this is to put some
numbers next to the areas, to give people an idea of how many people
will get alerted.

We can estimate how many phones are in an area by:
- taking the population of all electoral wards in that area
- multiplying it by the percentage of people who own an internet
  connected phone[1]

The Office for National Statistics publish both these datasets.

The number of people who own an intenet connected phone varies a lot by
age. Since the population data for each ward is broken down by age we
can factor this in. Simplified, the calculation looks like this:
- take the _Abbey_ ward of _Barking and Dagenham_
- in this ward there are 26 people aged 80
- 40% of people over 65 have an internet-connected phone
- therefore 10 of these 80-year-olds would be likely to receive a
  broadcast
- (repeat for all other ages)

These numbers won’t be exact, but should be enough to give people a feel
for the severity of what they’re about to do. We can see if they acheive
this aim in user research.

1. This is a proxy for the number of people who are likely to have a 4G
   capable phone, because only 4G capable phones will be receiving
   broadcasts to begin with
2020-09-14 16:26:09 +01:00

41 lines
1.2 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import math
SMARTPHONE_OWNERSHIP_BY_AGE_RANGE = {
# If no children have a phone when theyre born but 100% of
# children have a phone by age 16 then 50% is a rough
# approximation of how many children have phones
(0, 15): 0.50,
# https://www.finder.com/uk/mobile-internet-statistics
(16, 24): 1.00,
(25, 34): 0.97,
(35, 44): 0.91,
(45, 54): 0.88,
(55, 64): 0.73,
(65, math.inf): 0.40,
}
MEDIAN_AGE_UK = 40
for min, max in SMARTPHONE_OWNERSHIP_BY_AGE_RANGE.keys():
if min <= MEDIAN_AGE_UK <= max:
MEDIAN_AGE_RANGE_UK = (min, max)
class CITY_OF_LONDON:
WARDS = (
'E05009289', 'E05009290', 'E05009291', 'E05009292', 'E05009293',
'E05009294', 'E05009295', 'E05009296', 'E05009297', 'E05009298',
'E05009299', 'E05009300', 'E05009301', 'E05009302', 'E05009303',
'E05009304', 'E05009305', 'E05009306', 'E05009307', 'E05009308',
'E05009309', 'E05009310', 'E05009311', 'E05009312',
)
# https://data.london.gov.uk/blog/daytime-population-of-london-2014/
DAYTIME_POPULATION = 553_000
# Approx area of the polygons were storing, not the actual area
AREA_SQUARE_MILES = 1.78
class BRYHER:
WD20_CODE = 'E05011090'
POPULATION = 84