{"id":16708306,"url":"https://github.com/rcarto/spikemap","last_synced_at":"2025-03-21T20:32:50.944Z","repository":{"id":89808703,"uuid":"263607669","full_name":"rCarto/spikemap","owner":"rCarto","description":"Maps made of spikes","archived":false,"fork":false,"pushed_at":"2020-05-15T08:55:33.000Z","size":9200,"stargazers_count":76,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-13T19:43:15.814Z","etag":null,"topics":[],"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/rCarto.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2020-05-13T11:16:12.000Z","updated_at":"2024-07-29T16:45:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"45886dc3-db86-4ee2-a81c-cbf884a5dd48","html_url":"https://github.com/rCarto/spikemap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rCarto%2Fspikemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rCarto%2Fspikemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rCarto%2Fspikemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rCarto%2Fspikemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rCarto","download_url":"https://codeload.github.com/rCarto/spikemap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221818478,"owners_count":16885760,"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-10-12T19:43:38.075Z","updated_at":"2024-10-28T10:46:43.709Z","avatar_url":"https://github.com/rCarto.png","language":"R","readme":"# spikemap\n\n[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)\n\n\nIt is possible to map quantities with circles, squares or other simple \ngeometric symbols, `spikemap` uses spikes.\n\n\n![Spike Map](img/spiky.png)\n\n\n\n## Installation\n* Development version on GitHub\n```{r}\nrequire(remotes)\ninstall_github(\"rCarto/spikemap\")\n```\n\n\n## Demo\n\n```r\nlibrary(sf)\nlibrary(spikemap)\nlibrary(cartography)\n\n# import the dataset from the package\ncom \u003c- st_read(system.file(\"gpkg/com.gpkg\", package=\"spikemap\"))\n\n# save figure as spiky.png in img folder\npng(filename = \"img/spiky.png\", width = 1000, height = 722, res = 100)\n# set the margin of the figure\npar(mar = c(0.2,0.2,0.2,0.2))\n\n# plot the base map\nplot(st_geometry(com), col=\"#99aed1\", border = \"#e1e5eb\",\n     lwd = 0.2, bg = \"#e1e5eb\")\n\n# display spikes for municipalities under 1000 inhabitants.\n# use fixmax arg to allow multiple spike plots with the same scale.\nspikemap(x = com[com$pop\u003c=1000, ], var = \"pop\",\n         inches = 2.5, fixmax = 500000,\n         col = \"#ffffff90\", border = \"#94000090\",  lwd = .5,\n         legend.pos = \"x\")\n# display spikes for other municipalities\n# use locator() to pick a place for the legend or use \"bottomleft\".\nspikemap(x = com[com$pop\u003e1000, ], var = \"pop\",\n         inches = 2.5, fixmax = 500000,\n         col = \"#ffffff\", border = \"#940000\", lwd = 1.1,\n         legend.pos = c(779307.2, 6128000),\n         legend.title.txt = \"Population\",\n         legend.values.rnd = -3)\n\n# get the tips of the spikes\nlbl \u003c- spikelabel(x = com, var = \"pop\",\n                  inches = 2.5, fixmax = 500000)\nlbl \u003c- lbl[order(lbl$pop, decreasing = T),]\n# display only the 12 first, use various cex and halo\nlabelLayer(lbl[1:12,], txt = \"name\",\n           pos = 3, offset = .5,\n           halo = T, bg = \"#99aed150\",\n           cex = c(1.3, 1.1, 1, rep(.8,12)),\n           col = \"grey30\")\n\n# add scale bar, north arrow, title, sources...\nbarscale(size = 20, pos= c(629638.7 ,6136862.3 ), lwd = 1)\nnorth(pos = \"topright\", col = \"grey60\", x = com)\nlayoutLayer(title = \"\",\n            sources = \"ADMIN EXPRESS COG édition 2019, IGN\",\n            author = \"T. Giraud, 2020 | spikemap 0.1.0\",\n            frame = FALSE, scale = FALSE)\nmtext(\"Population \\nin Occitanie\",\n      side = 3, adj = 0.01, padj = 0, line = -5,\n      cex = 2.5, font = 3, col = \"grey30\")\n\ndev.off()\n```\n\u003cimg src=\"img/spiky.png\" width=\"50%\"\u003e   \n\n\n## Gallery\n\n\u003cimg src=\"img/spikywrld.png\" \u003e  \n\n\u003cimg src=\"img/fire.png\" \u003e  \n\n\n## Inspiration\n\nInspiration from the New York Times front page maps by Lazaro Gamio, Karen Yourish and Bill Marsh (2020/04/08 edition).  \n\u003cimg src=\"img/nyt.jpeg\" width=\"33%\"\u003e\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcarto%2Fspikemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frcarto%2Fspikemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcarto%2Fspikemap/lists"}