File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 - name : Set up Quarto
1818 uses : quarto-dev/quarto-actions/setup@v2
1919
20-
2120 - name : " Set up Python"
2221 uses : actions/setup-python@v5
2322 with :
3130
3231 - name : Install the project
3332 run : uv sync --locked --all-extras --dev
33+
34+ - name : Install curl
35+ run : |
36+ sudo apt-get update
37+ sudo apt-get install -y curl jq unzip
38+
39+ - name : Download data
40+ run : |
41+ sh data/downloadLabourData.sh
3442
3543 - name : Render and Publish
3644 uses : quarto-dev/quarto-actions/publish@v2
Original file line number Diff line number Diff line change 1- # download unadjusted
2- cd data
1+ #! /bin/bash
2+
3+ # Set target directory (modify this path as needed)
4+ TARGET_DIR=data/
5+
6+ # Create target directory if it doesn't exist
7+ mkdir -p " $TARGET_DIR "
38
4- URL=$( curl -s ' https://www150.statcan.gc.ca/t1/wds/rest/getFullTableDownloadCSV/14100022/en' | grep -o ' https://[^"]*' )
5- curl -o 14100022-eng.zip " $URL "
6- unzip 14100022-eng.zip
7- rm 14100022-eng.zip
9+ # Change to target directory
10+ cd " $TARGET_DIR "
11+
12+ # download unadjusted
13+ # URL=$(curl -s 'https://www150.statcan.gc.ca/t1/wds/rest/getFullTableDownloadCSV/14100022/en' | grep -o 'https://[^"]*')
14+ # curl -o 14100022-eng.zip "$URL"
15+ # unzip 14100022-eng.zip
16+ # rm 14100022-eng.zip
817
918# download seasonally adjusted
19+ echo " Downloading to: $( pwd) "
1020URL=$( curl -s ' https://www150.statcan.gc.ca/t1/wds/rest/getFullTableDownloadCSV/14100355/en' | jq -r ' .object' )
1121curl -o 14100355-eng.zip " $URL "
1222unzip 14100355-eng.zip
13- rm 14100355-eng.zip
23+ rm 14100355-eng.zip
24+ echo " Download completed in: $TARGET_DIR "
You can’t perform that action at this time.
0 commit comments