tunned-geobr 0.2.4__tar.gz → 0.2.5__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.4 → tunned_geobr-0.2.5}/PKG-INFO +1 -1
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/pyproject.toml +1 -1
- tunned_geobr-0.2.4/tunned_geobr/read_quilombola_areas.py +0 -85
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/LICENSE.txt +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/README.md +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/__init__.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/read_state.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_list_geobr.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_lookup_muni.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_amazon.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_biomes.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_census_tract.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_comparable_areas.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_conservation_units.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_country.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_disaster_risk_area.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_health_facilities.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_health_region.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_immediate_region.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_indigenous_land.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_intermediate_region.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_meso_region.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_metro_area.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_micro_region.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_municipal_seat.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_municipality.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_neighborhood.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_pop_arrangements.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_region.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_schools.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_semiarid.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_state.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_statistical_grid.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_urban_area.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_urban_concentrations.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_read_weighting_area.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tests/test_utils.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/__init__.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/data/grid_state_correspondence_table.csv +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/list_geobr.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/lookup_muni.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_ama_anemometric_towers.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_amazon.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_amazon_ibas.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_apcb_amazon.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_apcb_caatinga.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_apcb_cerrado_pantanal.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_apcb_mata_atlantica.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_apcb_pampa.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_apcb_zcm.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_archaeological_sites.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_areas_under_contract.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_atlantic_forest_ibas.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_atlantic_forest_law_limits.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_baze_sites.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_biodiesel_plants.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_biomes.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_biomethane_plants.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_biosphere_reserves.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_cave_potential.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_census_tract.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_census_tract_2022.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_climate_aggressiveness.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_comparable_areas.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_compression_stations.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_conservation_units.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_country.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_disaster_risk_area.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_drainage_ducts.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_ebas.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_etanol_plants.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_existent_biomass_ute.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_existent_cgh.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_existent_eolic.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_existent_fossile_ute.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_existent_nuclear_ute.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_existent_pch.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_existent_solar.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_existent_substations.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_existent_transmission_lines.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_existent_uhe.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_exploration_production_environment.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_federal_highways.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_federal_union_areas.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_fossil_occurrences.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_fuel_bases.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_gas_distribution_pipelines.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_gas_transport_pipelines.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_geographic_regions.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_geology.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_geomorphology.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_glp_bases.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_gnl_terminals.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_health_facilities.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_health_region.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_heliports.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_hydroelectric_feasibility_studies.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_hydroelectric_inventory_aai_studies.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_immediate_region.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_indigenous_land.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_intermediate_region.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_isolated_systems.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_meso_region.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_metro_area.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_micro_region.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_mining_processes.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_municipal_seat.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_municipality.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_municipality_direct.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_natural_caves.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_natural_gas_delivery_points.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_natural_gas_processing_hub.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_neighborhood.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_neighborhoods_2022.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_basement.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_effective_geographic_basin.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_ipa_direct_evidence.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_ipa_exploratory_activity.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_ipa_exploratory_intensity.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_ipa_need_for_knowledge.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_ipa_prospectiveness.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_ipa_supply_infrastructure.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_legal_pre_salt_polygon.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_predominant_fluid_type.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_probabilistic_effective_basin.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_total_ipa.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_unconventional_resources.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_oil_and_derivatives_terminal.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_pan_strategic_areas 2.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_pan_strategic_areas.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_pedology.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_pio_ducts.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_pio_terminals.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_planned_biomass_ute.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_planned_cgh.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_planned_eolic.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_planned_fossile_ute.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_planned_nuclear_ute.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_planned_pch.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_planned_solar.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_planned_substations.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_planned_transmission_lines.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_planned_uhe.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_pop_arrangements.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_ports.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_private_aerodromes.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_processing_facilities.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_public_aerodromes.py +0 -0
- /tunned_geobr-0.2.4/tunned_geobr/read_quilombola_areas_temp.py → /tunned_geobr-0.2.5/tunned_geobr/read_quilombola_areas.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_railways.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_region.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_rppn.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_schools.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_sedimentary_basins.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_semiarid.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_settlements.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_sigef_properties.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_snci_properties.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_state.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_state_direct.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_state_highways.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_statistical_grid.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_subsystem_interconnected.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_transmission_lines_ons.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_urban_area.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_urban_concentrations.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_vegetation.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_water_bodies_ana.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_waterways.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_weighting_area.py +0 -0
- {tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/utils.py +0 -0
@@ -1,85 +0,0 @@
|
|
1
|
-
import geopandas as gpd
|
2
|
-
import tempfile
|
3
|
-
import os
|
4
|
-
import requests
|
5
|
-
from zipfile import ZipFile
|
6
|
-
from io import BytesIO
|
7
|
-
|
8
|
-
def read_settlements(simplified=False):
|
9
|
-
"""Download official settlements data from INCRA.
|
10
|
-
|
11
|
-
This function downloads and processes data about settlements (assentamentos)
|
12
|
-
from INCRA (Instituto Nacional de Colonização e Reforma Agrária).
|
13
|
-
Original source: INCRA - Certificação de Imóveis Rurais
|
14
|
-
|
15
|
-
Parameters
|
16
|
-
----------
|
17
|
-
simplified : boolean, by default False
|
18
|
-
If True, returns a simplified version of the dataset with fewer columns
|
19
|
-
|
20
|
-
Returns
|
21
|
-
-------
|
22
|
-
gpd.GeoDataFrame
|
23
|
-
Geodataframe with settlements data
|
24
|
-
|
25
|
-
Example
|
26
|
-
-------
|
27
|
-
>>> from geobr import read_settlements
|
28
|
-
|
29
|
-
# Read settlements data
|
30
|
-
>>> settlements = read_settlements()
|
31
|
-
"""
|
32
|
-
|
33
|
-
url = "https://certificacao.incra.gov.br/csv_shp/zip/Assentamento%20Brasil.zip"
|
34
|
-
|
35
|
-
try:
|
36
|
-
# Download the zip file
|
37
|
-
# Disable SSL verification due to INCRA's certificate issues
|
38
|
-
response = requests.get(url, verify=False)
|
39
|
-
if response.status_code != 200:
|
40
|
-
raise Exception("Failed to download data from INCRA")
|
41
|
-
|
42
|
-
# Suppress the InsecureRequestWarning
|
43
|
-
import urllib3
|
44
|
-
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
45
|
-
|
46
|
-
# Create a temporary directory
|
47
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
48
|
-
# Extract the zip file
|
49
|
-
with ZipFile(BytesIO(response.content)) as zip_ref:
|
50
|
-
zip_ref.extractall(temp_dir)
|
51
|
-
|
52
|
-
# Find the shapefile
|
53
|
-
shp_files = [f for f in os.listdir(temp_dir) if f.endswith('.shp')]
|
54
|
-
if not shp_files:
|
55
|
-
raise Exception("No shapefile found in the downloaded data")
|
56
|
-
|
57
|
-
# Read the shapefile
|
58
|
-
gdf = gpd.read_file(os.path.join(temp_dir, shp_files[0]))
|
59
|
-
|
60
|
-
if simplified:
|
61
|
-
# Keep only the most relevant columns
|
62
|
-
columns_to_keep = [
|
63
|
-
'geometry',
|
64
|
-
'NOME_PROJE', # Nome do Projeto de Assentamento
|
65
|
-
'MUNICIPIO', # Município
|
66
|
-
'UF', # Estado
|
67
|
-
'AREA_HA', # Área em hectares
|
68
|
-
'NUM_FAMILI', # Número de famílias
|
69
|
-
'CAPACIDADE', # Capacidade de famílias
|
70
|
-
'DT_CRIACAO', # Data de criação
|
71
|
-
'SITUACAO' # Situação do assentamento
|
72
|
-
]
|
73
|
-
|
74
|
-
# Filter columns that actually exist in the dataset
|
75
|
-
existing_columns = ['geometry'] + [col for col in columns_to_keep[1:] if col in gdf.columns]
|
76
|
-
gdf = gdf[existing_columns]
|
77
|
-
|
78
|
-
except Exception as e:
|
79
|
-
raise Exception(f"Error downloading settlements data: {str(e)}")
|
80
|
-
|
81
|
-
return gdf
|
82
|
-
|
83
|
-
if __name__ == '__main__':
|
84
|
-
settlements = read_settlements()
|
85
|
-
print(settlements)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/data/grid_state_correspondence_table.csv
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_exploration_production_environment.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_hydroelectric_feasibility_studies.py
RENAMED
File without changes
|
{tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_hydroelectric_inventory_aai_studies.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_effective_geographic_basin.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{tunned_geobr-0.2.4 → tunned_geobr-0.2.5}/tunned_geobr/read_og_probabilistic_effective_basin.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|