From 94d79cf214968a725a1911b22d4a8bc4954060e2 Mon Sep 17 00:00:00 2001 From: Prashanth Radhakrishnan Date: Thu, 14 Sep 2023 14:29:26 -0700 Subject: [PATCH] lint --- scripts/un/boundaries/country_boundaries.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/un/boundaries/country_boundaries.py b/scripts/un/boundaries/country_boundaries.py index f9457de000..b833db9c3d 100644 --- a/scripts/un/boundaries/country_boundaries.py +++ b/scripts/un/boundaries/country_boundaries.py @@ -64,6 +64,7 @@ 'southamerica': 10, } + # # Code from @chejennifer. # @@ -199,9 +200,10 @@ def extract_country_geojson(self, all_countries_df, existing_codes): print(f'Exporting geojson to {self.output_dir}') col = 'iso3cd' for country_code in existing_codes: - country_data = all_countries_df[(all_countries_df[col] == country_code) & - (all_countries_df['geometry'].geom_type != 'LineString') & - (all_countries_df['geometry'].geom_type != 'MultiLineString')] + country_data = all_countries_df[ + (all_countries_df[col] == country_code) & + (all_countries_df['geometry'].geom_type != 'LineString') & + (all_countries_df['geometry'].geom_type != 'MultiLineString')] country_data = country_data.dissolve( by=col) # Join multiple rows into a single shape self._simplify_json(country_code, country_data) @@ -233,7 +235,8 @@ def build_cache(self, existing_codes): print(f'Missing geojson for {child}') continue geo = self._geojson(code, dp_level) - feature = get_geojson_feature(child, child2name.get(child, ''), geo) + feature = get_geojson_feature(child, child2name.get(child, ''), + geo) if feature: features.append(feature) result = {