Skip to content

Commit

Permalink
Added two new notebooks + added respective CIs and updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
andreped committed Aug 10, 2023
1 parent f11c37c commit f5f7d51
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 3 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/incidence_mortality_age.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: mortality_temporal_age

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch:

jobs:
notebooks:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: pip install jupyter nbconvert nbformat

- name: Launch notebook
run: jupyter nbconvert --to notebook --execute apps/bc_mortality_over_time_age_groups.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../notebook_executed

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: notebook
path: notebook_executed.ipynb
32 changes: 32 additions & 0 deletions .github/workflows/incidence_temporal_age.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: incidence_temporal_age

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch:

jobs:
notebooks:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: pip install jupyter nbconvert nbformat

- name: Launch notebook
run: jupyter nbconvert --to notebook --execute apps/bc_incidence_over_time_age_groups.ipynb --ExecutePreprocessor.kernel_name='python3' --output ../notebook_executed

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: notebook
path: notebook_executed.ipynb
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ They can also be accessed by clicking their respective CoLab badge below:
| Survival country comparison | <a href="https://colab.research.google.com/github/andreped/breast-cancer-stats/blob/main/apps/bc_survival.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | <a href="https://github.com/andreped/breast-cancer-stats/actions/workflows/survival.yml" target="_parent"><img src="https://github.com/andreped/breast-cancer-stats/workflows/survival/badge.svg" alt="Open In Colab"/></a> |
| Cancer incidence over time | <a href="https://colab.research.google.com/github/andreped/breast-cancer-stats/blob/main/apps/bc_incidence_over_time.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | <a href="https://github.com/andreped/breast-cancer-stats/actions/workflows/incidence_temporal.yml" target="_parent"><img src="https://github.com/andreped/breast-cancer-stats/workflows/incidence_temporal/badge.svg" alt="Open In Colab"/></a> |
| Cancer mortality over time | <a href="https://colab.research.google.com/github/andreped/breast-cancer-stats/blob/main/apps/bc_mortality_over_time.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | <a href="https://github.com/andreped/breast-cancer-stats/actions/workflows/mortality_temporal.yml" target="_parent"><img src="https://github.com/andreped/breast-cancer-stats/workflows/mortality_temporal/badge.svg" alt="Open In Colab"/></a> |
| Cancer incidence over time w.r.t age | <a href="https://colab.research.google.com/github/andreped/breast-cancer-stats/blob/main/apps/bc_incidence_over_time_age_groups.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | <a href="https://github.com/andreped/breast-cancer-stats/actions/workflows/incidence_temporal_age.yml" target="_parent"><img src="https://github.com/andreped/breast-cancer-stats/workflows/incidence_temporal_age/badge.svg" alt="Open In Colab"/></a> |
| Cancer mortality over time w.r.t age | <a href="https://colab.research.google.com/github/andreped/breast-cancer-stats/blob/main/apps/bc_mortality_over_time_age_groups.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | <a href="https://github.com/andreped/breast-cancer-stats/actions/workflows/mortality_temporal_age.yml" target="_parent"><img src="https://github.com/andreped/breast-cancer-stats/workflows/mortality_temporal_age/badge.svg" alt="Open In Colab"/></a> |

## [Dependencies](https://github.com/andreped/breast-cancer-stats#dependencies)

Expand All @@ -42,9 +44,9 @@ The following dependencies were used and are installed as part of the notebooks:

## [Troubleshooting](https://github.com/andreped/breast-cancer-stats#troubleshooting)

If you attempt to run the notebooks locally or view them from GitHub, the resulting image may not be displayed.
This is due to the renderer in Plotly's `show()` method being set to `show(renderer="colab")`.
By removing the specification of renderer or choosing an appropriate renderer, the resulting image should be shown in the notebook.
Note that all renderered results could be interactive, but we have set Plotly's `show(renderer="png")`,
to enable the result to be shown in the output on CoLab, on GitHub, and locally. To get interactive
figures on CoLab set `show(renderer="colab")`, or locally use the default `show()`.

## [License](https://github.com/andreped/breast-cancer-stats#license)

Expand Down

0 comments on commit f5f7d51

Please sign in to comment.