# Data from Brazil states (and generic region) using VegaDatasets

**URL:** <https://discourse.julialang.org/t/data-from-brazil-states-and-generic-region-using-vegadatasets/127761>\
**Category:** Visualization\
**Created:** [April 6, 2025, 2:57pm UTC](https://discourse.julialang.org/t/data-from-brazil-states-and-generic-region-using-vegadatasets/127761 "2025-04-06T14:57:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![angeloaliano1](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Post date:** [April 6, 2025, 2:57pm UTC](https://discourse.julialang.org/t/data-from-brazil-states-and-generic-region-using-vegadatasets/127761/1 "2025-04-06T14:57:04Z")

</div>

Dear all, I have the following code that draws the US map with its states:

```julia
using VegaLite, VegaDatasets

# load JSON file containing map of US

us10m = dataset("us-10m")

# 1. US Map by State

# how to generate plot

p = @vlplot(
    width = 640,
    height = 360,
    title = "US Map by State",
    projection = {type = :albersUsa},
    data = {
        values = us10m,
        format = {
            type = :topojson,
            feature = :states
        }
    },
    mark = {
        type = :geoshape,
        fill = :lightgray,
        stroke = :white
    }
)

```

works perfectly.  
How can I adapte this code to produce:

1. the map of Brazil with its states.
2. the map of the Europe with its capitals
3. a general region, with a given points (Lat., Long) and conect some them. Is it possible to download the data from a url and insert this information in Julia?

I would like for these informations. Many thanks forr the attention.

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [April 6, 2025, 3:05pm UTC](https://discourse.julialang.org/t/data-from-brazil-states-and-generic-region-using-vegadatasets/127761/2 "2025-04-06T15:05:54Z")

</div>

The most up-to-date data for Brazil is maintained by IPEA, in the geobr dataset. We wrapped this dataset in GeoArtifacts.jl under the `GeoBR` submodule. You can use the package to download the data.

The data comes as geopackage files if I remember correctly. There are several packages in Julia to load the file. GeoArtifacts.jl itself will load the data for you, but you can use other lower-level packages as well. After the data is loaded, it should be easy to provide the information VegaLite.jl needs.

---

<div class="post-metadata">

**Author:** ![angeloaliano1](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Post date:** [April 6, 2025, 3:11pm UTC](https://discourse.julialang.org/t/data-from-brazil-states-and-generic-region-using-vegadatasets/127761/3 "2025-04-06T15:11:33Z")

</div>

Please, could you insert the commands to imports these data? And to Europe, for example? I need only GeoArtifacts.jl?  
I am an new user.  
Thank you so much.

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [April 6, 2025, 3:19pm UTC](https://discourse.julialang.org/t/data-from-brazil-states-and-generic-region-using-vegadatasets/127761/4 "2025-04-06T15:19:13Z")

</div>

The commands are in the README of the package. For Europe there are other datasets in the package like NaturalEarth and GADM.
