Skip to content

Commit

Permalink
Update data processor scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
edlu77 committed Feb 15, 2024
1 parent 21de03e commit 285b57a
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 17 deletions.
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,16 @@ npm-debug.log
yarn-error.log
testem.log
/typings
.nx/cache
container.sif

# System Files
.DS_Store
Thumbs.db

# Generated assets
*/assets/generated
*/assets/schema
**/assets/generated
**/assets/schema

# Proxy Configuration
proxy.config.json


.nx/cache
2 changes: 1 addition & 1 deletion data-processor/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ EDB="$OUT/a2agc.db.e"

DATA_SOURCES="$ORIG/box-health/[Box Health] Final Datasets"

SCHEMA_DIR="$THIS/../website/src/assets/schema"
SCHEMA_DIR="$THIS/../src/assets/schema"
SCHEMA_NAME=A2AGC
SCHEMA="$SCHEMA_DIR/$SCHEMA_NAME.public.xml"

Expand Down
2 changes: 1 addition & 1 deletion data-processor/schemaspy.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ schemaspy.I=.*_raw
schemaspy.meta=schemaspy.meta.xml

# output dir to save generated files
schemaspy.o=../website/src/assets/schema
schemaspy.o=../src/assets/schema

# Use vizjs instead of graphviz
schemaspy.vizjs=true
Expand Down
2 changes: 1 addition & 1 deletion data-processor/scripts/13-vis-geomap-opioid-deaths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -ev

OUT_DIR=${OUT}/site-data

sqlite3 -header -csv ${DB} < ../website/src/assets/pages/vis1-geomap-of-opioid-deaths/data.sql > ${OUT_DIR}/vis-geomap-opioid-deaths.csv
sqlite3 -header -csv ${DB} < ../src/assets/pages/vis1-geomap-of-opioid-deaths/data.sql > ${OUT_DIR}/vis-geomap-opioid-deaths.csv
2 changes: 1 addition & 1 deletion data-processor/scripts/13-vis2-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ OUT_DIR=${OUT}/site-data/vis2-data

mkdir -p ${OUT_DIR}

sqlite3 -header -csv ${DB} < ../website/src/assets/pages/vis2-age-and-gender/data.sql > ${OUT_DIR}/death-counts.csv
sqlite3 -header -csv ${DB} < ../src/assets/pages/vis2-age-and-gender/data.sql > ${OUT_DIR}/death-counts.csv

python3 ${SRC_DIR}/census_data.py ${SRC_DIR}/census-data -o ${OUT_DIR}/census-counts.csv
2 changes: 1 addition & 1 deletion data-processor/scripts/13-vis4-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ OUT_DIR=${OUT}/site-data/visualization4

mkdir -p ${OUT_DIR}

sqlite3 -header -csv ${DB} < ../website/src/assets/pages/vis4-combined-visualization/data.sql > ${OUT_DIR}/data.csv
sqlite3 -header -csv ${DB} < ../src/assets/pages/vis4-combined-visualization/data.sql > ${OUT_DIR}/data.csv
2 changes: 1 addition & 1 deletion data-processor/scripts/13-vis5-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ OUT_DIR=${OUT}/site-data/visualization5

mkdir -p ${OUT_DIR}

sqlite3 -header -csv ${DB} < ../website/src/assets/pages/vis5-opioid-trajectories/data.sql > ${OUT_DIR}/data.csv
sqlite3 -header -csv ${DB} < ../src/assets/pages/vis5-opioid-trajectories/data.sql > ${OUT_DIR}/data.csv
4 changes: 2 additions & 2 deletions data-processor/scripts/13-vis6-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ OUT_DIR=${OUT}/site-data/visualization6

mkdir -p ${OUT_DIR}

sqlite3 -header -csv ${DB} < ../website/src/assets/pages/vis6-maps-of-health/data-aggregate.sql > ${OUT_DIR}/data-aggregate.csv
sqlite3 -header -csv ${DB} < ../src/assets/pages/vis6-maps-of-health/data-aggregate.sql > ${OUT_DIR}/data-aggregate.csv

sqlite3 -header -csv ${DB} < ../website/src/assets/pages/vis6-maps-of-health/data.sql > ${OUT_DIR}/data.csv
sqlite3 -header -csv ${DB} < ../src/assets/pages/vis6-maps-of-health/data.sql > ${OUT_DIR}/data.csv
2 changes: 1 addition & 1 deletion data-processor/scripts/20-ng-generate-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source constants.sh
set -ev

cd ../website
cd ../

# Clear old data and copy latest
rm -rf src/assets/generated
Expand Down
2 changes: 1 addition & 1 deletion data-processor/scripts/20x-ng-serve-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source constants.sh
set -ev

cd ../website
cd ../

# Clear old data and copy latest
rm -rf src/assets/generated
Expand Down
2 changes: 1 addition & 1 deletion data-processor/scripts/20x-serve-generated-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source constants.sh
set -ev

cd ../website
cd ..

# Clear old data and copy latest
rm -rf src/assets/generated
Expand Down
2 changes: 1 addition & 1 deletion data-processor/scripts/20x-serve-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
source constants.sh
set -ev

http-server -c-1 --cors=* -p $DEV_PORT ../website/dist
http-server -c-1 --cors=* -p $DEV_PORT ../dist

0 comments on commit 285b57a

Please sign in to comment.