tunned-geobr 1.0.0__tar.gz → 1.0.2__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.
Files changed (178) hide show
  1. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/PKG-INFO +3 -1
  2. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/pyproject.toml +3 -1
  3. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/__init__.py +1 -2
  4. tunned_geobr-1.0.2/tunned_geobr/read_immediate_region.py +69 -0
  5. tunned_geobr-1.0.2/tunned_geobr/read_indigenous_land.py +77 -0
  6. tunned_geobr-1.0.2/tunned_geobr/read_intermediate_region.py +69 -0
  7. tunned_geobr-1.0.2/tunned_geobr/read_meso_region.py +69 -0
  8. tunned_geobr-1.0.2/tunned_geobr/read_micro_region.py +69 -0
  9. tunned_geobr-1.0.0/tunned_geobr/read_neighborhoods_2022.py → tunned_geobr-1.0.2/tunned_geobr/read_neighborhood.py +1 -1
  10. tunned_geobr-1.0.2/tunned_geobr/read_region.py +69 -0
  11. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_sigef_properties.py +0 -2
  12. tunned_geobr-1.0.0/tunned_geobr/read_immediate_region.py +0 -81
  13. tunned_geobr-1.0.0/tunned_geobr/read_indigenous_land.py +0 -44
  14. tunned_geobr-1.0.0/tunned_geobr/read_intermediate_region.py +0 -61
  15. tunned_geobr-1.0.0/tunned_geobr/read_meso_region.py +0 -78
  16. tunned_geobr-1.0.0/tunned_geobr/read_micro_region.py +0 -78
  17. tunned_geobr-1.0.0/tunned_geobr/read_neighborhood.py +0 -39
  18. tunned_geobr-1.0.0/tunned_geobr/read_region.py +0 -31
  19. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/LICENSE.txt +0 -0
  20. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/README.md +0 -0
  21. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/__init__.py +0 -0
  22. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/read_state.py +0 -0
  23. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_list_geobr.py +0 -0
  24. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_lookup_muni.py +0 -0
  25. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_amazon.py +0 -0
  26. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_biomes.py +0 -0
  27. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_census_tract.py +0 -0
  28. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_comparable_areas.py +0 -0
  29. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_conservation_units.py +0 -0
  30. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_country.py +0 -0
  31. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_disaster_risk_area.py +0 -0
  32. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_health_facilities.py +0 -0
  33. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_health_region.py +0 -0
  34. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_immediate_region.py +0 -0
  35. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_indigenous_land.py +0 -0
  36. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_intermediate_region.py +0 -0
  37. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_meso_region.py +0 -0
  38. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_metro_area.py +0 -0
  39. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_micro_region.py +0 -0
  40. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_municipal_seat.py +0 -0
  41. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_municipality.py +0 -0
  42. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_neighborhood.py +0 -0
  43. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_pop_arrangements.py +0 -0
  44. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_region.py +0 -0
  45. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_schools.py +0 -0
  46. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_semiarid.py +0 -0
  47. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_state.py +0 -0
  48. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_statistical_grid.py +0 -0
  49. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_urban_area.py +0 -0
  50. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_urban_concentrations.py +0 -0
  51. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_read_weighting_area.py +0 -0
  52. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tests/test_utils.py +0 -0
  53. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/data/grid_state_correspondence_table.csv +0 -0
  54. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/list_geobr.py +0 -0
  55. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/lookup_muni.py +0 -0
  56. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_ama_anemometric_towers.py +0 -0
  57. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_amazon.py +0 -0
  58. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_amazon_ibas.py +0 -0
  59. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_apcb_amazon.py +0 -0
  60. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_apcb_caatinga.py +0 -0
  61. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_apcb_cerrado_pantanal.py +0 -0
  62. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_apcb_mata_atlantica.py +0 -0
  63. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_apcb_pampa.py +0 -0
  64. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_apcb_zcm.py +0 -0
  65. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_archaeological_sites.py +0 -0
  66. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_areas_under_contract.py +0 -0
  67. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_atlantic_forest_ibas.py +0 -0
  68. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_atlantic_forest_law_limits.py +0 -0
  69. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_baze_sites.py +0 -0
  70. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_biodiesel_plants.py +0 -0
  71. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_biomes.py +0 -0
  72. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_biomethane_plants.py +0 -0
  73. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_biosphere_reserves.py +0 -0
  74. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_cave_potential.py +0 -0
  75. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_census_tract.py +0 -0
  76. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_climate_aggressiveness.py +0 -0
  77. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_comparable_areas.py +0 -0
  78. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_compression_stations.py +0 -0
  79. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_conservation_units.py +0 -0
  80. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_country.py +0 -0
  81. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_disaster_risk_area.py +0 -0
  82. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_drainage_ducts.py +0 -0
  83. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_ebas.py +0 -0
  84. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_etanol_plants.py +0 -0
  85. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_existent_biomass_ute.py +0 -0
  86. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_existent_cgh.py +0 -0
  87. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_existent_eolic.py +0 -0
  88. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_existent_fossile_ute.py +0 -0
  89. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_existent_nuclear_ute.py +0 -0
  90. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_existent_pch.py +0 -0
  91. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_existent_solar.py +0 -0
  92. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_existent_substations.py +0 -0
  93. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_existent_transmission_lines.py +0 -0
  94. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_existent_uhe.py +0 -0
  95. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_exploration_production_environment.py +0 -0
  96. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_federal_highways.py +0 -0
  97. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_federal_union_areas.py +0 -0
  98. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_fossil_occurrences.py +0 -0
  99. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_fuel_bases.py +0 -0
  100. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_gas_distribution_pipelines.py +0 -0
  101. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_gas_transport_pipelines.py +0 -0
  102. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_geographic_regions.py +0 -0
  103. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_geology.py +0 -0
  104. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_geomorphology.py +0 -0
  105. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_glp_bases.py +0 -0
  106. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_gnl_terminals.py +0 -0
  107. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_health_facilities.py +0 -0
  108. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_health_region.py +0 -0
  109. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_heliports.py +0 -0
  110. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_hydroelectric_feasibility_studies.py +0 -0
  111. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_hydroelectric_inventory_aai_studies.py +0 -0
  112. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_ibama_embargoes.py +0 -0
  113. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_icmbio_embargoes.py +0 -0
  114. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_icmbio_infractions.py +0 -0
  115. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_isolated_systems.py +0 -0
  116. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_metro_area.py +0 -0
  117. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_mining_processes.py +0 -0
  118. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_municipal_seat.py +0 -0
  119. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_municipality.py +0 -0
  120. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_municipality_direct.py +0 -0
  121. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_natural_caves.py +0 -0
  122. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_natural_gas_delivery_points.py +0 -0
  123. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_natural_gas_processing_hub.py +0 -0
  124. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_og_basement.py +0 -0
  125. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_og_effective_geographic_basin.py +0 -0
  126. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_og_ipa_direct_evidence.py +0 -0
  127. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_og_ipa_exploratory_activity.py +0 -0
  128. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_og_ipa_exploratory_intensity.py +0 -0
  129. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_og_ipa_need_for_knowledge.py +0 -0
  130. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_og_ipa_prospectiveness.py +0 -0
  131. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_og_ipa_supply_infrastructure.py +0 -0
  132. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_og_legal_pre_salt_polygon.py +0 -0
  133. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_og_predominant_fluid_type.py +0 -0
  134. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_og_probabilistic_effective_basin.py +0 -0
  135. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_og_total_ipa.py +0 -0
  136. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_og_unconventional_resources.py +0 -0
  137. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_oil_and_derivatives_terminal.py +0 -0
  138. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_pan_strategic_areas 2.py +0 -0
  139. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_pan_strategic_areas.py +0 -0
  140. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_pedology.py +0 -0
  141. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_pio_ducts.py +0 -0
  142. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_pio_terminals.py +0 -0
  143. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_planned_biomass_ute.py +0 -0
  144. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_planned_cgh.py +0 -0
  145. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_planned_eolic.py +0 -0
  146. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_planned_fossile_ute.py +0 -0
  147. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_planned_nuclear_ute.py +0 -0
  148. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_planned_pch.py +0 -0
  149. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_planned_solar.py +0 -0
  150. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_planned_substations.py +0 -0
  151. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_planned_transmission_lines.py +0 -0
  152. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_planned_uhe.py +0 -0
  153. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_pop_arrangements.py +0 -0
  154. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_ports.py +0 -0
  155. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_private_aerodromes.py +0 -0
  156. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_processing_facilities.py +0 -0
  157. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_public_aerodromes.py +0 -0
  158. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_quilombola_areas.py +0 -0
  159. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_railways.py +0 -0
  160. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_rppn.py +0 -0
  161. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_schools.py +0 -0
  162. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_sedimentary_basins.py +0 -0
  163. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_semiarid.py +0 -0
  164. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_settlements.py +0 -0
  165. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_snci_properties.py +0 -0
  166. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_state.py +0 -0
  167. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_state_direct.py +0 -0
  168. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_state_highways.py +0 -0
  169. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_statistical_grid.py +0 -0
  170. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_subsystem_interconnected.py +0 -0
  171. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_transmission_lines_ons.py +0 -0
  172. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_urban_area.py +0 -0
  173. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_urban_concentrations.py +0 -0
  174. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_vegetation.py +0 -0
  175. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_water_bodies_ana.py +0 -0
  176. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_waterways.py +0 -0
  177. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/read_weighting_area.py +0 -0
  178. {tunned_geobr-1.0.0 → tunned_geobr-1.0.2}/tunned_geobr/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tunned-geobr
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: Fork personalizado do geobr com funcionalidades extras como download de dados da ANM
5
5
  Author: Anderson Stolfi
