Skip to content

Generate a cuGraph road graph and node table from US Census Bureau TIGER/LINE vector data

Notifications You must be signed in to change notification settings

MurrayData/us_tiger_roadgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

us_tiger_roadgraph

Work in progress - alpha version

Notebook to generate a RAPIDS cuGraph compatible road graph, with node table, from US Census Bureau TIGER/LINE Edge vector data

Requires cudf and pyshp

To install pyshp with anaconda, use the following command:

conda install -c conda-forge pyshp

Link to US Census Bureau TIGER/LINE data

US TIGER/LINE Documentation

Geographic Shapefile Concepts Overview

MAF/TIGER Feature Class Code (MTFCC) Definitions

New - added enumerated (MAF/TIGER Feature Class Code)

I've added enumerated mtfcc (MAF/TIGER Feature Class Code) to the road graph edges. This will allow the graph to be filterered with cudf query before applying cuGraph analysis.

Example to exclude primary roads (e.g. to build a walking graph):

qdf = gdf.query("mtfcc!=0")
G = cugraph.Graph()
G.add_edge_list(qdf["src"], qdf["dst"],qdf['dist'])
# Call cugraph.sssp to get the road distance from origin
start = 1000
# Filter on predecessor to elimate nodes excluded by the filter
df = cugraph.sssp(G,start).query("predecessor>=0")

Check output of mtfcc enumeration in notebook and refer to MTFCC documentation above for different roadtypes

About

Generate a cuGraph road graph and node table from US Census Bureau TIGER/LINE vector data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published