Skip to content

Commit

Permalink
Add dvc tracking for youth employment
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-strange committed Jun 24, 2024
1 parent 36c46d2 commit fb6b0c2
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
1 change: 1 addition & 0 deletions output/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.ipynb
20 changes: 20 additions & 0 deletions pipelines/people/dvc.lock
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,23 @@ stages:
hash: md5
md5: 121be03fe40ba8f11044310423afd4bb
size: 23551
youth-employment:
cmd: papermill --no-progress-bar --no-report-mode youth_employment.ipynb ../../output/youth_employment.ipynb
deps:
- path: ../../working/cs/youth-unemployment-adjusted.csv
hash: md5
md5: 666b3a41e5b413f8ab738ccdd1cb3d2a
size: 26728
- path: youth_employment.ipynb
hash: md5
md5: c7079b96e21ce303072f7b8760054459
size: 10505
outs:
- path: ../../src/themes/people-skills-future/_data/youth_employment_RGN.csv
hash: md5
md5: cd7f7fca9117146f7178e4e076e459f9
size: 2666
- path: ../../src/themes/people-skills-future/_data/youth_employment_RGN_bar_chart.csv
hash: md5
md5: 9f432360b6e848c5969954a0880248b6
size: 337
12 changes: 11 additions & 1 deletion pipelines/people/dvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,14 @@ stages:
- ${TOP}/src/themes/people-skills-future/_data/neet.csv:
cache: false
- ${TOP}/src/themes/people-skills-future/_data/risk_of_neet_by_la.csv:
cache: false
cache: false
youth-employment:
cmd: papermill --no-progress-bar --no-report-mode youth_employment.ipynb ${TOP}/output/youth_employment.ipynb
deps:
- youth_employment.ipynb
- ${TOP}/working/cs/youth-unemployment-adjusted.csv
outs:
- ${TOP}/src/themes/people-skills-future/_data/youth_employment_RGN.csv:
cache: false
- ${TOP}/src/themes/people-skills-future/_data/youth_employment_RGN_bar_chart.csv:
cache: false
11 changes: 8 additions & 3 deletions pipelines/people/youth_employment.ipynb
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If you want to run the notebook locally, remove the hashtag before os.chdir('../..') below."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"os.chdir('../..')\n",
"os.chdir('../..') \n",
"from pipelines.util import *"
]
},
Expand All @@ -18,8 +25,6 @@
"outputs": [],
"source": [
"data = pd.read_csv('working/cs/youth-unemployment-adjusted.csv')\n",
"# data['unix'] = pd.to_datetime(data['date'], format=f'%Y-%m-%d').astype(int).div(10**9).astype(int)\n",
"# data['decimal_date'] = data['unix'].div((86400*365.25)).add(1970).round(2)\n",
"data = add_decimal_date_to_dataframe(data, datename='date')"
]
},
Expand Down

0 comments on commit fb6b0c2

Please sign in to comment.