6
6
  License: MIT
@@ -23,6 +23,8 @@ Requires-Dist: patool>=1.15.0
23
23
  Requires-Dist: fiona>=1.10.1
24
24
  Requires-Dist: gdown>=5.2.0
25
25
  Requires-Dist: tabulate>=0.9.0
26
+ Requires-Dist: build>=1.2.2.post1
27
+ Requires-Dist: twine>=6.1.0
26
28
  Description-Content-Type: text/markdown
27
29
 
28
30
  # geobr: Download Official Spatial Data Sets of Brazil
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tunned-geobr"
3
- version = "1.0.0"
3
+ version = "1.0.2"
4
4
  description = "Fork personalizado do geobr com funcionalidades extras como download de dados da ANM"
5
5
  readme = "README.md"
6
6
  requires-python = "<4.0,>=3.9"
@@ -18,6 +18,8 @@ dependencies = [
18
18
  "fiona>=1.10.1",
19
19
  "gdown>=5.2.0",
20
20
  "tabulate>=0.9.0",
21
+ "build>=1.2.2.post1",
22
+ "twine>=6.1.0",
21
23
  ]
22
24
  classifiers = [
23
25
  "Intended Audience :: Science/Research",
@@ -18,7 +18,6 @@ from .read_meso_region import read_meso_region
18
18
  from .read_micro_region import read_micro_region
19
19
  from .read_municipality import read_municipality
20
20
  from .read_weighting_area import read_weighting_area
21
- from .read_neighborhood import read_neighborhood
22
21
  from .read_health_region import read_health_region
23
22
  from .read_pop_arrangements import read_pop_arrangements
24
23
  from .lookup_muni import lookup_muni
@@ -65,7 +64,7 @@ from .read_water_bodies_ana import read_water_bodies_ana
65
64
  from .read_pan_strategic_areas import read_pan_strategic_areas
66
65
  from .read_geographic_regions import read_geographic_regions
67
66
  from .read_biosphere_reserves import read_biosphere_reserves
68
- from .read_neighborhoods_2022 import read_neighborhoods_2022
67
+ from .read_neighborhood import read_neighborhood
69
68
  from .read_baze_sites import read_baze_sites
70
69
  from .read_existent_eolic import read_existent_eolic
71
70
  from .read_planned_eolic import read_planned_eolic
@@ -0,0 +1,69 @@
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_immediate_region(simplified=False):
9
+ """Download official immediate region data from IBGE.
10
+
11
+ This function downloads and processes immediate region data from IBGE (Brazilian Institute of Geography and Statistics).
12
+ The data includes immediate regions of Brazil for the year 2023.
13
+ Original source: IBGE
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 immediate region data
24
+
25
+ Example
26
+ -------
27
+ >>> from geobr import read_immediate_region
28
+
29
+ # Read immediate region data
30
+ >>> immediate_region = read_immediate_region()
31
+ """
32
+
33
+ url = "https://geoftp.ibge.gov.br/organizacao_do_territorio/malhas_territoriais/malhas_municipais/municipio_2023/Brasil/BR_RG_Imediatas_2023.zip"
34
+
35
+ try:
36
+ # Download the zip file
37
+ response = requests.get(url)
38
+ if response.status_code != 200:
39
+ raise Exception("Failed to download data from IBGE")
40
+
41
+ # Create a temporary directory
42
+ with tempfile.TemporaryDirectory() as temp_dir:
43
+ # Extract zip content
44
+ with ZipFile(BytesIO(response.content)) as zip_ref:
45
+ zip_ref.extractall(temp_dir)
46
+
47
+ # Find the shapefile
48
+ shp_files = [f for f in os.listdir(temp_dir) if f.endswith('.shp')]
49
+ if not shp_files:
50
+ raise Exception("No shapefile found in the downloaded data")
51
+
52
+ # Read the shapefile
53
+ gdf = gpd.read_file(os.path.join(temp_dir, shp_files[0]))
54
+
55
+ if simplified:
56
+ # Keep only the most relevant columns
57
+ # Note: These columns are based on typical immediate region data structure
58
+ # You may want to adjust these based on the actual data
59
+ columns_to_keep = [
60
+ 'geometry',
61
+ 'CD_RGI', # Immediate region code
62
+ 'NM_RGI', # Immediate region name
63
+ ]
64
+ gdf = gdf[columns_to_keep]
65
+
66
+ except Exception as e:
67
+ raise Exception(f"Error downloading immediate region data: {str(e)}")
68
+
69
+ return gdf
@@ -0,0 +1,77 @@
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_indigenous_land(simplified=False):
9
+ """Download Indigenous Land data from FUNAI.
10
+
11
+ This function downloads and processes data about indigenous lands in Brazil
12
+ from FUNAI (Fundação Nacional dos Povos Indígenas). The data includes location
13
+ and basic information about registered indigenous lands.
14
+ Original source: FUNAI - Fundação Nacional dos Povos Indígenas
15
+
16
+ Parameters
17
+ ----------
18
+ simplified : boolean, by default False
19
+ If True, returns a simplified version of the dataset with fewer columns
20
+
21
+ Returns
22
+ -------
23
+ gpd.GeoDataFrame
24
+ Geodataframe with indigenous land data
25
+ Columns:
26
+ - geometry: Land boundaries
27
+ - nome: Land name
28
+ - municipio: Municipality
29
+ - uf: State
30
+ - etnia: Ethnicity
31
+ - fase: Legal status
32
+ - area_ha: Area in hectares
33
+
34
+ Example
35
+ -------
36
+ >>> from tunned_geobr import read_indigenous_land
37
+ >>> lands = read_indigenous_land()
38
+ """
39
+
40
+ url = "https://geoserver.funai.gov.br/geoserver/Funai/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Funai%3Atis_poligonais&maxFeatures=10000&outputFormat=SHAPE-ZIP"
41
+
42
+ try:
43
+ # Download the zip file with a 60-second timeout
44
+ response = requests.get(url, timeout=60)
45
+ if response.status_code != 200:
46
+ raise Exception(f"Failed to download data from FUNAI. Status code: {response.status_code}")
47
+
48
+ # Create a temporary directory
49
+ with tempfile.TemporaryDirectory() as temp_dir:
50
+ # Extract the zip file
51
+ with ZipFile(BytesIO(response.content)) as zip_ref:
52
+ zip_ref.extractall(temp_dir)
53
+
54
+ # Find the shapefile
55
+ shp_files = [f for f in os.listdir(temp_dir) if f.endswith('.shp')]
56
+ if not shp_files:
57
+ raise Exception("No shapefile found in the downloaded data")
58
+
59
+ # Read the shapefile
60
+ gdf = gpd.read_file(os.path.join(temp_dir, shp_files[0]))
61
+ gdf = gdf.to_crs(4674) # Convert to SIRGAS 2000
62
+
63
+ # Print columns for debugging
64
+ print("Available columns:", gdf.columns)
65
+
66
+ if simplified:
67
+ columns_to_keep = ['geometry', 'nome', 'municipio', 'uf', 'etnia', 'fase', 'area_ha']
68
+ existing_columns = ['geometry'] + [col for col in columns_to_keep[1:] if col in gdf.columns]
69
+ gdf = gdf[existing_columns]
70
+
71
+ except Exception as e:
72
+ raise Exception(f"Error downloading indigenous land data: {str(e)}")
73
+
74
+ return gdf
75
+
76
+ if __name__ == '__main__':
77
+ read_indigenous_land()
@@ -0,0 +1,69 @@
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_intermediate_region(simplified=False):
9
+ """Download official intermediate region data from IBGE.
10
+
11
+ This function downloads and processes intermediate region data from IBGE (Brazilian Institute of Geography and Statistics).
12
+ The data includes intermediate regions of Brazil for the year 2023.
13
+ Original source: IBGE
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 intermediate region data
24
+
25
+ Example
26
+ -------
27
+ >>> from geobr import read_intermediate_region
28
+
29
+ # Read intermediate region data
30
+ >>> intermediate_region = read_intermediate_region()
31
+ """
32
+
33
+ url = "https://geoftp.ibge.gov.br/organizacao_do_territorio/malhas_territoriais/malhas_municipais/municipio_2023/Brasil/BR_RG_Intermediarias_2023.zip"
34
+
35
+ try:
36
+ # Download the zip file
37
+ response = requests.get(url)
38
+ if response.status_code != 200:
39
+ raise Exception("Failed to download data from IBGE")
40
+
41
+ # Create a temporary directory
42
+ with tempfile.TemporaryDirectory() as temp_dir:
43
+ # Extract zip content
44
+ with ZipFile(BytesIO(response.content)) as zip_ref:
45
+ zip_ref.extractall(temp_dir)
46
+
47
+ # Find the shapefile
48
+ shp_files = [f for f in os.listdir(temp_dir) if f.endswith('.shp')]
49
+ if not shp_files:
50
+ raise Exception("No shapefile found in the downloaded data")
51
+
52
+ # Read the shapefile
53
+ gdf = gpd.read_file(os.path.join(temp_dir, shp_files[0]))
54
+
55
+ if simplified:
56
+ # Keep only the most relevant columns
57
+ # Note: These columns are based on typical intermediate region data structure
58
+ # You may want to adjust these based on the actual data
59
+ columns_to_keep = [
60
+ 'geometry',
61
+ 'CD_RGINT', # Intermediate region code
62
+ 'NM_RGINT', # Intermediate region name
63
+ ]
64
+ gdf = gdf[columns_to_keep]
65
+
66
+ except Exception as e:
67
+ raise Exception(f"Error downloading intermediate region data: {str(e)}")
68
+
69
+ return gdf
@@ -0,0 +1,69 @@
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_meso_region(simplified=False):
9
+ """Download official mesoregion data from IBGE.
10
+
11
+ This function downloads and processes mesoregion data from IBGE (Brazilian Institute of Geography and Statistics).
12
+ The data includes mesoregions of Brazil for the year 2022.
13
+ Original source: IBGE
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 mesoregion data
24
+
25
+ Example
26
+ -------
27
+ >>> from geobr import read_meso_region
28
+
29
+ # Read mesoregion data
30
+ >>> meso_region = read_meso_region()
31
+ """
32
+
33
+ url = "https://geoftp.ibge.gov.br/organizacao_do_territorio/malhas_territoriais/malhas_municipais/municipio_2022/Brasil/BR/BR_Mesorregioes_2022.zip"
34
+
35
+ try:
36
+ # Download the zip file
37
+ response = requests.get(url)
38
+ if response.status_code != 200:
39
+ raise Exception("Failed to download data from IBGE")
40
+
41
+ # Create a temporary directory
42
+ with tempfile.TemporaryDirectory() as temp_dir:
43
+ # Extract zip content
44
+ with ZipFile(BytesIO(response.content)) as zip_ref:
45
+ zip_ref.extractall(temp_dir)
46
+
47
+ # Find the shapefile
48
+ shp_files = [f for f in os.listdir(temp_dir) if f.endswith('.shp')]
49
+ if not shp_files:
50
+ raise Exception("No shapefile found in the downloaded data")
51
+
52
+ # Read the shapefile
53
+ gdf = gpd.read_file(os.path.join(temp_dir, shp_files[0]))
54
+
55
+ if simplified:
56
+ # Keep only the most relevant columns
57
+ # Note: These columns are based on typical mesoregion data structure
58
+ # You may want to adjust these based on the actual data
59
+ columns_to_keep = [
60
+ 'geometry',
61
+ 'CD_MESO', # Mesoregion code
62
+ 'NM_MESO', # Mesoregion name
63
+ ]
64
+ gdf = gdf[columns_to_keep]
65
+
66
+ except Exception as e:
67
+ raise Exception(f"Error downloading mesoregion data: {str(e)}")
68
+
69
+ return gdf
@@ -0,0 +1,69 @@
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_micro_region(simplified=False):
9
+ """Download official microregion data from IBGE.
10
+
11
+ This function downloads and processes microregion data from IBGE (Brazilian Institute of Geography and Statistics).
12
+ The data includes microregions of Brazil for the year 2022.
13
+ Original source: IBGE
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 microregion data
24
+
25
+ Example
26
+ -------
27
+ >>> from geobr import read_micro_region
28
+
29
+ # Read microregion data
30
+ >>> micro_region = read_micro_region()
31
+ """
32
+
33
+ url = "https://geoftp.ibge.gov.br/organizacao_do_territorio/malhas_territoriais/malhas_municipais/municipio_2022/Brasil/BR/BR_Microrregioes_2022.zip"
34
+
35
+ try:
36
+ # Download the zip file
37
+ response = requests.get(url)
38
+ if response.status_code != 200:
39
+ raise Exception("Failed to download data from IBGE")
40
+
41
+ # Create a temporary directory
42
+ with tempfile.TemporaryDirectory() as temp_dir:
43
+ # Extract zip content
44
+ with ZipFile(BytesIO(response.content)) as zip_ref:
45
+ zip_ref.extractall(temp_dir)
46
+
47
+ # Find the shapefile
48
+ shp_files = [f for f in os.listdir(temp_dir) if f.endswith('.shp')]
49
+ if not shp_files:
50
+ raise Exception("No shapefile found in the downloaded data")
51
+
52
+ # Read the shapefile
53
+ gdf = gpd.read_file(os.path.join(temp_dir, shp_files[0]))
54
+
55
+ if simplified:
56
+ # Keep only the most relevant columns
57
+ # Note: These columns are based on typical microregion data structure
58
+ # You may want to adjust these based on the actual data
59
+ columns_to_keep = [
60
+ 'geometry',
61
+ 'CD_MICRO', # Microregion code
62
+ 'NM_MICRO', # Microregion name
63
+ ]
64
+ gdf = gdf[columns_to_keep]
65
+
66
+ except Exception as e:
67
+ raise Exception(f"Error downloading microregion data: {str(e)}")
68
+
69
+ return gdf
@@ -5,7 +5,7 @@ import requests
5
5
  import subprocess
6
6
  from io import BytesIO
7
7
 
8
- def read_neighborhoods_2022(simplified=False):
8
+ def read_neighborhood(simplified=False):
9
9
  """Download Brazilian Neighborhoods data from IBGE (2022 Census).
10
10
 
11
11
  This function downloads and processes the Brazilian Neighborhoods data
@@ -0,0 +1,69 @@
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_region(simplified=False):
9
+ """Download official region data from IBGE.
10
+
11
+ This function downloads and processes region data from IBGE (Brazilian Institute of Geography and Statistics).
12
+ The data includes regions of Brazil for the year 2022.
13
+ Original source: IBGE
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 region data
24
+
25
+ Example
26
+ -------
27
+ >>> from geobr import read_region
28
+
29
+ # Read region data
30
+ >>> region = read_region()
31
+ """
32
+
33
+ url = "https://geoftp.ibge.gov.br/organizacao_do_territorio/malhas_territoriais/malhas_municipais/municipio_2022/Brasil/BR/BR_Regioes_2022.zip"
34
+
35
+ try:
36
+ # Download the zip file
37
+ response = requests.get(url)
38
+ if response.status_code != 200:
39
+ raise Exception("Failed to download data from IBGE")
40
+
41
+ # Create a temporary directory
42
+ with tempfile.TemporaryDirectory() as temp_dir:
43
+ # Extract zip content
44
+ with ZipFile(BytesIO(response.content)) as zip_ref:
45
+ zip_ref.extractall(temp_dir)
46
+
47
+ # Find the shapefile
48
+ shp_files = [f for f in os.listdir(temp_dir) if f.endswith('.shp')]
49
+ if not shp_files:
50
+ raise Exception("No shapefile found in the downloaded data")
51
+
52
+ # Read the shapefile
53
+ gdf = gpd.read_file(os.path.join(temp_dir, shp_files[0]))
54
+
55
+ if simplified:
56
+ # Keep only the most relevant columns
57
+ # Note: These columns are based on typical region data structure
58
+ # You may want to adjust these based on the actual data
59
+ columns_to_keep = [
60
+ 'geometry',
61
+ 'CD_RG', # Region code
62
+ 'NM_RG', # Region name
63
+ ]
64
+ gdf = gdf[columns_to_keep]
65
+
66
+ except Exception as e:
67
+ raise Exception(f"Error downloading region data: {str(e)}")
68
+
69
+ return gdf
@@ -32,8 +32,6 @@ def read_sigef_properties(simplified=False):
32
32
  """
33
33
 
34
34
  url = "https://certificacao.incra.gov.br/csv_shp/zip/Sigef%20Brasil.zip"
35
- if 1==1:
36
- return "Essa camada está muito pesada, baixe manualmente no link: " + url
37
35
  try:
38
36
  # Download the zip file
39
37
  # Disable SSL verification due to INCRA's certificate issues
@@ -1,81 +0,0 @@
1
- from geobr.utils import select_metadata, download_gpkg, change_type_list, test_options
2
-
3
-
4
- def read_immediate_region(
5
- code_immediate="all", year=2017, simplified=False, verbose=False
6
- ):
7
- """ Download shape files of Brazil's Immediate Geographic Areas as sf objects
8
-
9
- The Immediate Geographic Areas are part of the geographic division of
10
- Brazil created in 2017 by IBGE to replace the "Micro Regions" division.
11
- Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000"
12
- and CRS(4674)
13
-
14
- Parameters
15
- ----------
16
- code_immediate:
17
- 6-digit code of an immediate region. If the two-digit code or a
18
- two-letter uppercase abbreviation of a state is passed, (e.g. 33 or
19
- "RJ") the function will load all immediate regions of that state. If
20
- code_immediate="all", all immediate regions of the country are loaded
21
- (defaults to "all").
22
- year : int, optional
23
- Year of the data, by default 2017
24
- simplify: boolean, by default True
25
- Data 'type', indicating whether the function returns the 'original' dataset
26
- with high resolution or a dataset with 'simplify' borders (Default)
27
- verbose : bool, optional
28
- by default False
29
-
30
- Returns
31
- -------
32
- gpd.GeoDataFrame
33
- Metadata and geopackage of selected states
34
-
35
- Raises
36
- ------
37
- Exception
38
- If parameters are not found or not well defined
39
-
40
- Example
41
- -------
42
- >>> from geobr import read_immediate_region
43
-
44
- # Read specific state at a given year
45
- >>> df = read_immediate_region(year=2017)
46
- """
47
-
48
- test_options(code_immediate, "code_immediate", not_allowed=[None])
49
-
50
- metadata = select_metadata("immediate_regions", year=year, simplified=simplified)
51
-
52
- gdf = download_gpkg(metadata)
53
-
54
- # ensure type
55
- code_immediate = str(code_immediate)
56
-
57
- if code_immediate == "all":
58
-
59
- if verbose:
60
- print(
61
- "Loading data for the whole country. "
62
- "This might take a few minutes.\n"
63
- )
64
-
65
- return gdf
66
-
67
- elif code_immediate in gdf["abbrev_state"].tolist():
68
-
69
- return gdf.query(f'abbrev_state == "{code_immediate}"')
70
-
71
- elif code_immediate in change_type_list(gdf["code_state"].tolist()):
72
-
73
- return gdf.query(f'code_state == "{code_immediate}"')
74
-
75
- elif code_immediate in change_type_list(gdf["code_immediate"].tolist()):
76
-
77
- return gdf.query(f'code_immediate == "{code_immediate}"')
78
-
79
- else:
80
-
81
- raise Exception("Invalid Value to argument 'code_immediate'")
@@ -1,44 +0,0 @@
1
- from geobr.utils import select_metadata, download_gpkg
2
-
3
-
4
- def read_indigenous_land(date=201907, simplified=False, verbose=False):
5
- """ Download official data of indigenous lands as an sf object.
6
-
7
- The data set covers the whole of Brazil and it includes indigenous lands from all ethnicities and
8
- in different stages of demarcation. The original data comes from the National Indian Foundation (FUNAI)
9
- and can be found at http://www.funai.gov.br/index.php/shape. Although original data is updated monthly,
10
- the geobr package will only keep the data for a few months per year.
11
-
12
- Parameters
13
- ----------
14
- date : int, optional
15
- A date numer in YYYYMM format, by default 201907
16
- simplified: boolean, by default True
17
- Data 'type', indicating whether the function returns the 'original' dataset
18
- with high resolution or a dataset with 'simplified' borders (Default)
19
- verbose : bool, optional
20
- by default False
21
-
22
- Returns
23
- -------
24
- gpd.GeoDataFrame
25
- Metadata and geopackage of selected states
26
-
27
- Raises
28
- ------
29
- Exception
30
- If parameters are not found or not well defined
31
-
32
- Example
33
- -------
34
- >>> from geobr import read_indigenous_land
35
-
36
- # Read specific state at a given year
37
- >>> df = read_indigenous_land(date=201907)
38
- """
39
-
40
- metadata = select_metadata("indigenous_land", year=date, simplified=simplified)
41
-
42
- gdf = download_gpkg(metadata)
43
-
44
- return gdf
@@ -1,61 +0,0 @@
1
- from geobr.utils import select_metadata, download_gpkg
2
-
3
-
4
- def read_intermediate_region(
5
- code_intermadiate="all", year=2019, simplified=False, verbose=False
6
- ):
7
- r"""Download spatial data of Brazil's Intermediate Geographic Areas
8
-
9
- The intermediate Geographic Areas are part of the geographic division of
10
- Brazil created in 2017 by IBGE. These regions were created to replace the
11
- "Meso Regions" division. Data at scale 1:250,000, using Geodetic reference
12
- system "SIRGAS2000" and CRS(4674)
13
-
14
- Parameters
15
- ----------
16
- code_intermadiate: str or int, by default "all"
17
- 4-digit code of an intermediate region. If the two-digit code or a
18
- two-letter uppercase abbreviation of a state is passed,
19
- (e.g. 33 or "RJ") the function will load all intermediate regions of that
20
- state. If `code_intermediate="all"` (Default), all intermediate regions of
21
- the country are loaded.
22
- year : int, optional
23
- Year of the data, by default 2019
24
- simplified: boolean, by default True
25
- Data 'type', indicating whether the function returns the 'original' dataset
26
- with high resolution or a dataset with 'simplified' borders (Default)
27
- verbose : bool, optional
28
- by default False
29
-
30
- Returns
31
- -------
32
- gpd.GeoDataFrame
33
- Metadata and geopackage of selected states
34
-
35
- Raises
36
- ------
37
- Exception
38
- If parameters are not found or not well defined
39
-
40
- Example
41
- -------
42
- >>> from geobr import read_intermediate_region
43
-
44
- # Read specific state at a given year
45
- >>> df = read_intermediate_region(year=2019)
46
- """
47
-
48
- metadata = select_metadata("intermediate_regions", year=year, simplified=simplified)
49
-
50
- gdf = download_gpkg(metadata)
51
-
52
- if code_intermadiate == "all":
53
- return gdf
54
-
55
- for col in ["abbrev_state", "code_state", "code_intermediate"]:
56
- if code_intermadiate in gdf[col].unique():
57
- return gdf[gdf[col] == code_intermadiate]
58
- else:
59
- raise ValueError(
60
- f"Invalid value to argumet `code_intermadiate`: {code_intermadiate}"
61
- )