diff --git a/README.md b/README.md index 6474df5..8680dc3 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/src/GeoArtifacts.jl b/src/GeoArtifacts.jl index 04dba14..a7b7855 100644 --- a/src/GeoArtifacts.jl +++ b/src/GeoArtifacts.jl @@ -6,6 +6,7 @@ module GeoArtifacts include("gadm.jl") include("naturalearth.jl") +include("geobr.jl") include("inmet.jl") function __init__() @@ -14,6 +15,6 @@ function __init__() ENV["DATADEPS_ALWAYS_ACCEPT"] = true end -export GADM, NaturalEarth, INMET +export GADM, NaturalEarth, GeoBR, INMET end diff --git a/src/geobr.jl b/src/geobr.jl new file mode 100644 index 0000000..623cc27 --- /dev/null +++ b/src/geobr.jl @@ -0,0 +1,496 @@ +# ----------------------------------------------------------------- +# Licensed under the MIT License. See LICENSE in the project root. +# ----------------------------------------------------------------- + +""" +Provides functions to (down)load data from the GeoBR database. + +Please check the docstring of each function for more details: + +* [`GeoBR.state`](@ref) +* [`GeoBR.municipality`](@ref) +* [`GeoBR.region`](@ref) +* [`GeoBR.country`](@ref) +* [`GeoBR.amazon`](@ref) +* [`GeoBR.biomes`](@ref) +* [`GeoBR.disasterriskarea`](@ref) +* [`GeoBR.healthfacilities`](@ref) +* [`GeoBR.indigenousland`](@ref) +* [`GeoBR.metroarea`](@ref) +* [`GeoBR.neighborhood`](@ref) +* [`GeoBR.urbanarea`](@ref) +* [`GeoBR.weightingarea`](@ref) +* [`GeoBR.mesoregion`](@ref) +* [`GeoBR.microregion`](@ref) +* [`GeoBR.intermediateregion`](@ref) +* [`GeoBR.immediateregion`](@ref) +* [`GeoBR.municipalseat`](@ref) +* [`GeoBR.censustract`](@ref) +* [`GeoBR.statisticalgrid`](@ref) +* [`GeoBR.conservationunits`](@ref) +* [`GeoBR.semiarid`](@ref) +* [`GeoBR.schools`](@ref) +* [`GeoBR.comparableareas`](@ref) +* [`GeoBR.urbanconcentrations`](@ref) +* [`GeoBR.poparrangements`](@ref) +* [`GeoBR.healthregion`](@ref) +""" +module GeoBR + +using GeoIO +using DataDeps +using CSV +using Tables +using TableTransforms + +const APIVERSIONS = (v"1.7.0",) + +""" + GeoBR.download(url; version=v"1.7.0") + +(Down)load data for the specified `url` and `version` of the GeoBR database. + +The available API versions are: 1.7.0. +""" +function download(url; version=v"1.7.0") + if version ∉ APIVERSIONS + throw(ArgumentError("invalid API version, please check the docstring")) + end + + filename = basename(url) + + ID = "GeoBR_$(version)_$(filename)" + + dir = try + # if data is already on disk + # we just return the path + @datadep_str ID + catch + # otherwise we register the data + # and download using DataDeps.jl + try + register(DataDep( + ID, + """ + Geographic data provided by the GeoBR project. + Source: $url + """, + url, + Any + )) + @datadep_str ID + catch + throw(ErrorException("download failed due to internet and/or server issues")) + end + end + + joinpath(dir, filename) +end + +""" + GeoBR.metadata(; version=v"1.7.0") + +Metadata for the specified `version` of the GeoBR database. +""" +metadata(; version=v"1.7.0") = + CSV.File(download("http://www.ipea.gov.br/geobr/metadata/metadata_$(version)_gpkg.csv"; version)) + +""" + GeoBR.get(entity, year=nothing, code=nothing; version=v"1.7.0", kwargs...) + +Load geographic data for given `entity`, `year` and `code`. +Optionally specify database `version` and `kwargs` passed to `GeoIO.load` function. +""" +function get(entity, year=nothing, code=nothing; version=v"1.7.0", kwargs...) + table = metadata(; version) + + function select(row) + result = row.geo == entity + if !isnothing(year) + result &= row.year == year + end + if !isnothing(code) + codestr = string(code) + result &= row.code == codestr || row.code_abbrev == codestr + end + result + end + + srows = table |> Filter(select) |> Tables.rows + + srow = if isnothing(year) + argmax(row -> row.year, srows) + else + srows |> first + end + + url = srow.download_path + GeoIO.load(download(url; version); kwargs...) +end + +""" + GeoBR.state(code="state"; year=nothing, kwargs...) + +Get state data. + +## Arguments + +* `code`: State code or abbreviation, e.g. 33 or "RJ" (default to all states); +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +state(code="state"; year=nothing, kwargs...) = get("state", year, code; kwargs...) + +""" + GeoBR.municipality(code="municipality"; year=nothing, kwargs...) + +Get municipality data for a given year. + +## Arguments + +* `code`: State code or abbreviation, e.g. 33 or "RJ" (default to all states); +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +municipality(code="municipality"; year=nothing, kwargs...) = get("municipality", year, code; kwargs...) + +""" + GeoBR.region(; year=nothing, kwargs...) + +Get region data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +region(; year=nothing, kwargs...) = get("regions", year; kwargs...) + +""" + GeoBR.country(; year=nothing, kwargs...) + +Get country data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +country(; year=nothing, kwargs...) = get("country", year; kwargs...) + +""" + GeoBR.amazon(; year=nothing, kwargs...) + +Get Amazon data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +amazon(; year=nothing, kwargs...) = get("amazonia_legal", year; kwargs...) + +""" + GeoBR.biomes(; year=nothing, kwargs...) + +Get biomes data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +biomes(; year=nothing, kwargs...) = get("biomes", year; kwargs...) + +""" + GeoBR.disasterriskarea(; year=nothing, kwargs...) + +Get disaster risk area data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +disasterriskarea(; year=nothing, kwargs...) = get("disaster_risk_area", year; kwargs...) + +""" + GeoBR.healthfacilities(; year=nothing, kwargs...) + +Get health facilities data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +healthfacilities(; year=nothing, kwargs...) = get("health_facilities", year; kwargs...) + +""" + GeoBR.indigenousland(; date=nothing, kwargs...) + +Get indigenous land data for a given date. + +## Arguments + +* `date`: Date of the data in format YYYYMM (default to latest available date); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +indigenousland(; date=nothing, kwargs...) = get("indigenous_land", date; kwargs...) + +""" + GeoBR.metroarea(; year=nothing, kwargs...) + +Get metropolitan area data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +metroarea(; year=nothing, kwargs...) = get("metropolitan_area", year; kwargs...) + +""" + GeoBR.neighborhood(; year=nothing, kwargs...) + +Get neighborhood data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +neighborhood(; year=nothing, kwargs...) = get("neighborhood", year; kwargs...) + +""" + GeoBR.urbanarea(; year=nothing, kwargs...) + +Get urban area data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +urbanarea(; year=nothing, kwargs...) = get("urban_area", year; kwargs...) + +""" + GeoBR.weightingarea(code; year=nothing, kwargs...) + +Get weighting area data for a given year. + +## Arguments + +* `code`: State code or abbreviation, e.g. 33 or "RJ"; +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +weightingarea(code; year=nothing, kwargs...) = get("weighting_area", year, code; kwargs...) + +""" + GeoBR.mesoregion(code; year=nothing, kwargs...) + +Get mesoregion data for a given year. + +## Arguments + +* `code`: State code or abbreviation, e.g. 33 or "RJ"; +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +mesoregion(code; year=nothing, kwargs...) = get("meso_region", year, code; kwargs...) + +""" + GeoBR.microregion(code; year=nothing, kwargs...) + +Get microregion data for a given year. + +## Arguments + +* `code`: State code or abbreviation, e.g. 33 or "RJ"; +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +microregion(code; year=nothing, kwargs...) = get("micro_region", year, code; kwargs...) + +""" + GeoBR.intermediateregion(code; year=nothing, kwargs...) + +Get intermediate region data for a given year. + +## Arguments + +* `code`: 4-digit code of an intermediate region. If the two-digit code or a + two-letter uppercase abbreviation of a state is passed, (e.g. 33 or "RJ") + the function will load all intermediate regions of that state. + Otherwise, all intermediate regions of the country are loaded. +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +function intermediateregion(code; year=nothing, kwargs...) + gtb = get("intermediate_regions", year; kwargs...) + gtb |> Filter(row -> row.abbrev_state == code || row.code_state == code || row.code_intermediate == code) +end + +""" + GeoBR.immediateregion(code; year=nothing, kwargs...) + +Get immediate region data for a given year. + +## Arguments + +* `code`: 6-digit code of an immediate region. If the two-digit code or a + two-letter uppercase abbreviation of a state is passed, (e.g. 33 or "RJ") + the function will load all immediate regions of that state. + Otherwise, all immediate regions of the country are loaded. +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +function immediateregion(code; year=nothing, kwargs...) + gtb = get("immediate_regions", year; kwargs...) + gtb |> Filter(row -> row.abbrev_state == code || row.code_state == code || row.code_immediate == code) +end + +""" + GeoBR.municipalseat(; year=nothing, kwargs...) + +Get municipal seat data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +municipalseat(; year=nothing, kwargs...) = get("municipal_seat", year; kwargs...) + +""" + GeoBR.censustract(code; year=nothing, kwargs...) + +Get census tract data for a given year. + +## Arguments + +* `code`: State code or abbreviation, e.g. 33 or "RJ"; +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +censustract(code; year=nothing, kwargs...) = get("census_tract", year, code; kwargs...) + +""" + GeoBR.statisticalgrid(code; year=nothing, kwargs...) + +Get statistical grid data for a given year. + +## Arguments + +* `code`: State code or abbreviation, e.g. 33 or "RJ"; +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +statisticalgrid(code; year=nothing, kwargs...) = get("statistical_grid", year, code; kwargs...) + +""" + GeoBR.conservationunits(; date=nothing, kwargs...) + +Get conservation units data for a given date. + +## Arguments + +* `date`: Date of the data in format YYYYMM (default to latest available date); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +conservationunits(; date=nothing, kwargs...) = get("conservation_units", date; kwargs...) + +""" + GeoBR.semiarid(; year=nothing, kwargs...) + +Get semiarid data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +semiarid(; year=nothing, kwargs...) = get("semiarid", year; kwargs...) + +""" + GeoBR.schools(; year=nothing, kwargs...) + +Get schools data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +schools(; year=nothing, kwargs...) = get("schools", year; kwargs...) + +""" + GeoBR.comparableareas(; startyear=1970, endyear=2010, kwargs...) + +Get comparable areas data for a given range of years. + +## Arguments + +* `startyear`: Start year of the data in format YYYY (default to 1970); +* `endyear`: End year of the data in format YYYY (default to 2010); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +function comparableareas(; startyear=1970, endyear=2010, version=v"1.7.0", kwargs...) + years = (1872, 1900, 1911, 1920, 1933, 1940, 1950, 1960, 1970, 1980, 1991, 2000, 2010) + + if startyear ∉ years || endyear ∉ years + throw(ArgumentError("invalid `startyear` or `endyear`, please use one these: $years_available")) + end + + table = metadata(; version) + srows = table |> Filter(row -> contains(row.download_path, "$(startyear)_$(endyear)")) |> Tables.rows + + if isempty(srows) + throw(ErrorException("no comparable areas found for the specified years")) + end + + srow = first(srows) + year = srow.year + code = srow.code + + get("amc", year, code; version, kwargs...) +end + +""" + GeoBR.urbanconcentrations(; year=nothing, kwargs...) + +Get urban concentrations data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +urbanconcentrations(; year=nothing, kwargs...) = get("urban_concentrations", year; kwargs...) + +""" + GeoBR.poparrangements(; year=nothing, kwargs...) + +Get population arrangements data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +poparrangements(; year=nothing, kwargs...) = get("pop_arrengements", year; kwargs...) + +""" + GeoBR.healthregion(; year=nothing, kwargs...) + +Get health region data for a given year. + +## Arguments + +* `year`: Year of the data in format YYYY (default to latest available year); +* `kwargs`: Keyword arguments passed to [`GeoBR.get`](@ref) function; +""" +healthregion(; year=nothing, kwargs...) = get("health_region", year; kwargs...) + +end diff --git a/test/runtests.jl b/test/runtests.jl index 1ea9361..7d0542b 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -222,6 +222,132 @@ using Test @test paramdim(gtb.geometry) == 2 end + @testset "GeoBR" begin + gtb = GeoBR.state() + @test gtb.geometry isa GeometrySet + @test paramdim(gtb.geometry) == 2 + gtb = GeoBR.state("RJ") + @test gtb.geometry isa GeometrySet + @test paramdim(gtb.geometry) == 2 + + gtb = GeoBR.municipality() + @test gtb.geometry isa GeometrySet + @test paramdim(gtb.geometry) == 2 + gtb = GeoBR.municipality("RJ") + @test gtb.geometry isa GeometrySet + @test paramdim(gtb.geometry) == 2 + + gtb = GeoBR.region() + @test gtb.geometry isa GeometrySet + @test paramdim(gtb.geometry) == 2 + + gtb = GeoBR.country() + @test gtb.geometry isa GeometrySet + @test paramdim(gtb.geometry) == 2 + + gtb = GeoBR.amazon() + @test gtb.geometry isa GeometrySet + @test paramdim(gtb.geometry) == 2 + + gtb = GeoBR.biomes() + @test gtb.geometry isa GeometrySet + @test paramdim(gtb.geometry) == 2 + + gtb = GeoBR.disasterriskarea() + @test gtb.geometry isa GeometrySet + @test paramdim(gtb.geometry) == 2 + + gtb = GeoBR.healthfacilities() + @test gtb.geometry isa GeometrySet + @test paramdim(gtb.geometry) == 0 + + # these tests are passing locally but are breaking in CI + # gtb = GeoBR.indigenousland() + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.metroarea() + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.neighborhood() + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.urbanarea() + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.weightingarea("RJ") + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.mesoregion("RJ") + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.microregion("RJ") + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.intermediateregion("RJ") + # @test gtb.geometry isa SubDomain + # @test paramdim(gtb.geometry) == 2 + # gtb = GeoBR.intermediateregion(3301) + # @test gtb.geometry isa SubDomain + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.immediateregion("RJ") + # @test gtb.geometry isa SubDomain + # @test paramdim(gtb.geometry) == 2 + # gtb = GeoBR.immediateregion(330001) + # @test gtb.geometry isa SubDomain + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.municipalseat() + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 0 + + # gtb = GeoBR.censustract("RJ") + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.statisticalgrid("RJ") + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.conservationunits() + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.semiarid() + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.schools() + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 0 + + # gtb = GeoBR.comparableareas() + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + # gtb = GeoBR.comparableareas(startyear=2000, endyear=2010) + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.urbanconcentrations() + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.poparrangements() + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + + # gtb = GeoBR.healthregion() + # @test gtb.geometry isa GeometrySet + # @test paramdim(gtb.geometry) == 2 + end + @testset "INMET" begin # automatic stations gtb = INMET.stations()