Skip to content

Add docs on registering custom shape files#6

Merged
arcresu merged 1 commit intocidm-ph:mainfrom
ammaraziz:main
Sep 10, 2025
Merged

Add docs on registering custom shape files#6
arcresu merged 1 commit intocidm-ph:mainfrom
ammaraziz:main

Conversation

@ammaraziz
Copy link
Contributor

Hi again,

I had to mess around a bit to use custom shape files with ggautomap. I wrote some basic docs to help others (and myself if I ever forget) on how to register and use local/custom shape files.

Feel free to amend or ignore as you see fit. Hopefully Rmd is correct.

Thanks,

Ammar

@arcresu
Copy link
Contributor

arcresu commented Sep 2, 2025

Thanks! Always happy to improve docs. I'll merge this and amend slightly when I next get a chance to work on the package.

One thing that you could consider is packaging the map data like I did for nswgeo. There's a vignette in cartographer that explains how to set up a package that registers its own maps. If you're usually working with the same geography then that's a one time setup cost.

@arcresu arcresu merged commit 49926d7 into cidm-ph:main Sep 10, 2025
6 of 7 checks passed
@ammaraziz
Copy link
Contributor Author

Thanks for merging!

Thats a really good tip about creating a package for the map. If I have time I'll put something together for the australian community.

@arcresu
Copy link
Contributor

arcresu commented Sep 11, 2025

If you do, check out what I did for nswgeo. The scripts to go from the ABS files to the package data are all included in data-raw/. One limitation is that if you publish the package to CRAN it can't be too large, so I had to reduce the resolution of boundaries. It's fine unless you need e.g. zoomed in postcode boundaries which start to get a bit janky.

I intended to do something similar for other jurisdictions but never got around to it. I kept it NSW-specific because there were local features like LHD boundaries, postcode normalisation (e.g. PO Box postcodes that show up in patient records might start with a different initial digit), postcode to LHD correspondence, and handling offshore territories and "unincorporated NSW" which are fun things you don't learn about until you poke around with geospatial datasets!

There's also absmapsdata and strayr for Australian data.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants