tunned-geobr 0.2.7__py3-none-any.whl → 0.2.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tunned_geobr/__init__.py +2 -2
- tunned_geobr/read_gnl_terminals.py +5 -4
- tunned_geobr/read_natural_gas_delivery_points.py +6 -5
- tunned_geobr/read_natural_gas_processing_hub.py +6 -5
- tunned_geobr/read_pio_ducts.py +5 -4
- {tunned_geobr-0.2.7.dist-info → tunned_geobr-0.2.10.dist-info}/METADATA +1 -1
- {tunned_geobr-0.2.7.dist-info → tunned_geobr-0.2.10.dist-info}/RECORD +10 -10
- {tunned_geobr-0.2.7.dist-info → tunned_geobr-0.2.10.dist-info}/WHEEL +0 -0
- {tunned_geobr-0.2.7.dist-info → tunned_geobr-0.2.10.dist-info}/entry_points.txt +0 -0
- {tunned_geobr-0.2.7.dist-info → tunned_geobr-0.2.10.dist-info}/licenses/LICENSE.txt +0 -0
tunned_geobr/__init__.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from .
|
1
|
+
from .read_state import read_state
|
2
2
|
from .read_amazon import read_amazon
|
3
3
|
from .read_biomes import read_biomes
|
4
4
|
from .read_country import read_country
|
@@ -16,7 +16,7 @@ from .list_geobr import list_geobr
|
|
16
16
|
from .read_census_tract import read_census_tract
|
17
17
|
from .read_meso_region import read_meso_region
|
18
18
|
from .read_micro_region import read_micro_region
|
19
|
-
from .
|
19
|
+
from .read_municipality import read_municipality
|
20
20
|
from .read_weighting_area import read_weighting_area
|
21
21
|
from .read_neighborhood import read_neighborhood
|
22
22
|
from .read_health_region import read_health_region
|
@@ -85,8 +85,9 @@ def read_gnl_terminals(simplified=False, verbose=False):
|
|
85
85
|
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
86
86
|
zip_ref.extractall(temp_dir)
|
87
87
|
|
88
|
+
zip_dir = os.path.join(temp_dir,'zipfolder')
|
88
89
|
# Find the shapefile in the extracted files
|
89
|
-
shp_files = [f for f in os.listdir(
|
90
|
+
shp_files = [f for f in os.listdir(zip_dir) if f.endswith('.shp')]
|
90
91
|
|
91
92
|
if not shp_files:
|
92
93
|
raise Exception("No shapefile found in the downloaded zip file")
|
@@ -95,7 +96,7 @@ def read_gnl_terminals(simplified=False, verbose=False):
|
|
95
96
|
if verbose:
|
96
97
|
print("Reading shapefile")
|
97
98
|
|
98
|
-
shp_path = os.path.join(
|
99
|
+
shp_path = os.path.join(zip_dir, shp_files[0])
|
99
100
|
gdf = gpd.read_file(shp_path)
|
100
101
|
|
101
102
|
# Convert to SIRGAS 2000 (EPSG:4674)
|
@@ -111,7 +112,7 @@ def read_gnl_terminals(simplified=False, verbose=False):
|
|
111
112
|
|
112
113
|
# Select only the most important columns
|
113
114
|
# Adjust these columns based on the actual data structure
|
114
|
-
cols_to_keep = ['NOME', 'EMPRESA', '
|
115
|
+
cols_to_keep = ['NOME', 'EMPRESA', 'TIPO', 'CAPACIDADE', 'UF', 'MUNICIPIO', 'geometry']
|
115
116
|
cols_available = [col for col in cols_to_keep if col in gdf.columns]
|
116
117
|
|
117
118
|
if not cols_available:
|
@@ -120,7 +121,7 @@ def read_gnl_terminals(simplified=False, verbose=False):
|
|
120
121
|
gdf = gdf[cols_available]
|
121
122
|
|
122
123
|
if verbose:
|
123
|
-
print("Finished processing
|
124
|
+
print("Finished processing oil and derivatives terminals data")
|
124
125
|
|
125
126
|
return gdf
|
126
127
|
|
@@ -67,7 +67,7 @@ def read_natural_gas_delivery_points(simplified=False, verbose=False):
|
|
67
67
|
# Create a temporary directory to store the downloaded files
|
68
68
|
with tempfile.TemporaryDirectory() as temp_dir:
|
69
69
|
# Download the zip file
|
70
|
-
zip_path = os.path.join(temp_dir, "
|
70
|
+
zip_path = os.path.join(temp_dir, "delivery_points.zip")
|
71
71
|
if verbose:
|
72
72
|
print("Downloading zip file")
|
73
73
|
|
@@ -85,8 +85,9 @@ def read_natural_gas_delivery_points(simplified=False, verbose=False):
|
|
85
85
|
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
86
86
|
zip_ref.extractall(temp_dir)
|
87
87
|
|
88
|
+
zip_dir = os.path.join(temp_dir,'zipfolder')
|
88
89
|
# Find the shapefile in the extracted files
|
89
|
-
shp_files = [f for f in os.listdir(
|
90
|
+
shp_files = [f for f in os.listdir(zip_dir) if f.endswith('.shp')]
|
90
91
|
|
91
92
|
if not shp_files:
|
92
93
|
raise Exception("No shapefile found in the downloaded zip file")
|
@@ -95,7 +96,7 @@ def read_natural_gas_delivery_points(simplified=False, verbose=False):
|
|
95
96
|
if verbose:
|
96
97
|
print("Reading shapefile")
|
97
98
|
|
98
|
-
shp_path = os.path.join(
|
99
|
+
shp_path = os.path.join(zip_dir, shp_files[0])
|
99
100
|
gdf = gpd.read_file(shp_path)
|
100
101
|
|
101
102
|
# Convert to SIRGAS 2000 (EPSG:4674)
|
@@ -111,7 +112,7 @@ def read_natural_gas_delivery_points(simplified=False, verbose=False):
|
|
111
112
|
|
112
113
|
# Select only the most important columns
|
113
114
|
# Adjust these columns based on the actual data structure
|
114
|
-
cols_to_keep = ['NOME', 'TIPO', 'UF', 'MUNICIPIO', 'geometry']
|
115
|
+
cols_to_keep = ['NOME', 'EMPRESA', 'TIPO', 'CAPACIDADE', 'UF', 'MUNICIPIO', 'geometry']
|
115
116
|
cols_available = [col for col in cols_to_keep if col in gdf.columns]
|
116
117
|
|
117
118
|
if not cols_available:
|
@@ -120,7 +121,7 @@ def read_natural_gas_delivery_points(simplified=False, verbose=False):
|
|
120
121
|
gdf = gdf[cols_available]
|
121
122
|
|
122
123
|
if verbose:
|
123
|
-
print("Finished processing
|
124
|
+
print("Finished processing oil and derivatives terminals data")
|
124
125
|
|
125
126
|
return gdf
|
126
127
|
|
@@ -67,7 +67,7 @@ def read_natural_gas_processing_hub(simplified=False, verbose=False):
|
|
67
67
|
# Create a temporary directory to store the downloaded files
|
68
68
|
with tempfile.TemporaryDirectory() as temp_dir:
|
69
69
|
# Download the zip file
|
70
|
-
zip_path = os.path.join(temp_dir, "
|
70
|
+
zip_path = os.path.join(temp_dir, "processing_hubs.zip")
|
71
71
|
if verbose:
|
72
72
|
print("Downloading zip file")
|
73
73
|
|
@@ -85,8 +85,9 @@ def read_natural_gas_processing_hub(simplified=False, verbose=False):
|
|
85
85
|
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
86
86
|
zip_ref.extractall(temp_dir)
|
87
87
|
|
88
|
+
zip_dir = os.path.join(temp_dir,'zipfolder')
|
88
89
|
# Find the shapefile in the extracted files
|
89
|
-
shp_files = [f for f in os.listdir(
|
90
|
+
shp_files = [f for f in os.listdir(zip_dir) if f.endswith('.shp')]
|
90
91
|
|
91
92
|
if not shp_files:
|
92
93
|
raise Exception("No shapefile found in the downloaded zip file")
|
@@ -95,7 +96,7 @@ def read_natural_gas_processing_hub(simplified=False, verbose=False):
|
|
95
96
|
if verbose:
|
96
97
|
print("Reading shapefile")
|
97
98
|
|
98
|
-
shp_path = os.path.join(
|
99
|
+
shp_path = os.path.join(zip_dir, shp_files[0])
|
99
100
|
gdf = gpd.read_file(shp_path)
|
100
101
|
|
101
102
|
# Convert to SIRGAS 2000 (EPSG:4674)
|
@@ -111,7 +112,7 @@ def read_natural_gas_processing_hub(simplified=False, verbose=False):
|
|
111
112
|
|
112
113
|
# Select only the most important columns
|
113
114
|
# Adjust these columns based on the actual data structure
|
114
|
-
cols_to_keep = ['NOME', 'EMPRESA', 'CAPACIDADE', 'UF', 'MUNICIPIO', 'geometry']
|
115
|
+
cols_to_keep = ['NOME', 'EMPRESA', 'TIPO', 'CAPACIDADE', 'UF', 'MUNICIPIO', 'geometry']
|
115
116
|
cols_available = [col for col in cols_to_keep if col in gdf.columns]
|
116
117
|
|
117
118
|
if not cols_available:
|
@@ -120,7 +121,7 @@ def read_natural_gas_processing_hub(simplified=False, verbose=False):
|
|
120
121
|
gdf = gdf[cols_available]
|
121
122
|
|
122
123
|
if verbose:
|
123
|
-
print("Finished processing
|
124
|
+
print("Finished processing oil and derivatives terminals data")
|
124
125
|
|
125
126
|
return gdf
|
126
127
|
|
tunned_geobr/read_pio_ducts.py
CHANGED
@@ -85,8 +85,9 @@ def read_pio_ducts(simplified=False, verbose=False):
|
|
85
85
|
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
86
86
|
zip_ref.extractall(temp_dir)
|
87
87
|
|
88
|
+
zip_dir = os.path.join(temp_dir,'zipfolder')
|
88
89
|
# Find the shapefile in the extracted files
|
89
|
-
shp_files = [f for f in os.listdir(
|
90
|
+
shp_files = [f for f in os.listdir(zip_dir) if f.endswith('.shp')]
|
90
91
|
|
91
92
|
if not shp_files:
|
92
93
|
raise Exception("No shapefile found in the downloaded zip file")
|
@@ -95,7 +96,7 @@ def read_pio_ducts(simplified=False, verbose=False):
|
|
95
96
|
if verbose:
|
96
97
|
print("Reading shapefile")
|
97
98
|
|
98
|
-
shp_path = os.path.join(
|
99
|
+
shp_path = os.path.join(zip_dir, shp_files[0])
|
99
100
|
gdf = gpd.read_file(shp_path)
|
100
101
|
|
101
102
|
# Convert to SIRGAS 2000 (EPSG:4674)
|
@@ -111,7 +112,7 @@ def read_pio_ducts(simplified=False, verbose=False):
|
|
111
112
|
|
112
113
|
# Select only the most important columns
|
113
114
|
# Adjust these columns based on the actual data structure
|
114
|
-
cols_to_keep = ['NOME', 'EMPRESA', '
|
115
|
+
cols_to_keep = ['NOME', 'EMPRESA', 'TIPO', 'CAPACIDADE', 'UF', 'MUNICIPIO', 'geometry']
|
115
116
|
cols_available = [col for col in cols_to_keep if col in gdf.columns]
|
116
117
|
|
117
118
|
if not cols_available:
|
@@ -120,7 +121,7 @@ def read_pio_ducts(simplified=False, verbose=False):
|
|
120
121
|
gdf = gdf[cols_available]
|
121
122
|
|
122
123
|
if verbose:
|
123
|
-
print("Finished processing
|
124
|
+
print("Finished processing oil and derivatives terminals data")
|
124
125
|
|
125
126
|
return gdf
|
126
127
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
tunned_geobr-0.2.
|
2
|
-
tunned_geobr-0.2.
|
3
|
-
tunned_geobr-0.2.
|
4
|
-
tunned_geobr-0.2.
|
5
|
-
tunned_geobr/__init__.py,sha256=
|
1
|
+
tunned_geobr-0.2.10.dist-info/METADATA,sha256=S09EYfuUDkadt5dMe0WbbxWP8D_BOm49QafErbSG3mc,5019
|
2
|
+
tunned_geobr-0.2.10.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
3
|
+
tunned_geobr-0.2.10.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
4
|
+
tunned_geobr-0.2.10.dist-info/licenses/LICENSE.txt,sha256=mECZRcbde3HssOKe1Co4zgqBLGVN0OWpTsEy3LIbcRA,75
|
5
|
+
tunned_geobr/__init__.py,sha256=6PWQAn9Swox7mMNRrwD42BX04qfR11_Vm1599EOQnP0,7281
|
6
6
|
tunned_geobr/data/grid_state_correspondence_table.csv,sha256=FpkBuX_-lRXQ1yBrQODxQgG9oha9Fd8A8zGKfdsDAmk,2660
|
7
7
|
tunned_geobr/list_geobr.py,sha256=bJJ5Vk25jejfmXDRnjt_QYxrIeO7gOOU8pLDvIBwC5U,16860
|
8
8
|
tunned_geobr/lookup_muni.py,sha256=ny1zU4i6OagvL4Mrc6XQWPgn2RrJa_mXlKXh81oVYsM,3462
|
@@ -56,7 +56,7 @@ tunned_geobr/read_geographic_regions.py,sha256=11ZDKhfYrUUbmcROMipdJHglHLgXm6sZX
|
|
56
56
|
tunned_geobr/read_geology.py,sha256=dzMUN1RYD4VcGOkle8iJtNZGiPQJ8x9kEdDirKgS-9Y,2766
|
57
57
|
tunned_geobr/read_geomorphology.py,sha256=7TFy9CYLUL0lFBTKT_lZeUL7r5c9mWp64VpXUwKTLHY,2843
|
58
58
|
tunned_geobr/read_glp_bases.py,sha256=4-cgL0NU9bkKMTddMfaTedjzV5OnzEVr4iWglACU7x4,5190
|
59
|
-
tunned_geobr/read_gnl_terminals.py,sha256=
|
59
|
+
tunned_geobr/read_gnl_terminals.py,sha256=7pPyTPv8RRN-gvujbwwm-gw5j8N69MMbrIB91Lps2sA,5259
|
60
60
|
tunned_geobr/read_health_facilities.py,sha256=NEU2BGEBmIPbT0Z02EOKLtfC9-_AmNrIHaD-83kmh5Q,2012
|
61
61
|
tunned_geobr/read_health_region.py,sha256=zGkoQZ_mf-snBEy00RUd3GF_pJu6PIoqvcbS_i_tQgU,1843
|
62
62
|
tunned_geobr/read_heliports.py,sha256=liLQ5J7UgHcxcsx7xpkh_4oxxh4rNz7hprTwnWSViw4,2791
|
@@ -74,8 +74,8 @@ tunned_geobr/read_municipal_seat.py,sha256=9Vi-q1jzY8n086O-nNY1sVkVzV_NZbdzE5juo
|
|
74
74
|
tunned_geobr/read_municipality.py,sha256=dZM1BVi3U9ZvasLADV-ciKVr9R4o92dRowpEVdVkvYw,5651
|
75
75
|
tunned_geobr/read_municipality_direct.py,sha256=VrZR_5__DsV5IbbX-sr56WT-P4M_tVdnmJp-QgdkmFg,5658
|
76
76
|
tunned_geobr/read_natural_caves.py,sha256=-XjoRxhT_yYy0fZu87S6RRUZ-cyaWPqWqOrd9Y8ERKo,3073
|
77
|
-
tunned_geobr/read_natural_gas_delivery_points.py,sha256=
|
78
|
-
tunned_geobr/read_natural_gas_processing_hub.py,sha256=
|
77
|
+
tunned_geobr/read_natural_gas_delivery_points.py,sha256=nJJmqbJJ5Xx2P2wVL9yXdGLuPI0O8pCCL9zDkHQtZOs,5387
|
78
|
+
tunned_geobr/read_natural_gas_processing_hub.py,sha256=qI5o-4TmPfi3h0gYNWjeMR5GsRAq-fsXoB62llqt9RA,5367
|
79
79
|
tunned_geobr/read_neighborhood.py,sha256=2QWMz-TVkTJmbVQ_aKNyh2NNJ6KIJqnrPL1CrB9Oqdw,1085
|
80
80
|
tunned_geobr/read_neighborhoods_2022.py,sha256=EX1-5CM3tNe05HE1F5r3YtZ-66X_NC67u_DzrmzKvTc,3952
|
81
81
|
tunned_geobr/read_og_basement.py,sha256=nwUOn-BMYC3mvvP9uTBLYly00drIw6CwU5lHJeOdi-Y,4617
|
@@ -95,7 +95,7 @@ tunned_geobr/read_oil_and_derivatives_terminal.py,sha256=-BzLd9WpWWgH1pUaz9y16rg
|
|
95
95
|
tunned_geobr/read_pan_strategic_areas 2.py,sha256=alORMUQbnW_ER3_uOzqTbUaSyr-Y3Mg_bsoykxiGDMA,2654
|
96
96
|
tunned_geobr/read_pan_strategic_areas.py,sha256=EP-Qtx_q4lE3lsNNIUaoQc5j-9aKBkxY2BizTwWY3ZY,3375
|
97
97
|
tunned_geobr/read_pedology.py,sha256=xk_yOxIOVTHip4kj2y1xgO4fHKn8e1dv2cNOayXCtKk,2783
|
98
|
-
tunned_geobr/read_pio_ducts.py,sha256=
|
98
|
+
tunned_geobr/read_pio_ducts.py,sha256=L_lDeDU4VrSnUISoQ7afe5biseja0R6xQFMkZMTQJIc,5214
|
99
99
|
tunned_geobr/read_pio_terminals.py,sha256=uslr1Zy2bNaxAHbsieMkyWND8zLvJpWOkdey3-4i1Xc,5246
|
100
100
|
tunned_geobr/read_planned_biomass_ute.py,sha256=AEPmAuhBZyicYA_nATsMhhHEmJ6xnUNQZtRXkE67cLk,7557
|
101
101
|
tunned_geobr/read_planned_cgh.py,sha256=Tms3Ed9tYnXKqua7fHAd8PTxhm7MUv88Mq_ZU9ny5go,7458
|
@@ -135,4 +135,4 @@ tunned_geobr/read_water_bodies_ana.py,sha256=Z-dpTPVgRHVndTeSFxx8uXn7ufMg2jm0Dlz
|
|
135
135
|
tunned_geobr/read_waterways.py,sha256=mEdoVogYWr5EYZ8bE3xMCVWyLrHYU7xTL2lUE0XbDAM,2951
|
136
136
|
tunned_geobr/read_weighting_area.py,sha256=m2X5Ua3jRqLlkqCQbIzR2jmo58pzqkyR3UYcGtgy20E,2325
|
137
137
|
tunned_geobr/utils.py,sha256=WT9PSGWvcERjj3yhfTvyWSE5ZiEjO4tYK5xIj5jJCg8,8170
|
138
|
-
tunned_geobr-0.2.
|
138
|
+
tunned_geobr-0.2.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|