Giter VIP home page Giter VIP logo

spatial-analytics-viz's Introduction

Drive-Time Spatial Analytics Viz

Using RAPIDS cuDF, cuSpatial, and cuGraph with Plotly Dash - compute the demographic information of 300M+ individuals within a drive-time isocrone within seconds for any point in the contiental US.

Installation and Run Steps

Base Layer Setup

The visualization uses a Jawg map base layer that requires an access token. Create one for free here on jawg.io. Go to the demo root directory's plotly_demo folder and create a token file named .jawg_token. Copy your token contents into the file.

NOTE: Without the token, application will fall back to the free open-street-map tiles.

Datasets

The graph data for us-streets(nodes and edges), and the census data is automatically downloaded and extracted on the first run.

Running the Visualization App

You can setup and run the visualization with the conda or docker commands below. Once the app is started, it will look for the demongraphics datasets locally and, if not found, will download it. Currently the street data needs to me be manually downloaded.

Data

There are 3 main datasets:

  • 2010 Census for Population Density, combined with the 2010 ACS for demographics (~2.9 GB) | downloaded on first run
  • US-street data - nodes (~4.4 GB) | downloaded on first run
  • US-street data - edges (highways) (~3.3 GB) | downloaded on first run

For more information on how the Census and ACS data was prepared to show individual points, refer to the /Data Processing Directory.

Conda Env

Verify the following arguments in the environment.yml match your system. An easy way to check is the nvidia-smi command. An easy way to check is the nvidia-smi command. The most up to date OS and CUDA versions supported can be found here: RAPIDS requirements

# setup conda environment 
conda env create --name rapids_spatial_viz --file environment.yml
source activate rapids_spatial_viz

# run and access
cd plotly_demo
python app.py

Docker

Verify the following arguments in the Dockerfile match your system. An easy way to check is the nvidia-smi command. The most up to date OS and CUDA versions supported can be found here: RAPIDS requirements

# build
docker build -t plotly_demo .

# run and access via: http://localhost:8050 / http://ip_address:8050 / http://0.0.0.0:8050
docker run --gpus all -d -p 8050:8050 plotly_demo

Dependencies

  • python=3.8
  • plotly=4.5
  • cudf
  • cuspatial
  • cugraph
  • dash=1.8
  • dash-leaflet=0.1.10
  • dask=2.30.0
  • dask-cuda
  • dask-cudf
  • dash-daq=0.3.2
  • dash-extensions=0.0.33
  • dash_bootstrap_components=0.10.7
  • jupyter-dash=0.3.1
  • pyproj=2.6.1
  • pandas=1.1.3
  • geopandas=0.8.1

FAQ and Known Issues

What hardware do I need to run this locally? To run you need an NVIDIA GPU with at least 32GB of memory, and a Linux OS as defined in the RAPIDS requirements.

Why is the population data from 2010? Only census data is recorded on a block level, which provides the highest resolution population distributions available. For more details on census boundaries refer to the TIGERweb app.

The dashboard stop responding or the chart data disappeared! This is likely caused by an Out of Memory Error and the application must be restarted.

How do I request a feature or report a bug? Create an Issue and we will get to it asap.

Acknowledgments and Data Sources

  • 2010 Population Census and 2018 ACS data used with permission from IPUMS NHGIS, University of Minnesota, www.nhgis.org ( not for redistribution )
  • Base map layer provided by Jawg
  • Dashboard developed with Plot.ly Dash

spatial-analytics-viz's People

Contributors

ajaythorve avatar exactlyallan avatar

Watchers

James Cloos 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.