Code Monkey home page Code Monkey logo

neighborhood_diversity's Introduction

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.

neighborhood_diversity's People

Contributors

walkerke avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.