Skip to content

Commit

Permalink
Add GeoBR dataset (#28)
Browse files Browse the repository at this point in the history
* Add GeoBR

* Update docstrings and code

* Update code

* Fix Project.toml

* Apply suggestions

* Apply suggestions

* Fix typo

* Update code

* Update code

* Add tests & Update README

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Update docstring

---------

Co-authored-by: Elias Carvalho <[email protected]>
  • Loading branch information
juliohm and eliascarv authored Sep 26, 2024
1 parent 2751d80 commit d0da37a
Show file tree
Hide file tree
Showing 4 changed files with 736 additions and 1 deletion.
112 changes: 112 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,118 @@ julia> NaturalEarth.coastlines()
4122 rows omitted
```

#### GeoBR

```
help?> GeoBR
Provides functions to (down)load data from the GeoBR database.
Please check the docstring of each function for more details:
• GeoBR.state
• GeoBR.municipality
• GeoBR.region
• GeoBR.country
• GeoBR.amazon
• GeoBR.biomes
• GeoBR.disasterriskarea
• GeoBR.healthfacilities
• GeoBR.indigenousland
• GeoBR.metroarea
• GeoBR.neighborhood
• GeoBR.urbanarea
• GeoBR.weightingarea
• GeoBR.mesoregion
• GeoBR.microregion
• GeoBR.intermediateregion
• GeoBR.immediateregion
• GeoBR.municipalseat
• GeoBR.censustract
• GeoBR.statisticalgrid
• GeoBR.conservationunits
• GeoBR.semiarid
• GeoBR.schools
• GeoBR.comparableareas
• GeoBR.urbanconcentrations
• GeoBR.poparrangements
• GeoBR.healthregion
julia> GeoBR.state()
29×2 GeoTable over 29 GeometrySet
┌───────────────────────────────────────────────┬──────────────────────────────┐
│ name_state │ geometry │
│ Categorical │ MultiPolygon │
│ [NoUnits] │ 🖈 GeodeticLatLon{SIRGAS2000} │
├───────────────────────────────────────────────┼──────────────────────────────┤
│ Acre │ Multi(1×PolyArea) │
│ Alagoas │ Multi(1×PolyArea) │
│ Amapá │ Multi(1×PolyArea) │
│ Amazonas │ Multi(1×PolyArea) │
│ Bahia │ Multi(10×PolyArea) │
│ Ceará │ Multi(1×PolyArea) │
│ Distrito estadual de Fernando de Noronha (PE) │ Multi(1×PolyArea) │
│ Distrito Federal │ Multi(1×PolyArea) │
│ Espírito Santo │ Multi(8×PolyArea) │
│ Goiás │ Multi(1×PolyArea) │
│ Litígio PI/CE │ Multi(3×PolyArea) │
│ Maranhão │ Multi(51×PolyArea) │
│ Mato Grosso │ Multi(1×PolyArea) │
│ Mato Grosso do Sul │ Multi(1×PolyArea) │
│ Minas Gerais │ Multi(1×PolyArea) │
│ Pará │ Multi(17×PolyArea) │
│ Paraíba │ Multi(2×PolyArea) │
│ Paraná │ Multi(1×PolyArea) │
│ Pernambuco │ Multi(1×PolyArea) │
│ Piauí │ Multi(1×PolyArea) │
│ Rio de Janeiro │ Multi(82×PolyArea) │
│ Rio Grande do Norte │ Multi(1×PolyArea) │
│ Rio Grande do Sul │ Multi(1×PolyArea) │
│ Rondônia │ Multi(1×PolyArea) │
│ Roraima │ Multi(1×PolyArea) │
│ Santa Catarina │ Multi(2×PolyArea) │
│ São Paulo │ Multi(37×PolyArea) │
│ Sergipe │ Multi(1×PolyArea) │
│ Tocantins │ Multi(1×PolyArea) │
└───────────────────────────────────────────────┴──────────────────────────────┘
julia> GeoBR.state("RJ")
1×6 GeoTable over 1 GeometrySet
┌────────────┬──────────────┬────────────────┬─────────────┬─────────────┬──────────────────────────────┐
│ code_state │ abbrev_state │ name_state │ code_region │ name_region │ geometry │
│ Continuous │ Categorical │ Categorical │ Continuous │ Categorical │ MultiPolygon │
│ [NoUnits] │ [NoUnits] │ [NoUnits] │ [NoUnits] │ [NoUnits] │ 🖈 GeodeticLatLon{SIRGAS2000} │
├────────────┼──────────────┼────────────────┼─────────────┼─────────────┼──────────────────────────────┤
│ 33.0 │ RJ │ Rio De Janeiro │ 3.0 │ Sudeste │ Multi(577×PolyArea) │
└────────────┴──────────────┴────────────────┴─────────────┴─────────────┴──────────────────────────────┘
```

#### INMET

```
Expand Down
3 changes: 2 additions & 1 deletion src/GeoArtifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module GeoArtifacts

include("gadm.jl")
include("naturalearth.jl")
include("geobr.jl")
include("inmet.jl")

function __init__()
Expand All @@ -14,6 +15,6 @@ function __init__()
ENV["DATADEPS_ALWAYS_ACCEPT"] = true
end

export GADM, NaturalEarth, INMET
export GADM, NaturalEarth, GeoBR, INMET

end
Loading

0 comments on commit d0da37a

Please sign in to comment.