Skip to content

Commit 465aeb3

Browse files
committed
fix links
1 parent c31815c commit 465aeb3

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

01_develop_data_processing.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ from labourcan.data_processing import read_labourcan
3535

3636
## Read data
3737

38-
[read_labourcan](../py/labourcan/data_processing.py) returns a polars dataframe with columns:
38+
[`read_labourcan`](https://github.com/wvictor14/labourcan/blob/main/py/labourcan/data_processing.py) returns a polars dataframe with columns:
3939

4040
- Unnecessary metadata columns removed
4141
- Filtered to seasonally adjusted estimates only

02_develop_visualization.qmd

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Current Canadian sentiment reflects significant economic uncertainty, with risin
1515

1616
# Introduction
1717

18-
Plotnine is a python data visualization graphics, heavily inspired by `ggplot2`. Having extensive experience with `ggplot2` and R but less with python, I'm excited to explore plotnine through this submission.
18+
Plotnine is a python data visualization graphics, heavily inspired by [ggplot2](https://ggplot2.tidyverse.org/). Having extensive experience with `ggplot2` and R but less with python, I'm excited to explore plotnine through this submission.
1919

2020
In this tutorial, I'll walk through the process of creating my plotnine 2025 contest submission: A visualization of that tracks employment across Canadian industries, ranked by their monthly percent change in employment. This visualization reveals which industries are expanding versus contracting in Canada's economic climate over time.
2121

@@ -33,7 +33,7 @@ In this initial code chunk we initialize some [parameters](https://quarto.org/do
3333
from pyprojroot import here # <1>
3434
```
3535

36-
1. `pyprojroot` is similar to R's package `here`, which lets us construct filepaths relative to the project root. This is very convenient especially for quarto projects with complex file organization.
36+
1. `pyprojroot` is similar to R's package [here](https://here.r-lib.org/), which lets us construct filepaths relative to the project root. This is very convenient especially for quarto projects with complex file organization.
3737

3838
```{python}
3939
# | tags: [parameters]
@@ -75,16 +75,14 @@ The data we are using is from a table called "Employment by industry, monthly, s
7575

7676
The visualization required a fair amount of data processing which is detailed in this [page](01_develop_data_processing.html). The steps are summarized here:
7777

78-
[`read_labourcan`](../py/labourcan/data_processing.py) returns a `polars.Data.Frame` with:
78+
[`read_labourcan`](https://github.com/wvictor14/labourcan/blob/main/py/labourcan/data_processing.py) returns a `polars.Data.Frame` with:
7979

8080
- Unused columns removed
8181
- Filtered to seasonally adjusted estimates only
8282
- Filtered to Canada level estimates
8383
- Additional `YEAR`, `MONTH`, and `DATE_YMD` columns extracted from `REF_DATE`
8484
- Sorted chronologically by year and month
8585

86-
See [labour.qmd](02_develop_data_processing.html) for details on data processing.
87-
8886
```{python}
8987
labour = read_labourcan(LABOUR_DATA_FILE)
9088
labour_processed = calculate_centered_rank(labour)
@@ -609,3 +607,8 @@ import re
609607
1. Use inline regex to remove the trailing special characters
610608
2. add `subtitle_text` to `labs`
611609

610+
# Conclusion
611+
612+
That concludes the end of this tutorial. See the [main page](index.qmd) for the complete visualization with some interactivity to allow filtering through industry-specific trends.
613+
614+
Overall, plotnine is a fantastic addition to Python's data visualization universe. Although I found some differences and missing functionality compared to R's `ggplot2`, I was still able to create a complex visualization with relative ease. And, plotnine is still in early days, so I expect improvements and fixes will be developed in future releases.

0 commit comments

Comments
 (0)