Skip to content

Commit 6a72252

Browse files
author
Quarto GHA Workflow Runner
committed
Built site for gh-pages
1 parent cadc7db commit 6a72252

8 files changed

Lines changed: 66 additions & 66 deletions

.nojekyll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b21a3147
1+
479f4bc0

01_develop_data_processing.html

Lines changed: 14 additions & 14 deletions
Large diffs are not rendered by default.

02_develop_visualization.html

Lines changed: 40 additions & 40 deletions
Large diffs are not rendered by default.

03_labour_main.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@
4242
<link href="site_libs/quarto-html/quarto-syntax-highlighting-62bd0246437ae56647c7d14e216fe155.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
4343
<script src="site_libs/bootstrap/bootstrap.min.js"></script>
4444
<link href="site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
45-
<link href="site_libs/bootstrap/bootstrap-a39548cc5d80c23e3558d9b87b52a360.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
46-
<link href="site_libs/bootstrap/bootstrap-dark-a39548cc5d80c23e3558d9b87b52a360.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="light">
47-
<link href="site_libs/bootstrap/bootstrap-a39548cc5d80c23e3558d9b87b52a360.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
45+
<link href="site_libs/bootstrap/bootstrap-0bccfdbefa30b83a2bb1ac6babea8e48.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
46+
<link href="site_libs/bootstrap/bootstrap-dark-0bccfdbefa30b83a2bb1ac6babea8e48.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="light">
47+
<link href="site_libs/bootstrap/bootstrap-0bccfdbefa30b83a2bb1ac6babea8e48.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
4848
<script id="quarto-search-options" type="application/json">{
4949
"location": "navbar",
5050
"copy-button": false,
@@ -158,7 +158,7 @@ <h1 class="title">Track Canada’s Labour Statistics</h1>
158158
<h1 class="hidden unlisted">Setup</h1>
159159
<section id="parameters" class="level2">
160160
<h2 class="anchored" data-anchor-id="parameters">Parameters</h2>
161-
<div id="58c67c15" class="cell" data-tags="[&quot;parameters&quot;]" data-execution_count="2">
161+
<div id="83ef29c2" class="cell" data-tags="[&quot;parameters&quot;]" data-execution_count="2">
162162
<div class="cell-output cell-output-stdout">
163163
<pre><code>Font name: `Playfair Display`
164164
Font name: `Lato`</code></pre>
@@ -175,7 +175,7 @@ <h2 class="anchored" data-anchor-id="data">Data</h2>
175175
<section id="sector-shifts-where-canadas-jobs-are-moving" class="level1 page-columns page-full">
176176
<h1>Sector Shifts: Where Canada’s Jobs Are Moving</h1>
177177
<p>Track the number of industries gaining or losing jobs each month. Boxes are shaded based on percentage change from previous month in each industry’s employment levels.</p>
178-
<div id="5c1aaa0b" class="cell page-columns page-full" data-execution_count="5">
178+
<div id="4f654c0c" class="cell page-columns page-full" data-execution_count="5">
179179
<div class="cell-output cell-output-display page-columns page-full">
180180
<div class="page-columns page-full">
181181
<figure class="figure page-columns page-full">

search.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"href": "02_develop_visualization.html#explicit-color-mapping-with-scale_color_manual",
6969
"title": "Developing the employment heatmap visualization",
7070
"section": "Explicit color mapping with scale_color_manual",
71-
"text": "Explicit color mapping with scale_color_manual\nI am fairly happy with the scale_fill_gradient2 used with squish. We get a really nice palette that’s centered around 0. However scale_fill_gradient2 is limited to 3 colors (high, midpoint, low), which is not quite enable the more dynamic color palette that I’m seeking.\nTo be more explicit with the colors, I will bin the PDIFF and map colors manually using scale_fill_manual\n\nBin with polars.Series.cut\n\nlabour_processed_cutted = (\n labour_processed_cat.with_columns(\n pl.col(\"PDIFF\")\n .cut(\n [\n -0.05,\n -0.025,\n -0.012,\n -0.0080,\n -0.0040,\n 0,\n 0.0040,\n 0.0080,\n 0.012,\n 0.025,\n 0.05,\n ]\n )\n .alias(\"PDIFF_BINNED\")\n )\n .with_columns(\n pl.when(pl.col(\"PDIFF\") == 0)\n .then(pl.lit(\"0\"))\n .otherwise(pl.col(\"PDIFF_BINNED\"))\n .alias(\"PDIFF_BINNED\")\n )\n .sort(\"PDIFF\")\n .with_columns(pl.col(\"PDIFF_BINNED\"))\n)\nlabour_processed_cutted.group_by(\"PDIFF_BINNED\").len()\n\n\nshape: (13, 2)\n\n\n\nPDIFF_BINNED\nlen\n\n\ncat\nu32\n\n\n\n\n\"(-0.008, -0.004]\"\n1201\n\n\n\"(-0.025, -0.012]\"\n892\n\n\n\"(0.004, 0.008]\"\n1736\n\n\n\"(0.008, 0.012]\"\n1021\n\n\n\"0\"\n74\n\n\n…\n…\n\n\n\"(-0.05, -0.025]\"\n255\n\n\n\"(0.012, 0.025]\"\n1292\n\n\n\"(0.025, 0.05]\"\n315\n\n\n\"(0, 0.004]\"\n2624\n\n\n\"(0.05, inf]\"\n58\n\n\n\n\n\n\n\n(\n ggplot(\n (\n labour_processed_cutted.filter(\n pl.col(\"YEAR\") &gt;= FILTER_YEAR[0], pl.col(\"YEAR\") &lt;= FILTER_YEAR[1]\n )\n ),\n aes(x=\"DATE_YMD\", y=\"centered_rank_cat\", fill=\"PDIFF_BINNED\"),\n )\n + geom_tile(height=0.95) # whitespace between tiles, vertically\n + theme_tufte()\n + theme(figure_size=FIGURE_THEME_SIZE, axis_text_x=element_text(angle=90))\n)\n\n\n\n\n\n\n\n\n\n\nscale_fill_manual for explicit color mapping\nNow we need to order the levels, and map explicit colors\nWe will make PDIFF=0% to be gray, positive values to have a green and blue colors (job growth = good), and negative values to have warmer (alarming, bad) colors.\n\norder = (\n labour_processed_cutted.drop_nulls()\n .sort(\"PDIFF\")\n .select(pl.col(\"PDIFF_BINNED\"))\n .unique(maintain_order=True)\n .to_series()\n .to_list()\n)\n\nlabour_processed_cutted_ordered = labour_processed_cutted.with_columns(\n pl.col(\"PDIFF_BINNED\").cast(pl.Enum(order))\n)\n\ncolor_mapping = {\n \"(-inf, -0.05]\": \"#d82828ff\",\n \"(-0.05, -0.025]\": \"#fa6f1fff\",\n \"(-0.025, -0.012]\": \"#f1874aff\",\n \"(-0.012, -0.008]\": \"#f1b274ff\",\n \"(-0.008, -0.004]\": \"#FEE08B\",\n \"(-0.004, 0]\": \"#FFFFBF\",\n \"0\": \"#a8a8a8ff\",\n \"(0, 0.004]\": \"#E6F5D0\",\n \"(0.004, 0.008]\": \"#bce091ff\",\n \"(0.008, 0.012]\": \"#9ad65fff\",\n \"(0.012, 0.025]\": \"#78b552ff\",\n \"(0.025, 0.05]\": \"#5cb027ff\",\n \"(0.05, inf]\": \"#1f6fc6ff\",\n}\n\n(\n ggplot(\n (\n labour_processed_cutted.filter(\n pl.col(\"YEAR\") &gt;= FILTER_YEAR[0], pl.col(\"YEAR\") &lt;= FILTER_YEAR[1]\n )\n ),\n aes(x=\"DATE_YMD\", y=\"centered_rank_across_industry\", fill=\"PDIFF_BINNED\"),\n )\n + geom_tile(color=\"white\")\n # + geom_point(shape=\"s\")\n + theme_tufte()\n + theme(figure_size=FIGURE_THEME_SIZE, axis_text_x=element_text(angle=90))\n + scale_fill_manual(values=color_mapping, breaks=order)\n)\n\n\n\n\n\n\n\n\nThat looks great. The power of scale_fill_manual enables much more control over the color palette. However, the cost was that it takes a lot more effort and lines of code to create a custom mapping.",
71+
"text": "Explicit color mapping with scale_color_manual\nI am fairly happy with the scale_fill_gradient2 used with squish. We get a really nice palette that’s centered around 0. However scale_fill_gradient2 is limited to 3 colors (high, midpoint, low), which is not quite enable the more dynamic color palette that I’m seeking.\nTo be more explicit with the colors, I will bin the PDIFF and map colors manually using scale_fill_manual\n\nBin with polars.Series.cut\n\nlabour_processed_cutted = (\n labour_processed_cat.with_columns(\n pl.col(\"PDIFF\")\n .cut(\n [\n -0.05,\n -0.025,\n -0.012,\n -0.0080,\n -0.0040,\n 0,\n 0.0040,\n 0.0080,\n 0.012,\n 0.025,\n 0.05,\n ]\n )\n .alias(\"PDIFF_BINNED\")\n )\n .with_columns(\n pl.when(pl.col(\"PDIFF\") == 0)\n .then(pl.lit(\"0\"))\n .otherwise(pl.col(\"PDIFF_BINNED\"))\n .alias(\"PDIFF_BINNED\")\n )\n .sort(\"PDIFF\")\n .with_columns(pl.col(\"PDIFF_BINNED\"))\n)\nlabour_processed_cutted.group_by(\"PDIFF_BINNED\").len()\n\n\nshape: (13, 2)\n\n\n\nPDIFF_BINNED\nlen\n\n\ncat\nu32\n\n\n\n\n\"(-0.004, 0]\"\n1999\n\n\n\"0\"\n74\n\n\n\"(-inf, -0.05]\"\n47\n\n\n\"(0.025, 0.05]\"\n315\n\n\n\"(0, 0.004]\"\n2624\n\n\n…\n…\n\n\n\"(0.012, 0.025]\"\n1292\n\n\n\"(0.008, 0.012]\"\n1021\n\n\n\"(-0.05, -0.025]\"\n255\n\n\n\"(0.004, 0.008]\"\n1736\n\n\n\"(-0.012, -0.008]\"\n717\n\n\n\n\n\n\n\n(\n ggplot(\n (\n labour_processed_cutted.filter(\n pl.col(\"YEAR\") &gt;= FILTER_YEAR[0], pl.col(\"YEAR\") &lt;= FILTER_YEAR[1]\n )\n ),\n aes(x=\"DATE_YMD\", y=\"centered_rank_cat\", fill=\"PDIFF_BINNED\"),\n )\n + geom_tile(height=0.95) # whitespace between tiles, vertically\n + theme_tufte()\n + theme(figure_size=FIGURE_THEME_SIZE, axis_text_x=element_text(angle=90))\n)\n\n\n\n\n\n\n\n\n\n\nscale_fill_manual for explicit color mapping\nNow we need to order the levels, and map explicit colors\nWe will make PDIFF=0% to be gray, positive values to have a green and blue colors (job growth = good), and negative values to have warmer (alarming, bad) colors.\n\norder = (\n labour_processed_cutted.drop_nulls()\n .sort(\"PDIFF\")\n .select(pl.col(\"PDIFF_BINNED\"))\n .unique(maintain_order=True)\n .to_series()\n .to_list()\n)\n\nlabour_processed_cutted_ordered = labour_processed_cutted.with_columns(\n pl.col(\"PDIFF_BINNED\").cast(pl.Enum(order))\n)\n\ncolor_mapping = {\n \"(-inf, -0.05]\": \"#d82828ff\",\n \"(-0.05, -0.025]\": \"#fa6f1fff\",\n \"(-0.025, -0.012]\": \"#f1874aff\",\n \"(-0.012, -0.008]\": \"#f1b274ff\",\n \"(-0.008, -0.004]\": \"#FEE08B\",\n \"(-0.004, 0]\": \"#FFFFBF\",\n \"0\": \"#a8a8a8ff\",\n \"(0, 0.004]\": \"#E6F5D0\",\n \"(0.004, 0.008]\": \"#bce091ff\",\n \"(0.008, 0.012]\": \"#9ad65fff\",\n \"(0.012, 0.025]\": \"#78b552ff\",\n \"(0.025, 0.05]\": \"#5cb027ff\",\n \"(0.05, inf]\": \"#1f6fc6ff\",\n}\n\n(\n ggplot(\n (\n labour_processed_cutted.filter(\n pl.col(\"YEAR\") &gt;= FILTER_YEAR[0], pl.col(\"YEAR\") &lt;= FILTER_YEAR[1]\n )\n ),\n aes(x=\"DATE_YMD\", y=\"centered_rank_across_industry\", fill=\"PDIFF_BINNED\"),\n )\n + geom_tile(color=\"white\")\n # + geom_point(shape=\"s\")\n + theme_tufte()\n + theme(figure_size=FIGURE_THEME_SIZE, axis_text_x=element_text(angle=90))\n + scale_fill_manual(values=color_mapping, breaks=order)\n)\n\n\n\n\n\n\n\n\nThat looks great. The power of scale_fill_manual enables much more control over the color palette. However, the cost was that it takes a lot more effort and lines of code to create a custom mapping.",
7272
"crumbs": [
7373
"Developing the employment heatmap visualization"
7474
]

site_libs/bootstrap/bootstrap-a39548cc5d80c23e3558d9b87b52a360.min.css renamed to site_libs/bootstrap/bootstrap-0bccfdbefa30b83a2bb1ac6babea8e48.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site_libs/bootstrap/bootstrap-dark-a39548cc5d80c23e3558d9b87b52a360.min.css renamed to site_libs/bootstrap/bootstrap-dark-0bccfdbefa30b83a2bb1ac6babea8e48.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sitemap.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>https://wvictor14.github.io/labourcan/03_labour_main.html</loc>
5-
<lastmod>2025-09-13T05:47:58.135Z</lastmod>
5+
<lastmod>2025-09-14T03:08:10.927Z</lastmod>
66
</url>
77
<url>
88
<loc>https://wvictor14.github.io/labourcan/02_develop_visualization.html</loc>
9-
<lastmod>2025-09-13T05:47:58.135Z</lastmod>
9+
<lastmod>2025-09-14T03:08:10.927Z</lastmod>
1010
</url>
1111
<url>
1212
<loc>https://wvictor14.github.io/labourcan/01_develop_data_processing.html</loc>
13-
<lastmod>2025-09-13T05:47:58.135Z</lastmod>
13+
<lastmod>2025-09-14T03:08:10.927Z</lastmod>
1414
</url>
1515
</urlset>

0 commit comments

Comments
 (0)