{"id":26274366,"url":"https://github.com/jansim/rmaps","last_synced_at":"2025-06-30T02:33:32.542Z","repository":{"id":92825246,"uuid":"296740900","full_name":"jansim/rmaps","owner":"jansim","description":"Easily render minimal maps for posters using R and ggplot.","archived":false,"fork":false,"pushed_at":"2021-03-09T16:14:33.000Z","size":6519,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T22:58:06.072Z","etag":null,"topics":["ggplot","maps","poster","r"],"latest_commit_sha":null,"homepage":"","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/jansim.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-18T22:21:13.000Z","updated_at":"2024-07-21T08:31:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"9c38a1ff-efe1-4431-8251-7658217cdeeb","html_url":"https://github.com/jansim/rmaps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jansim/rmaps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jansim%2Frmaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jansim%2Frmaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jansim%2Frmaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jansim%2Frmaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jansim","download_url":"https://codeload.github.com/jansim/rmaps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jansim%2Frmaps/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262698988,"owners_count":23350218,"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":["ggplot","maps","poster","r"],"created_at":"2025-03-14T09:19:21.782Z","updated_at":"2025-06-30T02:33:32.508Z","avatar_url":"https://github.com/jansim.png","language":"R","readme":"---\noutput: github_document\n---\n\n```{r setup, include=FALSE}\nknitr::opts_chunk$set(echo = TRUE)\n```\n\n# 🗺️ rmaps: Minimal maps generated with R and ggplot\n\n[![Mockup of rendered map on the wall.](./example.jpg)](./README_files/example.pdf)\n\nCollection of R functions to render minimal maps using `ggplot`.\n\n# Getting Started\n\nThis project is not a R package and thus cannot be installed. To use this project, clone the repository and run `renv::install()` to install necessary packages / dependencies (if you do not have `rev`  installed yet, you might have to run `install.packages(\"renv\")` first and restart your R session). \nTo quickly render a map, simply run the following snippet of code with the working directory set to this repository.\n\n```{r fig.height=7, fig.width=5, dpi=300, message=FALSE, warning=FALSE}\n# This will load all included functions \u0026 packages\nsource(\"load.R\")\n\n# Download mapdata\nif (!file.exists(get_cache_path(\"amsterdam_example\", type = \"boundingbox\"))) {\n  # Example bounding box of central Amsterdam\n  boundingbox \u003c- st_bbox(c(xmin = 4.861836, ymin = 52.340088, xmax = 4.934535, ymax = 52.401469))\n  \n  # This will download the data and automatically write it into a cache file\n  # so as to not overload the free OpenStreetMaps API. All the cached files\n  # can be found in data/cache in the directory of this repository.\n  download_mapdata(data_id = \"amsterdam_example\", boundingbox = boundingbox)\n}\n\n# Load the data from cache\nmapdata \u003c- load_mapdata(\"amsterdam_example\")\n\n# Render the final map (this function has options for recoloring etc.)\nrender_map(mapdata)\n```\n\n## 🖨️ Print-ready PDFs\n\nThere is also a convenience function to render a full pdf ready for printing in DIN A1 size. If you want to create your own poster it might be a good start to just copy and adjust this function to your liking (or just use it as is!).\n\n```{r message=FALSE, warning=FALSE}\n# Generate pdf for printing\nfull_render_to_pdf(\n  mapdata,\n  name = \"Amsterdam, Noord-Holland, Netherlands\",\n  filename = \"example.pdf\",\n  dir = \"README_files\"\n)\n```\n\nThe resulting PDF can be found [here](./README_files/example.pdf).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjansim%2Frmaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjansim%2Frmaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjansim%2Frmaps/lists"}