Skip to content

Instantly share code, notes, and snippets.

@ptalmeida
Last active January 6, 2023 16:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ptalmeida/b9d68071b1665dfc43c6fa63f794d4f5 to your computer and use it in GitHub Desktop.
Save ptalmeida/b9d68071b1665dfc43c6fa63f794d4f5 to your computer and use it in GitHub Desktop.
Portugal in TopoJSON with Districts and Islands.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ptalmeida
Copy link
Author

Portugal in TopoJSON with Districts and Islands.

Islands are purposefully not in their correct geographic positions in order to be closer to the continent. All inhabited islands have separate names, island groups can easily be made by editing the "arcs" arrays in the raw file.

VARNAME_1 HASC_1 TYPE_1 TYPE_1 Not correct for islands.

Continental map from https://github.com/deldersveld/topojson/blob/master/countries/portugal/portugal-districts.json.

@bernardorainha
Copy link

Hello @ptalmeida very good content, thanks for sharing!
Do you know if there is or if you ever developed a map of Portugal by county?

@ptalmeida
Copy link
Author

@bernardorainha these seem pretty complete for that https://miguelrofer.carto.com/tables/portugal_municipios/public / https://dados.gov.pt/pt/datasets/concelhos-de-portugal/#discussion-6321ba610781900bc9949313-0, if by country you mean Concelho.

For Freguesias I know of this one, https://censos.ine.pt/xportal/xmain?xpgid=censos21_populacao&xpid=CENSOS21, but you'd have to try to request the data from them.

@bernardorainha
Copy link

@ptalmeida that's right county (concelho). The first link suits for me, but I can't download the code to a json file (I need in this format to use it in PowerBi Maps).
Thank you so much, hope you have a good year!

@ptalmeida
Copy link
Author

There are online programs to convert any other geoJSON to topoJSON which should do the trick. Editors also, in case you need to make some changes. (it's what I did for the azores islands here). No problem, same for your :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment