{"id":17991410,"url":"https://github.com/nowosad/regional","last_synced_at":"2025-03-25T23:32:08.462Z","repository":{"id":41470599,"uuid":"383820849","full_name":"Nowosad/regional","owner":"Nowosad","description":"Intra- and Inter-Regional Similarity","archived":false,"fork":false,"pushed_at":"2024-05-09T13:28:27.000Z","size":891,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T22:53:09.576Z","etag":null,"topics":["r","r-package","rspatial","rstats"],"latest_commit_sha":null,"homepage":"https://jakubnowosad.com/regional","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nowosad.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2021-07-07T14:09:49.000Z","updated_at":"2024-05-31T17:33:08.000Z","dependencies_parsed_at":"2024-05-09T15:05:43.536Z","dependency_job_id":null,"html_url":"https://github.com/Nowosad/regional","commit_stats":{"total_commits":62,"total_committers":1,"mean_commits":62.0,"dds":0.0,"last_synced_commit":"f89dca9ce862ca213c5588f9e0e98a9d5077cdff"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowosad%2Fregional","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowosad%2Fregional/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowosad%2Fregional/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowosad%2Fregional/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nowosad","download_url":"https://codeload.github.com/Nowosad/regional/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245562135,"owners_count":20635874,"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":["r","r-package","rspatial","rstats"],"created_at":"2024-10-29T19:21:56.265Z","updated_at":"2025-03-25T23:32:04.154Z","avatar_url":"https://github.com/Nowosad.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# regional\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/regional)](https://CRAN.R-project.org/package=regional)\n[![R-CMD-check](https://github.com/Nowosad/regional/workflows/R-CMD-check/badge.svg)](https://github.com/Nowosad/regional/actions)\n[![Codecov test coverage](https://codecov.io/gh/Nowosad/regional/branch/master/graph/badge.svg)](https://app.codecov.io/gh/Nowosad/regional?branch=master)\n[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/regional)](https://cran.r-project.org/package=regional)\n\u003c!-- badges: end --\u003e\n\nThe **regional** package calculates intra-regional and inter-regional similarities based on user-provided spatial vector objects (regions) and spatial raster objects (cells with values).\nImplemented metrics include inhomogeneity, isolation (Haralick and Shapiro (1985), https://doi.org/10.1016/S0734-189X(85)90153-7, Jasiewicz et al. (2018), https://doi.org/10.1016/j.cageo.2018.06.003), and distinction (Nowosad (2021), https://doi.org/10.1080/13658816.2021.1893324).\n\n## Installation\n\nYou can install the released version of regional from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"regional\")\n```\n\nYou can install the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"remotes\")\nremotes::install_github(\"Nowosad/regional\")\n```\n\n## Example\n\n```{r, message=FALSE}\nlibrary(regional)\nlibrary(terra)\nlibrary(sf)\nvolcano = rast(system.file(\"raster/volcano.tif\", package = \"regional\"))\nvr = read_sf(system.file(\"regions/volcano_regions.gpkg\", package = \"regional\"))\nplot(volcano)\nplot(vect(vr), add = TRUE)\n```\n\n### Inhomogeneity\n\nHow much internally inconsistent each region is?\n\n```{r}\nvr$inh = reg_inhomogeneity(vr, volcano, sample_size = 0.5)\nplot(volcano)\nplot(vr[\"inh\"], add = TRUE)\nmean(vr$inh)\n```\n\n### Isolation\n\nHow much the focus region differs from its neighbors?\n\n```{r}\nvr$iso = reg_isolation(vr, volcano, sample_size = 1)\nplot(volcano)\nplot(vr[\"iso\"], add = TRUE)\nmean(vr$iso)\n```\n\n## Contribution\n\nContributions to this package are welcome - let me know if you need other distance measures or transformations, have any suggestions, or spotted a bug. \nThe preferred method of contribution is through a GitHub pull request. \nFeel also free to contact us by creating [an issue](https://github.com/nowosad/regional/issues).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowosad%2Fregional","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnowosad%2Fregional","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowosad%2Fregional/lists"}