Skip to content

Commit

Permalink
feat: Hook up granular A4 GIS API variables for Barnet (#2639)
Browse files Browse the repository at this point in the history
* Create barnet.ts

* Update digitalLand.ts

* feat: Hook up granular A4 GIS API variables for Barnet
  • Loading branch information
augustlindemer authored Jan 8, 2024
1 parent 150d564 commit f7110e9
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api.planx.uk/modules/gis/service/digitalLand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface LocalAuthorityMetadata {
}

const localAuthorityMetadata: Record<string, LocalAuthorityMetadata> = {
barnet: require("./local_authorities/metadata/barnet"),
birmingham: require("./local_authorities/metadata/birmingham"),
buckinghamshire: require("./local_authorities/metadata/buckinghamshire"),
camden: require("./local_authorities/metadata/camden"),
Expand Down Expand Up @@ -203,6 +204,7 @@ async function go(
// these are various ways we link source data to granular planx values (see local_authorities/metadata for specifics)
entity.name.replace(/\r?\n|\r/g, " ") === a4s[key] ||
entity.reference === a4s[key] ||
entity?.["article-4-direction"] === a4s[key] ||
entity?.notes === a4s[key] ||
entity?.description?.startsWith(a4s[key]) ||
formattedResult[key]?.value // if this granular var is already true, make sure it remains true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
LAD20CD: E09000003
LAD20NM: Barnet
LAD20NMW:
FID:
https://www.planning.data.gov.uk/entity/?dataset=article-4-direction-area&geometry_curie=statistical-geography%3AE09000003&entry_date_day=&entry_date_month=&entry_date_year=
https://docs.google.com/spreadsheets/d/1ZjqYdC7upA8YS9rBoyRIQPT1sqCXJBaxQDrvUh1todU/edit#gid=0
*/

import { LocalAuthorityMetadata } from "../../digitalLand";

const planningConstraints: LocalAuthorityMetadata["planningConstraints"] = {
article4: {
// Planx granular values link to Digital Land article-4-direction and entity.reference
records: {
"article4.barnet.finchleyChurchEnd": "A4D1",
"article4.barnet.finchleyGardenVillage": "A4D2A1",
"article4.barnet.glenhillClose": "A4D3A1",
"article4.barnet.hendonBurroughs.1": "A4D5A1",
"article4.barnet.hendonBurroughs.2": "A4D5A2",
"article4.barnet.hampsteadGardenSuburb": "A4D4A1",
"article4.barnet.spaniardsEnd": " A4D4A2",
"article4.barnet.millHillA": "A4D6",
"article4.barnet.millHillB": "A4D7",
"article4.barnet.monkenHadleyA": "A4D8",
"article4.barnet.monkenHadleyB": "A4D9",
"article4.barnet.mossHall": "A4D10",
"article4.barnet.totteridgeA": "A4D11",
"article4.barnet.totteridgeB": "A4D12",
"article4.barnet.woodStreet": "A4D13",
"article4.barnet.hmo": "A4D14",
"article4.barnet.agriculturalLand": "A4D15",
},
},
};

export { planningConstraints };

0 comments on commit f7110e9

Please sign in to comment.