{"id":18722557,"url":"https://github.com/mdsumner/ozmaps","last_synced_at":"2025-04-12T14:53:11.068Z","repository":{"id":53072106,"uuid":"219730319","full_name":"mdsumner/ozmaps","owner":"mdsumner","description":"Australian maps","archived":false,"fork":false,"pushed_at":"2021-07-25T11:43:13.000Z","size":49914,"stargazers_count":16,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T09:22:09.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mdsumner.github.io/ozmaps/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdsumner.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-05T11:36:41.000Z","updated_at":"2025-03-22T08:14:08.000Z","dependencies_parsed_at":"2022-08-30T23:51:38.772Z","dependency_job_id":null,"html_url":"https://github.com/mdsumner/ozmaps","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fozmaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fozmaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fozmaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdsumner%2Fozmaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdsumner","download_url":"https://codeload.github.com/mdsumner/ozmaps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586227,"owners_count":21128995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T13:42:00.457Z","updated_at":"2025-04-12T14:53:11.044Z","avatar_url":"https://github.com/mdsumner.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\neditor_options: \n  chunk_output_type: console\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n[![Build Status](http://badges.herokuapp.com/travis/mdsumner/ozmaps?branch=master\u0026env=BUILD_NAME=trusty_release\u0026label=ubuntu)](https://travis-ci.org/mdsumner/ozmaps)\n[![Build Status](http://badges.herokuapp.com/travis/mdsumner/ozmaps?branch=master\u0026env=BUILD_NAME=osx_release\u0026label=osx)](https://travis-ci.org/mdsumner/ozmaps) \n[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/mdsumner/ozmaps?branch=master\u0026svg=true)](https://ci.appveyor.com/project/mdsumner/ozmaps) \n [![CRAN status](http://www.r-pkg.org/badges/version/ozmaps)](https://cran.r-project.org/package=ozmaps)\n ![cranlogs](http://cranlogs.r-pkg.org./badges/ozmaps)\n[![Coverage Status](https://img.shields.io/codecov/c/github/mdsumner/ozmaps/master.svg)](https://codecov.io/github/mdsumner/ozmaps?branch=master)\n\n \n```{r setup, include = FALSE}\nlibrary(dplyr)\nlibrary(sf)\nlibrary(rmapshaper)\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n#knitr::read_chunk(\"data-raw/download_2016.R\")\n\n```\n# Overview\n\nThe goal of ozmaps is to get maps of Australia to plot!\n\n# Installation\n\nInstall from CRAN with \n\n```{r install, eval=FALSE}\ninstall.packages(\"ozmaps\")\n```\n\nThe development version of ozmaps may be installed directly from github. \n\n```{r dev-install, eval = FALSE}\ndevtools::install_github(\"mdsumner/ozmaps\")\n```\n\nThe package includes some *simple features* data, which can be used\nindependently of ozmaps with the `sf` package. If required, install `sf` from CRAN. \n\n**NOTE:** Since April 2020) we *must* have sf installed because of\nrequirements of the tibble package. \n\nIf sf causes you problems or you can't work with it [get in touch](https://github.com/mdsumner/ozmaps/issues/) and I will help you.\n\n```{r sf-install,eval=FALSE}\ninstall.packages(\"sf\")\n```\n\n## Usage\n\nPlot Australia with states. \n\n```{r ozmap}\nlibrary(ozmaps)\nozmap()\n\n```\n\nPlot Australia without states. \n\n```{r country}\nozmap(x = \"country\")\n```\n\nAdd to an existing plot. \n\n```{r add-plot}\nplot(quakes[c(\"long\", \"lat\")], xlim = c(120, 190))\nozmap(add = TRUE)\n```\n\nObtain the data used in `sf` form. \n\n```{r sf-format}\nsf_oz \u003c- ozmap_data(\"states\")\n\ntibble::as_tibble(sf_oz)\n```\n\nPlot with a custom palette. \n\n```{r ochRe}\nlibrary(sf)\nif (utils::packageVersion(\"paletteer\") \u003c '1.0.0') {\n pal \u003c- paletteer::paletteer_d(package = \"ochRe\", palette = \"namatjira_qual\")\n} else {\n  pal \u003c- paletteer::paletteer_d(palette = \"ochRe::namatjira_qual\")\n} \n\nopal \u003c- colorRampPalette(pal)\nnmjr \u003c- opal(nrow(sf_oz))\nplot(st_geometry(sf_oz), col = nmjr)\n\n## plot directly with ggplot2\nlibrary(ggplot2)\nggplot(sf_oz, aes(fill = NAME)) + geom_sf() + coord_sf(crs = \"+proj=lcc +lon_0=135 +lat_0=-30 +lat_1=-10 +lat_2=-45 +datum=WGS84\") + scale_fill_manual(values = nmjr)\n```\n\n\nPlot the ABS layers (from 2016). \n\n```{r abs}\nozmap(\"abs_ced\", col = opal(nrow(abs_ced)))\n\n\nozmap(\"abs_ste\", col = opal(nrow(abs_ste)))\n```\n\n\n\n## Resolution \n\nThese ABS layers `abs_ced`, `abs_lga`, and `abs_ste` are derived from the 2016 sources and simplified using `rmapshaper::ms_simplify(, keep = 0.05, keep_shapes = TRUE)` so all the original polygons are there. There is sufficient detail to map many (most?) of the regions on their own, which was a major goal for this package. \n\nThe cache of the source data at original resolution is available in [ozmaps.data](https://github.com/mdsumner/ozmaps.data/). \n\nCompare the detail of Bruny Island here in this box, compared with the \nvery basic maps package layer. \n\n```{r detail}\nlibrary(dplyr)\nkbor \u003c- abs_lga %\u003e% dplyr::filter(grepl(\"Kingborough\", NAME))\nbb \u003c- st_bbox(kbor)\n\nlayout(matrix(c(1, 1, 1, 2, 2, 2, 2, 2, 2), nrow = 3))\nplot(kbor, reset = FALSE, main = \"Kingborough (TAS)\")\nrect(bb[\"xmin\"], bb[\"ymin\"], bb[\"xmax\"], bb[\"ymax\"])\nlibrary(mapdata)\npar(mar = rep(0, 4))\nplot(c(145, 148.5), c(-43.6, -40.8), type = \"n\", asp = 1/cos(mean(bb[c(2, 4)]) * pi/180), axes = FALSE, xlab = \"\", ylab = \"\")\nmaps::map(database = \"worldHires\", regions = \"australia\", xlim = c(145, 148.5), ylim = c(-43.6, -40.8), add = TRUE)\nrect(bb[\"xmin\"], bb[\"ymin\"], bb[\"xmax\"], bb[\"ymax\"])\n```\n\n\n\n---\n\n Please note that the 'ozmaps' project is released with a [Contributor Code of Conduct](https://github.com/mdsumner/ozmaps/blob/master/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsumner%2Fozmaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdsumner%2Fozmaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdsumner%2Fozmaps/lists"}