Repository navigation
Commit 7cdf9f5
Add Ards and North Down and the 2023 unitaries' positions to the UK list
`policyengine_api/data/local_authorities_2021.csv`, which the UK
metadata's `economy_options.region` list reads, had 360 local
authorities. It lacked Ards and North Down (`N09000011`), the 11th
Northern Ireland district, so `local_authority/Ards and North Down` could
not be selected, and it gave the four unitary authorities created on
1 April 2023 (Cumberland `E06000063`, Westmorland and Furness
`E06000064`, North Yorkshire `E06000065`, Somerset `E06000066`) the
shared (0, 0) placeholder position.
The file now has the missing row (`N09000011,-3.0,16.0,Ards and North
Down`, after `N09000010`, in the file's code order and number format),
and the four unitaries take their x and y from .py 6.10.0's packaged
`local_authorities_2023.csv`. Its codes, names and positions now equal
that 2023 list for all 361 authorities. The file name is unchanged, to
avoid renaming it everywhere it is read.
The new name resolves in .py 6.10.0's installed UK region registry,
whose label "Ards and North Down" belongs to `local_authority/N09000011`;
the simulation API matches a `local_authority/{name}` request to the
registry by code or label, ignoring case. A test checks that every
offered local-authority name resolves this way.
Tests written first. Before the change, 6 failed for the expected
reason: the metadata and the file had 360 local authorities, not 361;
`local_authority/Ards and North Down` was not offered; Northern Ireland
had 10 districts, not 11; the file differed from .py's list in the
missing code and the four unitaries' (0, 0) positions; and those four
were still at (0, 0). The registry-resolution test passed before and
after for the 360 existing names.
Refs #4021
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent c2cd5c1 commit 7cdf9f5
3 files changed
Lines changed: 91 additions & 10 deletions
File tree
- changelog.d
- policyengine_api/data
- tests/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
216 | | - | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
221 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
222 | 257 | | |
223 | 258 | | |
224 | 259 | | |
| |||
295 | 330 | | |
296 | 331 | | |
297 | 332 | | |
298 | | - | |
| 333 | + | |
299 | 334 | | |
300 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
301 | 371 | | |
302 | 372 | | |
303 | 373 | | |
| |||
321 | 391 | | |
322 | 392 | | |
323 | 393 | | |
324 | | - | |
| 394 | + | |
325 | 395 | | |
326 | 396 | | |
327 | 397 | | |
| |||
340 | 410 | | |
341 | 411 | | |
342 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
343 | 423 | | |
344 | 424 | | |
345 | 425 | | |
| |||
0 commit comments