From 809a4f7ce52240f212666a03d9426b7f8bc93e4d Mon Sep 17 00:00:00 2001 From: Erika Rasnick Date: Tue, 22 Oct 2019 14:52:24 -0400 Subject: [PATCH] point to app directory for reading roads shapefiles --- README.md | 6 +++--- _roadway_distance_and_length.R | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e1978fd..aae5da0 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ The U.S. Census Bureau defines primary (S1100) roadways as "generally divided, l ![](figs/us_primary_roads.png) -Secondary roads are described as "main arteries, usually in the U.S. highway, state highway, or county highway system" and "have one or more lanes of traffic in each direction, may or may not be divided, and usually have at-grade intersections with many other roads and driveways". +Secondary (S1200) roads are described as "main arteries, usually in the U.S. highway, state highway, or county highway system" and "have one or more lanes of traffic in each direction, may or may not be divided, and usually have at-grade intersections with many other roads and driveways". This container returns the distance to the nearest primary road and the distance to the nearest secondary road for each geocoded address, as well as the total length of primary roads and the total length of secondary roads within a buffer (defaults to 300 m) around each address. @@ -25,13 +25,13 @@ DeGAUSS arguments specific to this container: **MacOS** ``` -docker run --rm -v "$PWD":/tmp degauss/pepr_roadways:0.1 my_address_file_geocoded.csv +docker run --rm=TRUE -v "$PWD":/tmp degauss/pepr_roadways:0.2 my_address_file_geocoded.csv ``` **Microsoft Windows** ``` -docker run --rm -v "%cd%":/tmp degauss/pepr_roadways:0.1 my_address_file_geocoded.csv +docker run --rm=TRUE -v "%cd%":/tmp degauss/pepr_roadways:0.2 my_address_file_geocoded.csv ``` In the above example call, replace `my_address_file_geocoded.csv` with the name of your geocoded csv file. Optionally, you can add another argument for buffer radius. Otherwise, the buffer will be 300 meters. diff --git a/_roadway_distance_and_length.R b/_roadway_distance_and_length.R index 30c3a60..e233b6c 100755 --- a/_roadway_distance_and_length.R +++ b/_roadway_distance_and_length.R @@ -17,13 +17,13 @@ message('\nloading and projecting S1100 roads shapefile...') # roads1100 <- tigris::primary_roads(year=2018) %>% # spTransform(CRS('+init=epsg:5072')) # saveRDS(roads1100, "roads1100_sp_5072.rds") -roads1100 <- readRDS("roads1100_sp_5072.rds") +roads1100 <- readRDS("/app/roads1100_sp_5072.rds") message('\nloading and projecting S1200 roads shapefile...') # roads1200 <- rgdal::readOGR(dsn="all_TIGER_roads_2018.gpkg") %>% # spTransform(CRS('+init=epsg:5072')) # saveRDS(roads1200, "roads1200_sp_5072.rds") -roads1200 <- readRDS("roads1200_sp_5072.rds") +roads1200 <- readRDS("/app/roads1200_sp_5072.rds") message('\nloading and projecting input file...') raw_data <- suppressMessages(read_csv(args$file_name))