{"id":17991446,"url":"https://github.com/nowosad/raceland","last_synced_at":"2025-10-12T17:09:48.595Z","repository":{"id":83717709,"uuid":"197212056","full_name":"Nowosad/raceland","owner":"Nowosad","description":"Pattern-Based, Zoneless Method for Analysis and Visualization of Racial Topography","archived":false,"fork":false,"pushed_at":"2023-04-14T14:34:00.000Z","size":27557,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T15:12:32.860Z","etag":null,"topics":["information-theory","landscape","r","racial-diversity","raster","residential-segregation","spatial"],"latest_commit_sha":null,"homepage":"https://jakubnowosad.com/raceland/","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":"2019-07-16T14:41:09.000Z","updated_at":"2023-03-31T15:34:16.000Z","dependencies_parsed_at":"2024-10-29T20:09:42.203Z","dependency_job_id":null,"html_url":"https://github.com/Nowosad/raceland","commit_stats":{"total_commits":207,"total_committers":1,"mean_commits":207.0,"dds":0.0,"last_synced_commit":"6df44fd813582a386ab7020c00b9a5d645846ef3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Nowosad/raceland","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowosad%2Fraceland","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowosad%2Fraceland/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowosad%2Fraceland/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowosad%2Fraceland/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nowosad","download_url":"https://codeload.github.com/Nowosad/raceland/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowosad%2Fraceland/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279012180,"owners_count":26085078,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["information-theory","landscape","r","racial-diversity","raster","residential-segregation","spatial"],"created_at":"2024-10-29T19:22:09.895Z","updated_at":"2025-10-12T17:09:48.549Z","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# raceland\n\n\u003c!-- badges: start --\u003e\n[![R build status](https://github.com/Nowosad/raceland/workflows/pkgdown/badge.svg)](https://github.com/Nowosad/raceland/actions)\n[![Codecov test coverage](https://codecov.io/gh/Nowosad/raceland/branch/master/graph/badge.svg)](https://app.codecov.io/gh/Nowosad/raceland?branch=master)\n[![CRAN status](https://www.r-pkg.org/badges/version/raceland)](https://CRAN.R-project.org/package=raceland)\n[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/raceland)](https://cran.r-project.org/package=raceland)\n\u003c!-- badges: end --\u003e\n\nThe **raceland** package implements a computational framework for a pattern-based, zoneless analysis, and visualization of (ethno)racial topography (Dmowska et al., 2020). \nIt is a reimagined approach for analyzing residential segregation and racial diversity based on the concept of ‘landscape’ used in the domain of landscape ecology.\nA racial landscape, represented by a high-resolution raster grid with each cell containing only inhabitants of a single race, is quantified by two metrics (entropy and mutual information) derived from Information Theory concept (IT).\nEntropy is the measure of racial diversity and mutual information measures racial segregation. \n\nRacial landscape method is based on the raster gridded data, and unlike the previous methods, does not depend on the division of specific zones (census tract, census block, etc.). \nCalculation of racial diversity (entropy) and racial segregation (mutual information) can be performed for the whole area of interests (i.e., metropolitan area) without introducing any arbitrary divisions. \nRacial landscape method also allows for performing calculations at different spatial scales. \n\n## Installation\n\nYou can install the released version of raceland from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"raceland\")\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/raceland\")\n```\n## Example\n\n```{r}\nlibrary(raceland)\nlibrary(terra)\n```\n\n```{r}\n# Plot the input data\nrace_raster = rast(system.file(\"extdata/race_raster.tif\", package = \"raceland\"))\nplot(race_raster)\n```\n\n```{r}\n# Construct racial landscape\nreal_raster = create_realizations(x = race_raster, n = 100)\nrace_colors = c(\"#F16667\", \"#6EBE44\", \"#7E69AF\", \"#C77213\",\"#F8DF1D\")\nplot(real_raster, col = race_colors, maxnl = 9)\n```\n\n```{r}\n# Plot racial ladnscape \nplot_realization(x = real_raster[[1]], y = race_raster, hex = race_colors)\n```\n\n```{r}\n# Calculate local subpopulation densities\ndens_raster = create_densities(real_raster, race_raster, window_size = 10)\nplot(dens_raster, maxnl = 9)\n```\n\n```{r}\n# Calculate IT-metrics \nmetr_df = calculate_metrics(x = real_raster, w = dens_raster,\n                            neighbourhood = 4, fun = \"mean\", \n                            size = NULL, threshold = 1)\nhead(metr_df)\n```\n\n```{r}\n# Summarize IT metrics \nsummary(metr_df[, c(\"ent\", \"mutinf\")])\n```\n\n## References\n\n- Dmowska, A., Stepinski T., Nowosad J. Racial landscapes – a pattern-based, zoneless method for analysis and visualization of racial topography. Applied Geography. 122:1-9, http://dx.doi.org/10.1016/j.apgeog.2020.102239\n\n## Contribution\n\nContributions to this package are welcome.\nThe preferred method of contribution is through a GitHub pull request. \nFeel free to contact us by creating [an issue](https://github.com/Nowosad/raceland/issues). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowosad%2Fraceland","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnowosad%2Fraceland","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowosad%2Fraceland/lists"}