tunned-geobr 0.2.5__tar.gz → 0.2.7__tar.gz
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-0.2.5 → tunned_geobr-0.2.7}/PKG-INFO +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/pyproject.toml +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/__init__.py +2 -3
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/list_geobr.py +1 -5
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_ama_anemometric_towers.py +8 -6
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_areas_under_contract.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_biodiesel_plants.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_biomes.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_biomethane_plants.py +3 -2
- tunned_geobr-0.2.5/tunned_geobr/read_census_tract_2022.py → tunned_geobr-0.2.7/tunned_geobr/read_census_tract.py +1 -3
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_comparable_areas.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_compression_stations.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_conservation_units.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_country.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_disaster_risk_area.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_drainage_ducts.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_etanol_plants.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_existent_biomass_ute.py +6 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_existent_fossile_ute.py +7 -3
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_existent_nuclear_ute.py +5 -4
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_existent_substations.py +5 -4
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_existent_transmission_lines.py +6 -5
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_exploration_production_environment.py +6 -8
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_federal_union_areas.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_fuel_bases.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_gas_distribution_pipelines.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_gas_transport_pipelines.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_glp_bases.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_health_region.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_hydroelectric_feasibility_studies.py +9 -8
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_hydroelectric_inventory_aai_studies.py +9 -8
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_immediate_region.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_indigenous_land.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_intermediate_region.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_isolated_systems.py +5 -4
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_meso_region.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_metro_area.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_micro_region.py +1 -1
- tunned_geobr-0.2.5/tunned_geobr/read_municipality_direct.py → tunned_geobr-0.2.7/tunned_geobr/read_municipality.py +1 -1
- tunned_geobr-0.2.7/tunned_geobr/read_municipality_direct.py +127 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_neighborhood.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_og_basement.py +9 -8
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_og_effective_geographic_basin.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_og_ipa_direct_evidence.py +6 -8
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_og_ipa_exploratory_activity.py +9 -8
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_og_ipa_exploratory_intensity.py +3 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_og_ipa_need_for_knowledge.py +6 -8
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_og_ipa_prospectiveness.py +6 -8
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_og_ipa_supply_infrastructure.py +6 -8
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_og_legal_pre_salt_polygon.py +6 -8
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_og_predominant_fluid_type.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_og_probabilistic_effective_basin.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_og_total_ipa.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_og_unconventional_resources.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_oil_and_derivatives_terminal.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_pio_terminals.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_pop_arrangements.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_processing_facilities.py +3 -2
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_region.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_sedimentary_basins.py +6 -8
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_semiarid.py +1 -1
- tunned_geobr-0.2.5/tunned_geobr/read_state_direct.py → tunned_geobr-0.2.7/tunned_geobr/read_state.py +1 -1
- tunned_geobr-0.2.7/tunned_geobr/read_state_direct.py +103 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_urban_area.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_urban_concentrations.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_water_bodies_ana.py +1 -1
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_weighting_area.py +1 -1
- tunned_geobr-0.2.5/tunned_geobr/read_census_tract.py +0 -97
- tunned_geobr-0.2.5/tunned_geobr/read_municipality.py +0 -83
- tunned_geobr-0.2.5/tunned_geobr/read_state.py +0 -88
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/LICENSE.txt +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/README.md +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/__init__.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/read_state.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_list_geobr.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_lookup_muni.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_amazon.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_biomes.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_census_tract.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_comparable_areas.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_conservation_units.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_country.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_disaster_risk_area.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_health_facilities.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_health_region.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_immediate_region.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_indigenous_land.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_intermediate_region.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_meso_region.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_metro_area.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_micro_region.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_municipal_seat.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_municipality.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_neighborhood.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_pop_arrangements.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_region.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_schools.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_semiarid.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_state.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_statistical_grid.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_urban_area.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_urban_concentrations.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_read_weighting_area.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tests/test_utils.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/data/grid_state_correspondence_table.csv +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/lookup_muni.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_amazon.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_amazon_ibas.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_apcb_amazon.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_apcb_caatinga.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_apcb_cerrado_pantanal.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_apcb_mata_atlantica.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_apcb_pampa.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_apcb_zcm.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_archaeological_sites.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_atlantic_forest_ibas.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_atlantic_forest_law_limits.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_baze_sites.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_biosphere_reserves.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_cave_potential.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_climate_aggressiveness.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_ebas.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_existent_cgh.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_existent_eolic.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_existent_pch.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_existent_solar.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_existent_uhe.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_federal_highways.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_fossil_occurrences.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_geographic_regions.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_geology.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_geomorphology.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_gnl_terminals.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_health_facilities.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_heliports.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_mining_processes.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_municipal_seat.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_natural_caves.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_natural_gas_delivery_points.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_natural_gas_processing_hub.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_neighborhoods_2022.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_pan_strategic_areas 2.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_pan_strategic_areas.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_pedology.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_pio_ducts.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_planned_biomass_ute.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_planned_cgh.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_planned_eolic.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_planned_fossile_ute.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_planned_nuclear_ute.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_planned_pch.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_planned_solar.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_planned_substations.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_planned_transmission_lines.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_planned_uhe.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_ports.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_private_aerodromes.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_public_aerodromes.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_quilombola_areas.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_railways.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_rppn.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_schools.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_settlements.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_sigef_properties.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_snci_properties.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_state_highways.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_statistical_grid.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_subsystem_interconnected.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_transmission_lines_ons.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_vegetation.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_waterways.py +0 -0
- {tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/utils.py +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
from .read_state_direct import
|
1
|
+
from .read_state_direct import read_state_direct
|
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 .read_municipality_direct import
|
19
|
+
from .read_municipality_direct import read_municipality_direct
|
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
|
@@ -65,7 +65,6 @@ from .read_water_bodies_ana import read_water_bodies_ana
|
|
65
65
|
from .read_pan_strategic_areas import read_pan_strategic_areas
|
66
66
|
from .read_geographic_regions import read_geographic_regions
|
67
67
|
from .read_biosphere_reserves import read_biosphere_reserves
|
68
|
-
from .read_census_tract_2022 import read_census_tract_2022
|
69
68
|
from .read_neighborhoods_2022 import read_neighborhoods_2022
|
70
69
|
from .read_baze_sites import read_baze_sites
|
71
70
|
from .read_existent_eolic import read_existent_eolic
|
@@ -25,17 +25,13 @@ def list_geobr():
|
|
25
25
|
{"Function": "read_country", "Geography": "Country", "Years": "All", "Source": "IBGE"},
|
26
26
|
{"Function": "read_region", "Geography": "Region", "Years": "All", "Source": "IBGE"},
|
27
27
|
{"Function": "read_state", "Geography": "State", "Years": "All", "Source": "IBGE"},
|
28
|
-
{"Function": "read_state_direct", "Geography": "State", "Years": "All", "Source": "IBGE"},
|
29
28
|
{"Function": "read_meso_region", "Geography": "Meso region", "Years": "1991, 2000, 2010, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020", "Source": "IBGE"},
|
30
29
|
{"Function": "read_micro_region", "Geography": "Micro region", "Years": "1991, 2000, 2010, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020", "Source": "IBGE"},
|
31
30
|
{"Function": "read_immediate_region", "Geography": "Immediate region", "Years": "2017, 2019, 2020", "Source": "IBGE"},
|
32
31
|
{"Function": "read_intermediate_region", "Geography": "Intermediate region", "Years": "2017, 2019, 2020", "Source": "IBGE"},
|
33
32
|
{"Function": "read_municipality", "Geography": "Municipality", "Years": "All", "Source": "IBGE"},
|
34
|
-
{"Function": "read_municipality_direct", "Geography": "Municipality", "Years": "All", "Source": "IBGE"},
|
35
33
|
{"Function": "read_weighting_area", "Geography": "Census weighting area", "Years": "2010", "Source": "IBGE"},
|
36
|
-
{"Function": "read_census_tract", "Geography": "Census tract", "Years": "
|
37
|
-
{"Function": "read_census_tract_2022", "Geography": "Census tract 2022", "Years": "2022", "Source": "IBGE"},
|
38
|
-
{"Function": "read_statistical_grid", "Geography": "Statistical grid", "Years": "2010", "Source": "IBGE"},
|
34
|
+
{"Function": "read_census_tract", "Geography": "Census tract 2022", "Years": "2022", "Source": "IBGE"},
|
39
35
|
{"Function": "read_comparable_areas", "Geography": "Comparable areas", "Years": "1872, 1900, 1911, 1920, 1933, 1940, 1950, 1960, 1970, 1980, 1991, 2000, 2010", "Source": "IBGE"},
|
40
36
|
{"Function": "read_health_region", "Geography": "Health region", "Years": "1991, 1994, 1997, 2001, 2005, 2013", "Source": "DataSUS"},
|
41
37
|
{"Function": "read_metro_area", "Geography": "Metropolitan area", "Years": "All", "Source": "IBGE"},
|
@@ -7,7 +7,7 @@ import warnings
|
|
7
7
|
import shutil
|
8
8
|
|
9
9
|
|
10
|
-
def read_ama_anemometric_towers(simplified=
|
10
|
+
def read_ama_anemometric_towers(simplified=False, verbose=False):
|
11
11
|
"""Download data for AMA Anemometric Towers in Brazil.
|
12
12
|
|
13
13
|
This function downloads, processes, and returns data for AMA Anemometric Towers
|
@@ -45,10 +45,8 @@ def read_ama_anemometric_towers(simplified=True, verbose=False):
|
|
45
45
|
response.raise_for_status()
|
46
46
|
response_json = response.json()
|
47
47
|
|
48
|
-
if "value" not in response_json or not response_json["value"]:
|
49
|
-
raise ValueError("No data found in the response")
|
50
48
|
|
51
|
-
download_url = response_json[
|
49
|
+
download_url = response_json['results'][0]['value']['url']
|
52
50
|
|
53
51
|
if verbose:
|
54
52
|
print(f"Download URL: {download_url}")
|
@@ -74,12 +72,13 @@ def read_ama_anemometric_towers(simplified=True, verbose=False):
|
|
74
72
|
zip_ref.extractall(temp_dir)
|
75
73
|
|
76
74
|
# Find the shapefile
|
77
|
-
|
75
|
+
zip_dir = os.path.join(temp_dir, 'zipfolder')
|
76
|
+
shp_files = [f for f in os.listdir(zip_dir) if f.endswith(".shp")]
|
78
77
|
|
79
78
|
if not shp_files:
|
80
79
|
raise FileNotFoundError("No shapefile found in the downloaded zip file")
|
81
80
|
|
82
|
-
shp_path = os.path.join(
|
81
|
+
shp_path = os.path.join(zip_dir, shp_files[0])
|
83
82
|
|
84
83
|
if verbose:
|
85
84
|
print(f"Reading shapefile from {shp_path}")
|
@@ -117,3 +116,6 @@ def read_ama_anemometric_towers(simplified=True, verbose=False):
|
|
117
116
|
except Exception as e:
|
118
117
|
warnings.warn(f"Unexpected error: {e}")
|
119
118
|
return None
|
119
|
+
|
120
|
+
if __name__ == '__main__':
|
121
|
+
read_ama_anemometric_towers()
|
@@ -86,8 +86,9 @@ def read_areas_under_contract(simplified=False, verbose=False):
|
|
86
86
|
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
87
87
|
zip_ref.extractall(temp_dir)
|
88
88
|
|
89
|
+
zip_dir = os.path.join(temp_dir,'zipfolder')
|
89
90
|
# Find the shapefile in the extracted files
|
90
|
-
shp_files = [f for f in os.listdir(
|
91
|
+
shp_files = [f for f in os.listdir(zip_dir) if f.endswith('.shp')]
|
91
92
|
|
92
93
|
if not shp_files:
|
93
94
|
raise Exception("No shapefile found in the downloaded zip file")
|
@@ -96,7 +97,7 @@ def read_areas_under_contract(simplified=False, verbose=False):
|
|
96
97
|
if verbose:
|
97
98
|
print("Reading shapefile")
|
98
99
|
|
99
|
-
shp_path = os.path.join(
|
100
|
+
shp_path = os.path.join(zip_dir, shp_files[0])
|
100
101
|
gdf = gpd.read_file(shp_path)
|
101
102
|
|
102
103
|
# Convert to SIRGAS 2000 (EPSG:4674)
|
@@ -85,8 +85,9 @@ def read_biodiesel_plants(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_biodiesel_plants(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)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from geobr.utils import select_metadata, download_gpkg
|
2
2
|
|
3
3
|
|
4
|
-
def read_biomes(year=2019, simplified=
|
4
|
+
def read_biomes(year=2019, simplified=False, verbose=False):
|
5
5
|
""" Download official data of Brazilian biomes as an sf object.
|
6
6
|
|
7
7
|
This data set includes polygons of all biomes present in Brazilian territory and coastal area.
|
@@ -85,8 +85,9 @@ def read_biomethane_plants(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_biomethane_plants(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)
|
@@ -5,7 +5,7 @@ import requests
|
|
5
5
|
import subprocess
|
6
6
|
from io import BytesIO
|
7
7
|
|
8
|
-
def
|
8
|
+
def read_census_tract(simplified=False):
|
9
9
|
"""Download Brazilian Census Tracts data from IBGE (2022 Census).
|
10
10
|
|
11
11
|
This function downloads and processes the Brazilian Census Tracts data
|
@@ -97,5 +97,3 @@ def read_census_tract_2022(simplified=False):
|
|
97
97
|
|
98
98
|
return gdf
|
99
99
|
|
100
|
-
if __name__ == '__main__':
|
101
|
-
read_census_tract_2022()
|
@@ -2,7 +2,7 @@ from geobr.utils import select_metadata, download_gpkg
|
|
2
2
|
|
3
3
|
|
4
4
|
def read_comparable_areas(
|
5
|
-
start_year=1970, end_year=2010, simplified=
|
5
|
+
start_year=1970, end_year=2010, simplified=False, verbose=False
|
6
6
|
):
|
7
7
|
r"""Download spatial data of historically comparable municipalities
|
8
8
|
|
@@ -85,8 +85,9 @@ def read_compression_stations(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_compression_stations(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)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from geobr.utils import select_metadata, download_gpkg
|
2
2
|
|
3
3
|
|
4
|
-
def read_conservation_units(date=201909, simplified=
|
4
|
+
def read_conservation_units(date=201909, simplified=False, verbose=False):
|
5
5
|
""" Download official data of Brazilian conservation untis as an sf object.
|
6
6
|
|
7
7
|
This data set covers the whole of Brazil and it includes the polygons of all conservation untis present in Brazilian
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from geobr.utils import select_metadata, download_gpkg
|
2
2
|
|
3
3
|
|
4
|
-
def read_country(year=2010, simplified=
|
4
|
+
def read_country(year=2010, simplified=False, verbose=False):
|
5
5
|
""" Download shape file of Brazil as sf objects. Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000" and CRS(4674)
|
6
6
|
|
7
7
|
@param year Year of the data (defaults to 2010)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from geobr.utils import select_metadata, download_gpkg
|
2
2
|
|
3
3
|
|
4
|
-
def read_disaster_risk_area(year=2010, simplified=
|
4
|
+
def read_disaster_risk_area(year=2010, simplified=False, verbose=False):
|
5
5
|
""" Download official data of disaster risk areas as an sf object.
|
6
6
|
|
7
7
|
This function reads the the official data of disaster risk areas in Brazil. It specifically focuses
|
@@ -85,8 +85,9 @@ def read_drainage_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_drainage_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)
|
@@ -85,8 +85,9 @@ def read_etanol_plants(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_etanol_plants(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)
|
@@ -85,8 +85,9 @@ def read_existent_biomass_ute(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_existent_biomass_ute(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)
|
@@ -126,3 +127,6 @@ def read_existent_biomass_ute(simplified=False, verbose=False):
|
|
126
127
|
|
127
128
|
except Exception as e:
|
128
129
|
raise Exception(f"Failed to download or process existing biomass thermoelectric power plants data: {str(e)}")
|
130
|
+
|
131
|
+
if __name__ == '__main__':
|
132
|
+
read_existent_biomass_ute()
|
@@ -85,8 +85,9 @@ def read_existent_fossile_ute(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_existent_fossile_ute(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)
|
@@ -120,9 +121,12 @@ def read_existent_fossile_ute(simplified=False, verbose=False):
|
|
120
121
|
gdf = gdf[cols_available]
|
121
122
|
|
122
123
|
if verbose:
|
123
|
-
print("Finished processing existing
|
124
|
+
print("Finished processing existing biomass thermoelectric power plants data")
|
124
125
|
|
125
126
|
return gdf
|
126
127
|
|
127
128
|
except Exception as e:
|
128
129
|
raise Exception(f"Failed to download or process existing fossil thermoelectric power plants data: {str(e)}")
|
130
|
+
|
131
|
+
if __name__ == '__main__':
|
132
|
+
read_existent_fossile_ute()
|
@@ -85,8 +85,9 @@ def read_existent_nuclear_ute(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_existent_nuclear_ute(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_existent_nuclear_ute(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', 'POTENCIA', 'PROPRIETAR', 'UF', 'MUNICIPIO', 'geometry']
|
115
|
+
cols_to_keep = ['NOME', 'POTENCIA', 'COMBUSTIVE', 'PROPRIETAR', '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_existent_nuclear_ute(simplified=False, verbose=False):
|
|
120
121
|
gdf = gdf[cols_available]
|
121
122
|
|
122
123
|
if verbose:
|
123
|
-
print("Finished processing existing
|
124
|
+
print("Finished processing existing biomass thermoelectric power plants data")
|
124
125
|
|
125
126
|
return gdf
|
126
127
|
|
@@ -85,8 +85,9 @@ def read_existent_substations(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_existent_substations(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_existent_substations(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', '
|
115
|
+
cols_to_keep = ['NOME', 'POTENCIA', 'COMBUSTIVE', 'PROPRIETAR', '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_existent_substations(simplified=False, verbose=False):
|
|
120
121
|
gdf = gdf[cols_available]
|
121
122
|
|
122
123
|
if verbose:
|
123
|
-
print("Finished processing existing
|
124
|
+
print("Finished processing existing biomass thermoelectric power plants data")
|
124
125
|
|
125
126
|
return gdf
|
126
127
|
|
@@ -67,7 +67,7 @@ def read_existent_transmission_lines(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, "existent_lt.zip")
|
71
71
|
if verbose:
|
72
72
|
print("Downloading zip file")
|
73
73
|
|
@@ -85,8 +85,9 @@ def read_existent_transmission_lines(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_existent_transmission_lines(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_existent_transmission_lines(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', '
|
115
|
+
cols_to_keep = ['NOME', 'POTENCIA', 'COMBUSTIVE', 'PROPRIETAR', '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_existent_transmission_lines(simplified=False, verbose=False):
|
|
120
121
|
gdf = gdf[cols_available]
|
121
122
|
|
122
123
|
if verbose:
|
123
|
-
print("Finished processing existing
|
124
|
+
print("Finished processing existing biomass thermoelectric power plants data")
|
124
125
|
|
125
126
|
return gdf
|
126
127
|
|
{tunned_geobr-0.2.5 → tunned_geobr-0.2.7}/tunned_geobr/read_exploration_production_environment.py
RENAMED
@@ -7,7 +7,7 @@ import warnings
|
|
7
7
|
import shutil
|
8
8
|
|
9
9
|
|
10
|
-
def read_exploration_production_environment(simplified=
|
10
|
+
def read_exploration_production_environment(simplified=False, verbose=False):
|
11
11
|
"""Download data for Exploration and Production Environment in Brazil.
|
12
12
|
|
13
13
|
This function downloads, processes, and returns data for Exploration and Production Environment
|
@@ -45,10 +45,7 @@ def read_exploration_production_environment(simplified=True, verbose=False):
|
|
45
45
|
response.raise_for_status()
|
46
46
|
response_json = response.json()
|
47
47
|
|
48
|
-
|
49
|
-
raise ValueError("No data found in the response")
|
50
|
-
|
51
|
-
download_url = response_json["value"]["itemUrl"]
|
48
|
+
download_url = response_json['results'][0]['value']['url']
|
52
49
|
|
53
50
|
if verbose:
|
54
51
|
print(f"Download URL: {download_url}")
|
@@ -74,12 +71,13 @@ def read_exploration_production_environment(simplified=True, verbose=False):
|
|
74
71
|
zip_ref.extractall(temp_dir)
|
75
72
|
|
76
73
|
# Find the shapefile
|
77
|
-
|
74
|
+
zip_dir = os.path.join(temp_dir, 'zipfolder')
|
75
|
+
shp_files = [f for f in os.listdir(zip_dir) if f.endswith(".shp")]
|
78
76
|
|
79
77
|
if not shp_files:
|
80
78
|
raise FileNotFoundError("No shapefile found in the downloaded zip file")
|
81
79
|
|
82
|
-
shp_path = os.path.join(
|
80
|
+
shp_path = os.path.join(zip_dir, shp_files[0])
|
83
81
|
|
84
82
|
if verbose:
|
85
83
|
print(f"Reading shapefile from {shp_path}")
|
@@ -99,7 +97,7 @@ def read_exploration_production_environment(simplified=True, verbose=False):
|
|
99
97
|
essential_cols = ["geometry"]
|
100
98
|
|
101
99
|
# Add any other essential columns that exist in the dataset
|
102
|
-
for col in ["NOME", "
|
100
|
+
for col in ["NOME", "MUNICIPIO", "UF", "ALTURA", "SITUACAO"]:
|
103
101
|
if col in gdf.columns:
|
104
102
|
essential_cols.append(col)
|
105
103
|
|
@@ -86,8 +86,9 @@ def read_federal_union_areas(simplified=False, verbose=False):
|
|
86
86
|
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
87
87
|
zip_ref.extractall(temp_dir)
|
88
88
|
|
89
|
+
zip_dir = os.path.join(temp_dir,'zipfolder')
|
89
90
|
# Find the shapefile in the extracted files
|
90
|
-
shp_files = [f for f in os.listdir(
|
91
|
+
shp_files = [f for f in os.listdir(zip_dir) if f.endswith('.shp')]
|
91
92
|
|
92
93
|
if not shp_files:
|
93
94
|
raise Exception("No shapefile found in the downloaded zip file")
|
@@ -96,7 +97,7 @@ def read_federal_union_areas(simplified=False, verbose=False):
|
|
96
97
|
if verbose:
|
97
98
|
print("Reading shapefile")
|
98
99
|
|
99
|
-
shp_path = os.path.join(
|
100
|
+
shp_path = os.path.join(zip_dir, shp_files[0])
|
100
101
|
gdf = gpd.read_file(shp_path)
|
101
102
|
|
102
103
|
# Convert to SIRGAS 2000 (EPSG:4674)
|
@@ -85,8 +85,9 @@ def read_fuel_bases(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_fuel_bases(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)
|
@@ -85,8 +85,9 @@ def read_gas_distribution_pipelines(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_gas_distribution_pipelines(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)
|
@@ -85,8 +85,9 @@ def read_gas_transport_pipelines(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_gas_transport_pipelines(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)
|
@@ -85,8 +85,9 @@ def read_glp_bases(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_glp_bases(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)
|