diff --git a/harmonize/data/processed/UNLOCODE_2023-2/Actor.csv b/harmonize/data/processed/UNLOCODE_2023-2/Actor.csv index 12bbc851..e0848296 100644 --- a/harmonize/data/processed/UNLOCODE_2023-2/Actor.csv +++ b/harmonize/data/processed/UNLOCODE_2023-2/Actor.csv @@ -55352,6 +55352,7 @@ GB BEO,city,Burrelton,GB-PKN,UNLOCODE:2023-2 GB B39,city,Burridge,GB-HAM,UNLOCODE:2023-2 GB BWR,city,Burrow,GB-SOM,UNLOCODE:2023-2 GB BBI,city,Burrowbridge,GB-SOM,UNLOCODE:2023-2 +GB BPT,city,Burry Port,GB-CMN,UNLOCODE:2023-2 GB BGH,city,Burscough,GB-LAN,UNLOCODE:2023-2 GB BUE,city,Bursledon,GB-HAM,UNLOCODE:2023-2 GB BEM,city,Burslem,GB-STS,UNLOCODE:2023-2 diff --git a/harmonize/data/processed/UNLOCODE_2023-2/Actor.delete.csv b/harmonize/data/processed/UNLOCODE_2023-2/Actor.delete.csv index 8e83a596..d39eb73f 100644 --- a/harmonize/data/processed/UNLOCODE_2023-2/Actor.delete.csv +++ b/harmonize/data/processed/UNLOCODE_2023-2/Actor.delete.csv @@ -253,7 +253,6 @@ FR ORY FR LYS GA MBY GA OGU -GB BPT GB EMA GB ELL GB LGW diff --git a/harmonize/data/processed/UNLOCODE_2023-2/ActorIdentifier.csv b/harmonize/data/processed/UNLOCODE_2023-2/ActorIdentifier.csv index da0c7769..672579f3 100644 --- a/harmonize/data/processed/UNLOCODE_2023-2/ActorIdentifier.csv +++ b/harmonize/data/processed/UNLOCODE_2023-2/ActorIdentifier.csv @@ -55352,6 +55352,7 @@ GB BEO,GB BEO,UNLOCODE,UNLOCODE:2023-2 GB B39,GB B39,UNLOCODE,UNLOCODE:2023-2 GB BWR,GB BWR,UNLOCODE,UNLOCODE:2023-2 GB BBI,GB BBI,UNLOCODE,UNLOCODE:2023-2 +GB BPT,GB BPT,UNLOCODE,UNLOCODE:2023-2 GB BGH,GB BGH,UNLOCODE,UNLOCODE:2023-2 GB BUE,GB BUE,UNLOCODE,UNLOCODE:2023-2 GB BEM,GB BEM,UNLOCODE,UNLOCODE:2023-2 diff --git a/harmonize/data/processed/UNLOCODE_2023-2/ActorIdentifier.delete.csv b/harmonize/data/processed/UNLOCODE_2023-2/ActorIdentifier.delete.csv index 8e83a596..d39eb73f 100644 --- a/harmonize/data/processed/UNLOCODE_2023-2/ActorIdentifier.delete.csv +++ b/harmonize/data/processed/UNLOCODE_2023-2/ActorIdentifier.delete.csv @@ -253,7 +253,6 @@ FR ORY FR LYS GA MBY GA OGU -GB BPT GB EMA GB ELL GB LGW diff --git a/harmonize/data/processed/UNLOCODE_2023-2/ActorName.csv b/harmonize/data/processed/UNLOCODE_2023-2/ActorName.csv index 6177061b..7fa5bf13 100644 --- a/harmonize/data/processed/UNLOCODE_2023-2/ActorName.csv +++ b/harmonize/data/processed/UNLOCODE_2023-2/ActorName.csv @@ -64766,6 +64766,7 @@ GB BEO,Burrelton,und,0,UNLOCODE:2023-2 GB B39,Burridge,und,0,UNLOCODE:2023-2 GB BWR,Burrow,und,0,UNLOCODE:2023-2 GB BBI,Burrowbridge,und,0,UNLOCODE:2023-2 +GB BPT,Burry Port,und,0,UNLOCODE:2023-2 GB BGH,Burscough,und,0,UNLOCODE:2023-2 GB BUE,Bursledon,und,0,UNLOCODE:2023-2 GB BEM,Burslem,und,0,UNLOCODE:2023-2 diff --git a/harmonize/data/processed/UNLOCODE_2023-2/ActorName.delete.csv b/harmonize/data/processed/UNLOCODE_2023-2/ActorName.delete.csv index 8e83a596..d39eb73f 100644 --- a/harmonize/data/processed/UNLOCODE_2023-2/ActorName.delete.csv +++ b/harmonize/data/processed/UNLOCODE_2023-2/ActorName.delete.csv @@ -253,7 +253,6 @@ FR ORY FR LYS GA MBY GA OGU -GB BPT GB EMA GB ELL GB LGW diff --git a/harmonize/data/processed/UNLOCODE_2023-2/Territory.csv b/harmonize/data/processed/UNLOCODE_2023-2/Territory.csv index 7b16d9a0..024ed778 100644 --- a/harmonize/data/processed/UNLOCODE_2023-2/Territory.csv +++ b/harmonize/data/processed/UNLOCODE_2023-2/Territory.csv @@ -49363,6 +49363,7 @@ GB BVO,604833,-10167,UNLOCODE:2023-2 GB BUF,588500,-29167,UNLOCODE:2023-2 GB B39,508833,-12500,UNLOCODE:2023-2 GB BBI,510667,-29167,UNLOCODE:2023-2 +GB BPT,516833,-42500,UNLOCODE:2023-2 GB BGH,535833,-28333,UNLOCODE:2023-2 GB UTO,524000,11500,UNLOCODE:2023-2 GB KBK,537333,-1333,UNLOCODE:2023-2 diff --git a/harmonize/data/processed/UNLOCODE_2023-2/Territory.delete.csv b/harmonize/data/processed/UNLOCODE_2023-2/Territory.delete.csv index 8e83a596..d39eb73f 100644 --- a/harmonize/data/processed/UNLOCODE_2023-2/Territory.delete.csv +++ b/harmonize/data/processed/UNLOCODE_2023-2/Territory.delete.csv @@ -253,7 +253,6 @@ FR ORY FR LYS GA MBY GA OGU -GB BPT GB EMA GB ELL GB LGW diff --git a/harmonize/scripts/process_unlocode_2023.py b/harmonize/scripts/process_unlocode_2023.py index b3a68597..5ce742c3 100644 --- a/harmonize/scripts/process_unlocode_2023.py +++ b/harmonize/scripts/process_unlocode_2023.py @@ -73,6 +73,13 @@ "type" ] +# Known good UNLOCODEs that we want to keep + +KNOWN_GOOD = [ + 'GB BPT', + 'GB ELL' + 'AU PBN' +] def write_csv(name, rows): with open(f'{OUTPUT_DIR}/{name}.csv', mode='w') as csvfile: @@ -138,7 +145,7 @@ def handle_input_row(row, subdivs): '|.+Airport' ) - if re.search(regex, row["Name"]) or row["ISO 3166-1"].strip() == "XZ": + if (re.search(regex, row["Name"]) or row["ISO 3166-1"].strip() == "XZ") and not actor_id in KNOWN_GOOD: # We want to delete bad existing rows write_output_row("Actor.delete", ["actor_id"], {