Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more sites #15

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-deploy-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
- name: build container
run: |
docker build -t ${{ env.container }} .
- name: test run container
run: |
docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file_geocoded.csv cchmc
# - name: test run container
# run: |
# docker run --rm -v "${PWD}/test":/tmp ${{ env.container }} my_address_file_geocoded.csv cchmc
- name: login to ghcr
uses: docker/login-action@v1
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
.DS_Store
*.xlsx
isochrones/
isochrones_no_overlap.rds
10 changes: 10 additions & 0 deletions .renvignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
.DS_Store
*.xlsx
isochrones/
isochrones_no_overlap.rds
download_isochrones.R
create_readme_fig.R
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM rocker/r-ver:4.0.5
FROM rocker/r-ver:4.3.0

# DeGAUSS container metadata
ENV degauss_name="drivetime"
ENV degauss_version="1.2.0"
ENV degauss_version="1.3.0"
ENV degauss_description="distance and drive time to care sites"
ENV degauss_argument="care_site [default: none]"

Expand All @@ -14,7 +14,7 @@ LABEL "org.degauss.argument"="${degauss_argument}"

RUN R --quiet -e "install.packages('remotes', repos = c(CRAN = 'https://packagemanager.rstudio.com/all/__linux__/focal/latest'))"

RUN R --quiet -e "remotes::install_github('rstudio/renv@0.15.4')"
RUN R --quiet -e "remotes::install_github('rstudio/renv@v1.0.2')"

WORKDIR /app

Expand All @@ -37,6 +37,8 @@ ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/atlanta_is
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/bch_isochrones.rds isochrones/bch_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/cc_isochrones.rds isochrones/cc_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/cchmc_isochrones.rds isochrones/cchmc_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/chla_isochrones.rds isochrones/chla_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/chnola_isochrones.rds isochrones/chnola_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/chop_isochrones.rds isochrones/chop_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/cnmc_isochrones.rds isochrones/cnmc_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/cohen_isochrones.rds isochrones/cohen_isochrones.rds
Expand Down Expand Up @@ -69,6 +71,7 @@ ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/omaha_isoc
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/packard_isochrones.rds isochrones/packard_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/palmer_isochrones.rds isochrones/palmer_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/primary_isochrones.rds isochrones/primary_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/rady_isochrones.rds isochrones/rady_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/rainbow_isochrones.rds isochrones/rainbow_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/riley_isochrones.rds isochrones/riley_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/seattle_isochrones.rds isochrones/seattle_isochrones.rds
Expand All @@ -82,6 +85,7 @@ ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/umich_isoc
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/unc_isochrones.rds isochrones/unc_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/upmc_isochrones.rds isochrones/upmc_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/uva_isochrones.rds isochrones/uva_isochrones.rds
ADD https://geomarker.s3-us-east-2.amazonaws.com/drivetime/isochrones/vandy_isochrones.rds isochrones/vandy_isochrones.rds
COPY entrypoint.R .

WORKDIR /tmp
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
If `my_address_file_geocoded.csv` is a file in the current working directory with coordinate columns named `lat` and `lon`, then the [DeGAUSS command](https://degauss.org/using_degauss.html#DeGAUSS_Commands):

```sh
docker run --rm -v $PWD:/tmp ghcr.io/degauss-org/drivetime:1.2.0 my_address_file_geocoded.csv cchmc
docker run --rm -v $PWD:/tmp ghcr.io/degauss-org/drivetime:1.3.0 my_address_file_geocoded.csv cchmc
```

will produce `my_address_file_geocoded_drivetime_1.1.0_cchmc.csv` with added columns:
will produce `my_address_file_geocoded_drivetime_1.3.0_cchmc.csv` with added columns:

- **`drive_time`**: drive time in minutes (6-minute intervals; "> 60" if more than 1 hour drive time)
- **`distance`**: distance in meters
Expand Down Expand Up @@ -74,6 +74,10 @@ A.I. duPont Hospital for Children | `dupont`
Rainbow Babies and Children's Hospital | `rainbow`
UNC Hospitals Children's Specialty Clinic | `unc`
Barbara Bush Children's Hospital at Maine Medical | `maine`
Children's Hospital of New Orleans | `chnola`
Rady Children's Hospital | `rady`
Children's Hospital Los Angeles | `chla`
Monroe Carell Jr. Children's Hospital at Vanderbilt | `vandy`

## Geomarker Methods

Expand Down
6 changes: 5 additions & 1 deletion center_addresses.csv
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,8 @@ Dell Children's Medical Center of Central Texas,dell,4900 Mueller Boulevard Aust
A.I. duPont Hospital for Children,dupont,1600 Rockland Rd Wilmington DE 19803,39.778732,-75.556624
Rainbow Babies and Children's Hospital,rainbow,11100 Euclid Ave Cleveland OH 44106,41.504317,-81.60584
UNC Hospitals Children's Specialty Clinic,unc,101 Manning Drive Chapel Hill NC 27514,35.904679,-79.050713
Barbara Bush Children's Hospital at Maine Medical,maine,22 Bramhall St Portland ME 04102,43.653371,-70.275146
Barbara Bush Children's Hospital at Maine Medical,maine,22 Bramhall St Portland ME 04102,43.653371,-70.275146
Children's Hospital of New Orleans,chnola,200 Henry Clay Ave New Orleans LA 70118,29.9177976,-90.1299919
Rady Children's Hospital,rady,3020 Children's Way San Diego CA 92123,32.797762,-117.1539819
Children's Hospital Los Angeles,chla,4650 Sunset Blvd Los Angeles CA 90027,34.0977464,-118.2924558
Monroe Carell Jr. Children's Hospital at Vanderbilt,vandy,2200 Children's Way Nashville TN 37232,36.1393484,-86.8049943
4 changes: 3 additions & 1 deletion download_isochrones.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ get_isochrones <- function(x) {
# geom_sf(data = ex[1,])

isochrones <- mappp::mappp(1:nrow(centers), get_isochrones)
# isochrones[[48]] <- get_isochrones(48)

saveRDS(isochrones, 'isochrones/isochrones.rds')
# isochrones <- readRDS('drivetime_distance/cf_isochrones.rds')
Expand All @@ -47,4 +48,5 @@ purrr::walk(1:length(isochrones_no_overlap),
~saveRDS(isochrones_no_overlap[[.x]],
glue::glue('isochrones/{names(isochrones_no_overlap)[.x]}_isochrones.rds')))


system2("aws s3 cp isochrones s3://geomarker/drivetime/isochrones --recursive")
system2("aws s3 cp center_addresses.csv s3://geomarker/drivetime/")
88 changes: 0 additions & 88 deletions drivetime.R

This file was deleted.

2 changes: 1 addition & 1 deletion entrypoint.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ doc <- "
opt <- docopt::docopt(doc)

## for interactive testing
## opt <- docopt::docopt(doc, args = 'test/my_address_file_geocoded.csv')
## opt <- docopt::docopt(doc, args = c('my_address_file_geocoded.csv', 'cchmc'))

centers <- readr::read_csv('/app/center_addresses.csv')
selected_site <- opt$site
Expand Down
Binary file removed isochrones_no_overlap.rds
Binary file not shown.
Loading
Loading