Skip to content

Instantly share code, notes, and snippets.

@psd
Last active June 18, 2019 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psd/de2ddc722ebe0c2e5edb37dbdecf48ca to your computer and use it in GitHub Desktop.
Save psd/de2ddc722ebe0c2e5edb37dbdecf48ca to your computer and use it in GitHub Desktop.
Brownfield sites fieldnames
CoordinateReferenceSystem 2 Co-ordinate Reference System
CoordinateReferenceSystem 2 COORDINATE REFERENCE SYSTEM
CoordinateReferenceSystem 4 COORDINATEREFERENCESYSTEM
CoordinateReferenceSystem 7 Coordinate Reference System
Deliverable 5 DELIVERABLE
DevelopmentDescription 1 Developmentdescription
DevelopmentDescription 1 DEVELOPMENT DESCRIPTION
DevelopmentDescription 4 DEVELOPMENTDESCRIPTION
DevelopmentDescription 9 Development Description
FirstAddedDate 1 FirstAddeddate
FirstAddedDate 1 FIRST ADDED DATE
FirstAddedDate 4 FIRSTADDEDDATE
FirstAddedDate 7 First Added Date
GeoX 1 Geo X
GeoX 5 GEOX
GeoY 1 Geo Y
GeoY 5 GEOY
HazardousSubstances 1 HAZARDOUS SUBSTANCES
HazardousSubstances 4 HAZARDOUSSUBSTANCES
HazardousSubstances 7 Hazardous Substances
Hectares 6 HECTARES
LastUpdatedDate 1 LastUpdateddate
LastUpdatedDate 1 LAST UPDATED DATE
LastUpdatedDate 4 LASTUPDATEDDATE
LastUpdatedDate 9 Last Updated Date
MinNetDwellings 1 MIN NET DWELLINGS
MinNetDwellings 4 MINNETDWELLINGS
MinNetDwellings 7 Min Net Dwellings
NetDwellingsRangeFrom 1 NET DWELLINGS RANGE FROM
NetDwellingsRangeFrom 4 NETDWELLINGSRANGEFROM
NetDwellingsRangeFrom 7 Net Dwellings Range From
NetDwellingsRangeTo 1 Net Dwellings RangeTo
NetDwellingsRangeTo 1 NET DWELLINGS RANGE TO
NetDwellingsRangeTo 2 NetDwellingsRangeto
NetDwellingsRangeTo 4 NETDWELLINGSRANGETO
NetDwellingsRangeTo 6 Net Dwellings Range To
NonHousingDevelopment 1 Non-Housing development
NonHousingDevelopment 1 NonHousing development
NonHousingDevelopment 1 Non-Housing Development
NonHousingDevelopment 1 NonHousing Development
NonHousingDevelopment 1 NON HOUSING DEVELOPMENT
NonHousingDevelopment 2 Non-housing development
NonHousingDevelopment 4 NONHOUSINGDEVELOPMENT
NonHousingDevelopment 6 Non Housing Development
Notes 6 NOTES
OrganisationLabel 1 ORGANISATION LABEL
OrganisationLabel 4 ORGANISATIONLABEL
OrganisationLabel 8 Organisation Label
OrganisationURI 1 ORGANISA_1
OrganisationURI 1 Organisation Uri
OrganisationURI 1 OrganisationUrI
OrganisationURI 1 ORGANISATION URL
OrganisationURI 1 OrganistionURI
OrganisationURI 1 OrgansiationURI
OrganisationURI 1 PublisherURI
OrganisationURI 1 Publisher URL
OrganisationURI 1 URI
OrganisationURI 2 Organisation URL
OrganisationURI 3 Organisation URI
OrganisationURI 3 Publisher URI
OrganisationURI 4 ORGANISATIONURI
OrganisationURI 4 OrganisationURL
OwnershipStatus 12 Ownership Status
OwnershipStatus 1 Ownership status
OwnershipStatus 2 OWNERSHIP STATUS
OwnershipStatus 4 OWNERSHIPSTATUS
Part2 2 PART 2
Part2 5 PART2
Part2 9 Part 2
PermissionDate 11 Permission Date
PermissionDate 1 PERMISSION DATE
PermissionDate 4 PERMISSIONDATE
PermissionType 1 PERMISSION TYPE
PermissionType 4 PERMISSIONTYPE
PermissionType 8 Permission Type
PlanningHistory 11 Planning History
PlanningHistory 1 PLANNING HISTORY
PlanningHistory 4 PLANNINGHISTORY
PlanningStatus 12 Planning Status
PlanningStatus 1 Planning_Status
PlanningStatus 2 PLANNING STATUS
PlanningStatus 4 PLANNINGSTATUS
PreviouslyPartOf 1 PREVIOUSLY PART OF
PreviouslyPartOf 2 PreviouslyPartof
PreviouslyPartOf 4 PREVIOUSLYPARTOF
PreviouslyPartOf 7 Previously Part Of
ProposedForPIP 16 ProposedforPIP
ProposedForPIP 1 Proposed for PIP
ProposedForPIP 1 ProposedFor PIP
ProposedForPIP 1 PROPOSED FOR PIP
ProposedForPIP 2 Proposed for PiP
ProposedForPIP 3 ProposedForPiP
ProposedForPIP 4 PROPOSEDFORPIP
ProposedForPIP 5 Proposed For PIP
shlaareference 2 SHLAAReference
SiteInformation 1 SITE INFORMATION
SiteInformation 4 SITEINFORMATION
SiteInformation 9 Site Information
SiteNameAddress 1 SITE NAME ADDRESS
SiteNameAddress 4 SITENAMEADDRESS
SiteNameAddress 7 Site Name Address
SiteplanURL 1 SITE PLAN URL
SiteplanURL 2 Site plan URL
SiteplanURL 2 Siteplan URL
SiteplanURL 37 SitePlanURL
SiteplanURL 4 Site Plan URL
SiteplanURL 4 SITEPLANURL
SiteReference 12 Site Reference
SiteReference 1 SIteReference
SiteReference 1 SITE REFERENCE
SiteReference 4 SITEREFERENCE
1 A1
1 A2
1 A3
1 A4
1 A5
1 AA
1 Achievable comment (Reg 4 (1)(d))
1 additional field address 2
1 additional field calc area
1 additional field no at 30per ha
1 additional field no at 45perha
1 Address
1 AllocatedSite
1 AllocationForHousingOrMixedUse
1 AllocationReference
1 All/Part Deliverable within 5 years
1 Alt_Coords_X_Y
1 AlternateSiteReference
1 Alternative Reference 1 (Planning permission)
1 AlternativeReference_2
1 Alternative Reference 2 (Local Plan PS Jan 2018)
1 Alternative Reference 2 (Site Assessment)
1 Alternativereferences
1 AltRef
1 AltSiteReference
1 APGRECNO
1 Application Description / Site description in SHLAA
1 Application ref
1 Approved date
1 Area
1 AREA (HA)
1 AreaOfOutstandingNaturalBeautyDevelopmentPlanDocumentReference
1 Are there known ownership or tenancy issues?
1 Authority
1 Available comment (Reg 4 (1)(c))
1 B1
1 B2
1 B8
1 Brownfield Coverage
1 Brownfield/GreenfieldMix?
1 C1
1 C2(RI)
1 C3(H)
1 C3(HOP)
1 C3(SB/CB)
1 Capable of housing development [in policy terms]
1 Capacity max remaining
1 Capacity min remaining
1 Comments
1 ConservationArea
1 CoordinateReferenceSystem2
1 CoordinateReferenceSystem_2
1 CoordinateReferenceSystem3
1 CoordinateRefernceSystem
1 COORDINATES
1 Co-ordinate system
1 COORDREFER
1 CordinateReferenceSystem
1 CrossReference
1 Current Status
1 D1
1 D2
1 DATE ENTERED ON REGISTER
1 DATE LAST UPDATED
1 Date_Permission
1 Date Permission Lapses
1 Date Permission Obtained
1 DateUpdate
1 dd
1 Decision_Date
1 DELIVERABL
1 Description
1 DESCRIPTION OF PROPOSED HOUSING DEVELOPMENT
1 DEVDESCR
1 Developable area (ha)
1 Development Status: extant/ commc'd./ part. compltd.
1 Discription/Notes
1 DM COMMENTS
1 Dwelling_Range
1 e
1 EAST
1 Eastings (Geo X)
1 EffectiveDate
1 ETRS89
1 ExpiryOfPlanningPermission
1 ff
1 FID
1 FirstAdd
1 First Added
1 FIRSTADDED
1 FirstAddedDate1
1 First\nAdded\nDate
1 Geo Latitude
1 Geo Longitude
1 GeoPointLicensingURL
1 GeoX_2
1 GeoX_3
1 GeoX [East]
1 GeoX (Longitude or east grid)
1 GeoY_2
1 GeoY_3
1 GeoY (Latitude or north grid)
1 GeoY [North]
1 GF / PDL
1 gg
1 gid
1 GLASiteplanURL
1 GlobalID
1 Grid reference easting
1 Grid reference northing
1 Gross area (ha)
1 Hazardous Substance[s] on site? [as identifiied in Application form]
1 HazardousSubtances
1 HazourdousSubstances
1 HAZSUB
1 Hectares (gross)
1 HELAA 2016 ref
1 HELAA note
1 HELAAReference
1 HELAA Reference
1 HousingDeliveryEstimate
1 Housing Est (remaining)
1 Hsg. No in Appl.
1 i
1 IDOX_Reference
1 IF PERMISSIONED
1 Is the site likely available [and/or deliverable within the next 15 yrs.]?
1 JLPPolicyReference
1 LandAllocationsReference
1 LAND DELIVERABLE?
1 LandType
1 Lapse date
1 LA SITE REF
1 LastAddedDate
1 Last Update
1 LASTUPDATE
1 Last Updated
1 LastUpdateDate
1 LastUpdatedDate1
1 Latitude
1 LATITUDE
1 LDD_Existing_Residential_Units
1 LDD_Net_Residential_Units
1 LDD_Proposed_Residential_Units
1 LDSSiteRef
1 Local Authority
1 Local_Authority
1 LOCAL AUTHORITY
1 LocalPlanPolRef
1 Local Plan Ref
1 Local Plan reference/SLAA reference
1 Local Plan Site Allocation Reference / SLAA Site Reference
1 LocalPlanURL
1 Longitude
1 LONGITUDE
1 LPSARef
1 Mapping link [Siteplan URL]
1 Map Weblink
1 MAXIMUM NET DWELLINGS
1 Min_Capacity
1 MinDetDwellings
1 Minimum Net Dwellings
1 MINIMUM NET DWELLINGS
1 MINNETDWEL
1 MinNetDwellingsComment
1 NAME AND ADDRESS OF SITE
1 NET CHANGE; units developed so far
1 Net DwelingsRangeFrom
1 Net dwelling range from?
1 Net dwelling range to
1 NetDwellingRangeTo
1 NetDwellingsRangeFromComment
1 NetDwellingsRangeToComment
1 NetDweloingsRangeTo
1 Net\nDwellings\nRange\nFrom
1 Net\nDwellings\nRange\nTo
1 NETRANGEFR
1 NETRANGETO
1 NewDwellingsRangeFrom
1 NewDwellingsRangeto
1 NewDwellingsRangeTo
1 NONHOUSING
1 NonHousingDeveloment
1 Non_Resi_Dev
1 NORTH
1 Northings (Geo Y)
1 Notes UPRN for sites
1 OBJECTID
1 OBJECTID
1 OPEN DATA WEBSITE
1 ORGANISATI
1 OrganisationalLabel
1 OrganistionLabel
1 OrgansiationLabel
1 OSEasting
1 OSGB36
1 OSGB36Easting
1 OSGB36 Easting
1 OSGB36Northing
1 OSGB36 Northing
1 OS map reference [OSGB 1936 ? British National Grid]
1 OSNorthing
1 OSReferenceSystem
1 Other
1 Other_2
1 OtherNotes
1 OtherSiteReferences
1 Outstanding development
1 OwenrshipStatus
1 Ownership
1 OWNERSHIP
1 Ownership 2
1 Ownership Information
1 Ownership_Status: PA_owned [Public Autho-rity]; not PA_owned; mix. ownership; unknown
1 Owners (if known)
1 Owners(ifpublicsectororHA)
1 PA1Status
1 PA2Ward
1 PA3MapNumber
1 PDL area on the site (hectares)
1 PERMDATE
1 PermisionType
1 PermissionDate1
1 Permission\nDate
1 Permission Types as required in BFLR
1 PERMTYPE
1 Plan
1 PLANHISTOR
1 Planning Application Link
1 Planning Application Number and link to documents
1 PLANNINGAPPLICATIONREF
1 Planningapplicationreference
1 Planning application Reference
1 PlanningApplicationReference
1 Planning Application Reference
1 PlanningAppNumber
1 Planning History link
1 Planning History URL
1 PlanningHistory (URL)
1 Planning Permission
1 Planning Permission Status
1 Planning ref
1 Planning Reference
1 PLANNINGSTATUSEXTRA1
1 PLANNINGSTATUSEXTRA2
1 Planning_Status_Reference
1 PLAN OF SITE
1 PlanPermission
1 PLANSTATUS
1 Plan_Status: permissd. / pending / no application
1 Postcode
1 Potential Housing Capacity (Min) (Gross)
1 Potential Housing Capcity (Max) (Gross)
1 PPRN
1 PrevBLRRef
1 PREVIOUSLY
1 PreviousReference
1 Previous Use
1 PrevSHLAARef
1 Primary Source of Identification at DATE
1 Progress
1 PROPFORPIP
1 ProposedUse
1 PublisherLabel
1 Reference_System
1 Register_Date
1 Residential Development Description
1 RowNumber
1 SCALE OF NON HOUSING DEVELOPMENT
1 SCC_Regeneration
1 SCC_SubArea
1 SCC_Ward
1 Shape_Area
1 SHAPE_AREA
1 SHAPE_LEN
1 Shape_Length
1 SHELAARef
1 SHLAA_CapacityApprox
1 SHLAA_Constrained_Total
1 SHLAARef
1 shlaareference
1 SHLAASiteRef
1 Site_Address
1 Site Area in ha
1 SiteAreasqm
1 SiteInfomation
1 SITEINFORM
1 SiteInformation1
1 SiteInformation2
1 Site Information3
1 Site Information / constrains
1 Site Name
1 Site_Name
1 SITENAME
1 Site Name, Address
1 SiteName/Address
1 Site Name, Address, Postcode
1 SiteNameAddresss
1 Site part of SHLAA [2012 Reference]
1 SITEPLANUR
1 SiteProforma
1 Site Ref
1 SITEREF
1 Site Reference_2
1 SiteReference_2
1 SiteReference (also SHLAA Reference)
1 Sitestatus
1 Site UPRN
1 Site URL
1 Site Yes (within 5 years)
1 SortOrder
1 SOURCE
1 STATUS
1 StrategicHousingLandAvailabilityAssessmentReference
1 SuiGeneris
1 Suitable comment (Reg 4 (1)(b))
1 Superseded or replaced previous planning application
1 Supportg. 5+ dwellings or more than 0.25ha in size
1 To be included on Brownfield Register
1 Total site area (hectares)
1 TOWNSHIP
1 Type_Permission
1 Updated_Date
1 URLOrganisationLabel
1 VersionNumber
1 Ward Name
1 Well Known Text Geometry
1 x
1 X_Ref
1 Y_Ref
1 z
2 Additional Notes
2 AdditionReference
2 Alternative Reference
2 Area (ha)
2 BNG_Easting
2 BNG_Northing
2 Brownfield Register Reference
2 ConstructionStatus
2 Date Entered on Part 1 of Brownfield Register
2 Description of Proposed Development
2 ee
2 Housing Delivery Estimate
2 Information Updated
2 Location
2 Maximum amount of Dwellings
2 Minimum amount of Dwellings
2 MI_PRINX
2 NetDwellingsRangeForm
2 PermissionHistory
2 Reference
2 Settlement
2 Site Address
2 Site status
2 Status
2 Type of Permission
2 v
2 y
3 Alternative References
3 Constraints
3 Events
3 MinHomes
3 Parish
3 PlanningAuthority
3 PlanningReference
3 Publisher Label
3 Ward
4 cc
4 Eastings
4 HousingEstimate
4 SiteAddress
4 SiteName
4 Siteplan
5 Northings
5 Owners
5 Source
6 AlternativeReferences
6 PlanningAuthority1
6 PlanningAuthority2
6 PlanningAuthority3
8 AlternativeReference
8 UPRN
9 EASTING
9 NORTHING
31 Northing
32 Easting
249 SiteplanURL
262 ProposedForPIP
272 HazardousSubstances
273 Part2
274 NetDwellingsRangeTo
276 NetDwellingsRangeFrom
278 SiteInformation
282 DevelopmentDescription
282 PreviouslyPartOf
283 NonHousingDevelopment
284 PermissionDate
284 PlanningHistory
288 LastUpdatedDate
288 SiteNameAddress
288 SiteReference
289 MinNetDwellings
289 PermissionType
290 OrganisationLabel
290 OrganisationURI
290 OwnershipStatus
292 CoordinateReferenceSystem
292 PlanningStatus
294 FirstAddedDate
298 GeoX
298 GeoY
298 Notes
299 Deliverable
300 Hectares
327
#!/usr/bin/env python3
import csv
import glob
fieldnames = "OrganisationURI", "OrganisationLabel", "SiteReference", "PreviouslyPartOf", "SiteNameAddress", "SiteplanURL", "CoordinateReferenceSystem", "GeoX", "GeoY", "Hectares", "OwnershipStatus", "Deliverable", "PlanningStatus", "PermissionType", "PermissionDate", "PlanningHistory", "ProposedForPIP", "MinNetDwellings", "DevelopmentDescription", "NonHousingDevelopment", "Part2", "NetDwellingsRangeFrom", "NetDwellingsRangeTo", "HazardousSubstances", "SiteInformation", "Notes", "FirstAddedDate", "LastUpdatedDate"
aliases = {
'organisationurl': 'OrganisationURI',
'organsiationuri': 'OrganisationURI',
'organistionuri': 'OrganisationURI',
'publisheruri': 'OrganisationURI',
'publisherurl': 'OrganisationURI',
'uri': 'OrganisationURI',
'organisa1': 'OrganisationURI',
}
found = {}
def normalised(field):
return field.lower().replace(' ', '').replace('_', '').replace('-', '')
def alias(name):
return aliases.get(normalised(name), name)
for field in fieldnames:
aliases[normalised(field)] = field
for path in glob.glob("*.csv"):
with open(path, mode='r') as f:
r = csv.DictReader(f)
for f in r.fieldnames:
f = f.strip().replace('\n', '\\n')
found[f] = found.get(f, 0) + 1
r.fieldnames = [alias(f) for f in r.fieldnames]
for f in found:
aliases[f] = alias(f)
for f in found:
a = alias(f)
if a != f:
print(a, found[f], f)
else:
print(found[f], f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment