• Stars
    star
    129
  • Rank 279,262 (Top 6 %)
  • Language
    R
  • Created over 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Shiny application on neighborhood diversity

This application is in support of the article in Urban Studies, "Locating neighborhood diversity in the American Metropolis." The article analyzes geographic variations in neighborhood racial and ethnic diversity over time in large metropolitan areas in the United States. As of August 2022, this application is updated with data from the 2020 Decennial US Census. All data are standardized to 2010 Census tracts thanks to NHGIS.

The key metric in this article is the neighborhood-level entropy index (called "diversity score" in the application), which measures the degree of neighborhood diversity for six general racial/ethnic groups: non-Hispanic white, non-Hispanic black, Hispanic, Asian/Pacific Islander, Native American. The entropy index $E$ is calculated as follows (Farrell and Lee 2011):

$$E = {\sum\limits_{r=1}^{n}Q_r}ln{\dfrac{1}{Q_r}}$$

where $Q_r$ is group $r$'s proportion of the neighborhood population. The maximum value of $E$, then, is the natural log of the number of groups - which would occur when all groups in a neighborhood are of equal size. Following Hall and Lee (2010), Farrell and Lee (2011), and Wright et al. (2014), $E$ is scaled by its maximum by dividing by $ln(6)$, setting the range of values from 0 to 1.

To study how neighborhood diversity varies with distance from urban cores in the largest metropolitan areas in the United States, entropy indices are plotted against the distance from the Census tract centroids to their corresponding nearest major city hall. Locally-weighted regression (LOESS) is then used to produce a "diversity gradient" of estimates of neighborhood diversity by distance from the city center.

This application allows visitors to explore this part of the paper interactively. The article follows by using local exploratory spatial data analysis techniques to identify how spatial clusters of diversity have shifted over time; this will be the focus of a future application that corresponds to an extension of the study published in Urban Studies.

Demographic data come from the National Historical Geographic Information System's Time Series tables, which standardize decennial Census data from 1990 through 2020 to 2010 Census tracts. Geographic data in the application are from the US Census Bureau's Cartographic Boundary Files, obtained with the R tigris package. Entropy indices are built with the R segregation package.

The application is built with the Shiny framework for the R programming language. The application layout is produced with the flexdashboard package, and the charts and maps use Plotly, Leaflet.js, Highcharts, and ggplot2, all accessed through their corresponding R packages. Code for the application is available at https://github.com/walkerke/neighborhood_diversity.

To learn more about my work, visit my website or connect with me on Twitter.

More Repositories

1

tidycensus

Load US Census boundary and attribute data as 'tidyverse' and 'sf'-ready data frames in R
R
638
star
2

tigris

Download and use Census TIGER/Line shapefiles in R
R
324
star
3

crsuggest

Get appropriate CRS suggestions for your spatial data in R
R
128
star
4

mapboxapi

R interface to Mapbox web services
HTML
110
star
5

pygris

Use US Census shapefiles in Python (port of the R tigris package)
Python
108
star
6

mapgl

R interface to Mapbox GL JS v3 and Maplibre GL JS
HTML
87
star
7

census-with-r-book

Source for Analyzing US Census Data: Methods, Maps, and Models in R by Kyle Walker, published with CRC Press
HTML
81
star
8

bsselectR

In-progress htmlwidget for bootstrap-select
JavaScript
61
star
9

idbr

An R interface to the US Census Bureau International Data Base API
R
58
star
10

education_map

Educational Attainment in America
HTML
51
star
11

umich-workshop-2023

Materials for ACS workshops given at SSDAN / University of Michigan in 2023
HTML
48
star
12

umich-workshop

Slides and code for tidycensus workshops given at the University of Michigan in March 2021
HTML
47
star
13

map-challenge-2023

Code and maps for 2023's 30 Day Map Challenge
HTML
43
star
14

geog30323

Materials for GEOG 30323: Data Analysis & Visualization at TCU
Jupyter Notebook
37
star
15

umich-workshop-2024

Slides and code for workshops given with the University of Michigan's SSDAN in 2024
HTML
36
star
16

umich-workshop-2022

Slides and code for Census data workshops given at the University of Michigan in 2022
JavaScript
31
star
17

mb-immigrants

HTML
24
star
18

teaching-with-datavis

Code for 'Teaching with Interactive Data Visualization' site
HTML
23
star
19

sports-geography

Materials for Sports Geography & Society, taught May Session 2018 at TCU
HTML
20
star
20

walkerke.github.io

Walker Data website
HTML
19
star
21

kwgeo

Tools for visualizing and manipulating geographic data in R
R
12
star
22

texas_pyramids

Shiny application to explore Texas county demographics
R
9
star
23

cloud-spatial-data-science

Tutorials on how to set up a spatial data science environment on Amazon EC2
TeX
9
star
24

acs14lite

Lightweight R interface to the Census API for the 2010-2014 American Community Survey
R
8
star
25

MUSAmasterclass

HTML
7
star
26

wdi-shiny

Shiny app to explore World Bank datasets
HTML
7
star
27

isds-webinar

Slides and materials for ISDS R Users Group webinar
HTML
6
star
28

dfw-election-dot-map

Dot map of the 2016 presidential election in Dallas-Fort Worth
R
6
star
29

rmdwebsite

R Markdown source code for my personal website
HTML
6
star
30

whats-new-in-tidycensus

Slides for tidycensus webinar on September 28, 2023
HTML
6
star
31

uw-workshop

Repository for workshop given at UW CSDE in February 2022
R
4
star
32

census-r

Website for "Analyzing US Census Data: Methods, Maps, and Models with R" forthcoming with CRC Press
HTML
4
star
33

urbanslides

Slides for GEOG 10023, "An Urban World", taught Spring 2020 at TCU
HTML
4
star
34

us-boundaries

R
4
star
35

home-value-dots

Dot-density map of owner-occupied home values from the 2018-2022 ACS
HTML
4
star
36

sha2017

Slides and data for Geographic Information Systems workshop at the 2017 Society for Historical Archaeology conference
HTML
3
star
37

gender-age-explorer

Shiny application to explore population structure and gender ratios
HTML
3
star
38

aag2017

Slides and code for presentation at 2017 AAG meetings
R
3
star
39

tigris-article

In-progress article, "Geographic visualization and analysis in R with tigris"
TeX
3
star
40

tigris-webinar

Materials for tigris webinar on April 4, 2017
HTML
3
star
41

tigris-zip-income

Shiny application in support of R Journal submission
R
3
star
42

urbangis

Slides for "GEOG 40323: Urban & Business GIS", taught Spring 2018 at TCU
HTML
2
star
43

qgis-tutorial

Tutorial for geocoding and calculating distances in QGIS
2
star
44

tiles

This repo stores tiles for web mapping.
HTML
2
star
45

oldred

Code and slides for my Sept 19 talk, "Visualizing the changing landscape of US immigration"
HTML
2
star
46

txgis2017

Slides and code for Texas GIS Forum presentation
HTML
1
star
47

dimple-pyramid

Shiny app to create interactive population pyramids - WIP
R
1
star
48

tlc2014

Slides for Teaching and Learning Conversation on March 26, 2014
JavaScript
1
star
49

geog30313

Slides for GEOG 30313: Introduction to GIS at TCU
HTML
1
star
50

map-challenge-2024

Code and maps for 2024's 30 Day Map Challenge
1
star