From 1730572aa669ee4ec1ecceef3ec00cc7daa1c51b Mon Sep 17 00:00:00 2001 From: Jorge Escobar <83969469+esfoobar-usds@users.noreply.github.com> Date: Wed, 9 Mar 2022 08:55:17 -0500 Subject: [PATCH] Reducing Docker start up and adding ArcGIS URL (#1386) * Reducing Docker start up and adding ArcGIS URL * Updating ArcGIS URLs --- data/data-pipeline/README.md | 5 +++ .../data_pipeline/application.py | 42 ++++++++++--------- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/data/data-pipeline/README.md b/data/data-pipeline/README.md index 243ef6b6..a4e60e5d 100644 --- a/data/data-pipeline/README.md +++ b/data/data-pipeline/README.md @@ -81,6 +81,11 @@ The CSV with the combined data from all of these sources [can be accessed here]( Once we have all the data from the previous stages, we convert it to tiles to make it usable on a map. We render the map on the client side which can be seen using `docker-compose up`. +#### 5. Shapefiles + +If you want to use the shapefiles in mapping applications, you can access them here [shp](https://justice40-data.s3.amazonaws.com/data-pipeline/data/score/shapefile/usa.shp) and [shx](https://justice40-data.s3.amazonaws.com/data-pipeline/data/score/shapefile/usa.shx). + + ### Score generation and comparison workflow The descriptions below provide a more detailed outline of what happens at each step of ETL and score calculation workflow. diff --git a/data/data-pipeline/data_pipeline/application.py b/data/data-pipeline/data_pipeline/application.py index 10f038f2..cd4e5e96 100644 --- a/data/data-pipeline/data_pipeline/application.py +++ b/data/data-pipeline/data_pipeline/application.py @@ -239,31 +239,33 @@ def data_full_run(check: bool, data_source: str): """ data_path = settings.APP_ROOT / "data" - if check and not check_first_run(): - # check if the data full run has been run before - logger.info("*** The data full run was already executed") - sys.exit() + if check: + if not check_first_run(): + # check if the data full run has been run before + logger.info("*** The data full run was already executed") + sys.exit() - # census directories - logger.info("*** Initializing all data folders") - census_reset(data_path) - data_folder_cleanup() - score_folder_cleanup() - temp_folder_cleanup() + else: + # census directories + logger.info("*** Initializing all data folders") + census_reset(data_path) + data_folder_cleanup() + score_folder_cleanup() + temp_folder_cleanup() - if data_source == "local": - logger.info("*** Downloading census data") - etl_runner("census") + if data_source == "local": + logger.info("*** Downloading census data") + etl_runner("census") - logger.info("*** Running all ETLs") - etl_runner() + logger.info("*** Running all ETLs") + etl_runner() - logger.info("*** Generating Score") - score_generate() + logger.info("*** Generating Score") + score_generate() - logger.info("*** Running Post Score scripts") - downloadable_cleanup() - score_post(data_source) + logger.info("*** Running Post Score scripts") + downloadable_cleanup() + score_post(data_source) logger.info("*** Combining Score with Census Geojson") score_geo(data_source)