• Stars
    star
    124
  • Rank 278,154 (Top 6 %)
  • Language
    R
  • Created about 8 years ago
  • Updated over 1 year 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
613
star
2

tigris

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

crsuggest

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

mapboxapi

R interface to Mapbox web services
HTML
101
star
5

pygris

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

census-with-r-book

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

bsselectR

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

idbr

An R interface to the US Census Bureau International Data Base API
R
57
star
9

education_map

Educational Attainment in America
JavaScript
49
star
10

umich-workshop

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

umich-workshop-2023

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

map-challenge-2023

Code and maps for 2023's 30 Day Map Challenge
HTML
39
star
13

geog30323

Materials for GEOG 30323: Data Analysis & Visualization at TCU
Jupyter Notebook
36
star
14

umich-workshop-2022

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

mb-immigrants

HTML
24
star
16

teaching-with-datavis

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

sports-geography

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

walkerke.github.io

Walker Data website
HTML
15
star
19

kwgeo

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

texas_pyramids

Shiny application to explore Texas county demographics
R
9
star
21

cloud-spatial-data-science

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

acs14lite

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

MUSAmasterclass

HTML
7
star
24

wdi-shiny

Shiny app to explore World Bank datasets
HTML
7
star
25

isds-webinar

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

dfw-election-dot-map

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

rmdwebsite

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

whats-new-in-tidycensus

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

uw-workshop

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

urbanslides

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

us-boundaries

R
4
star
32

sha2017

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

gender-age-explorer

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

census-r

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

aag2017

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

tigris-webinar

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

tigris-article

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

tigris-zip-income

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

urbangis

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

qgis-tutorial

Tutorial for geocoding and calculating distances in QGIS
2
star
41

tiles

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

oldred

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

umich-workshop-2024

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

txgis2017

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

dimple-pyramid

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

tlc2014

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

geog30313

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

home-value-dots

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