Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,58 @@ link-external-icon: false

Posts use R code chunks with knitr. Common libraries: `tidyverse`, `sf`, `gt`, `ggplot2`, `cancensus`, `mountainmathHelpers`. Data paths typically reference `../../../data` relative to the post via `here()`.

In the first R chunk, along with imports, always load the following options like the following. These set important API keys and cache paths for the cancensus and jdawangHelpers packages:

```r
options(
cancensus.api_key = Sys.getenv("CM_API_KEY"),
cancensus.cache_path = Sys.getenv("CM_CACHE_PATH"),
tongfen.cache_path = Sys.getenv("TONGFEN_CACHE_PATH"),
nextzen_API_key = Sys.getenv("NEXTZEN_API_KEY")
)
```

## jdawangHelpers package

The `jdawangHelpers` package ([github.com/jdawang/jdawangHelpers](https://github.com/jdawang/jdawangHelpers)) contains reusable helpers for this blog. Always install it from GitHub, never from a local path:

```r
remotes::install_github("jdawang/jdawangHelpers")
```

Use its functions instead of writing equivalent code inline. Key exports:

**Themes**
- `theme_jd(mode)` — ggplot2 theme with dark/light mode, viridis magma palette, Source Sans Pro font
- `theme_map(mode)` — map-specific theme (no axes/grids, transparent panel)

**Plot layers**
- `layers_map_base(roads_type, mode)` — water + roads base layers for maps (wraps `mountainmathHelpers`)
- `layers_transit_ecdf(colour_var, x_max)` — ECDF step-plot layers for cumulative units by LRT distance

**GT table helpers**
- `opt_stylize_jd(data, mode)` — style a GT table to match `theme_jd()`
- `finalize_gt(gt_tbl, source, interactive)` — add source note, sub missing values, optional interactivity

**Building permits**
- `clean_edmonton_bp_columns(bp, crs)` — rename/clean columns from the Edmonton Open Data shapefile
- `filter_edmonton_residential(bp)` — filter to residential building types
- `add_edmonton_project_type(bp)` — classify permits into project type categories
- `add_edmonton_suite_info(bp)` — extract secondary suite counts and backyard home flags

**Neighbourhood classification**
- `add_edmonton_neighbourhood_type(bp)` — classify permits as Downtown/Mature/Between mature and Henday/Outside Henday (uses bundled `mature_neighbourhood` and `henday` spatial datasets)

**Transit**
- `load_edmonton_transit_stops(gtfs_path, ...)` — load Edmonton LRT stops from a GTFS zip
- `add_transit_distance(data, transit_stops)` — add `distance_from_lrt` column (km)
- `make_transit_buffers(transit_stops, radii_km)` — concentric buffer rings around stops
- `add_ecdf_by_distance(data, group_var, weight_var)` — compute weighted ECDF by transit distance

**Constants**
- `EDMONTON_RESIDENTIAL_BUILDING_TYPES` — character vector of residential building type strings
- `CAPTION_COE`, `CAPTION_COE_SC`, `CAPTION_TORONTO` — standard caption strings for plots/tables

## R package management

Posts have their own `renv.lock` for reproducibility. To restore packages for a specific post:
Expand Down

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
158 changes: 79 additions & 79 deletions _freeze/site_libs/core-js-2.5.3/package.json
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
{
"devDependencies": {
"@babel/cli": "^7.7.7",
"@babel/core": "^7.7.7",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.7.4",
"@babel/plugin-proposal-optional-catch-binding": "^7.7.4",
"@babel/plugin-proposal-optional-chaining": "^7.7.5",
"@babel/plugin-transform-arrow-functions": "^7.7.4",
"@babel/plugin-transform-block-scoped-functions": "^7.7.4",
"@babel/plugin-transform-block-scoping": "^7.7.4",
"@babel/plugin-transform-classes": "^7.7.4",
"@babel/plugin-transform-computed-properties": "^7.7.4",
"@babel/plugin-transform-destructuring": "^7.7.4",
"@babel/plugin-transform-exponentiation-operator": "^7.7.4",
"@babel/plugin-transform-literals": "^7.7.4",
"@babel/plugin-transform-member-expression-literals": "^7.7.4",
"@babel/plugin-transform-parameters": "^7.7.7",
"@babel/plugin-transform-property-literals": "^7.7.4",
"@babel/plugin-transform-shorthand-properties": "^7.7.4",
"@babel/plugin-transform-spread": "^7.7.4",
"@babel/plugin-transform-template-literals": "^7.7.4",
"babel-loader": "^8.0.6",
"babel-plugin-transform-es2015-modules-simple-commonjs": "~0.3.0",
"babel-plugin-transform-for-of-as-array": "^1.1.1",
"es-observable": "git+https://github.com/tc39/proposal-observable.git#bf4d87144b6189e793593868e3c022eb51a7d292",
"eslint": "^6.8.0",
"eslint-import-resolver-webpack": "^0.12.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-optimize-regex": "^1.1.7",
"eslint-plugin-qunit": "^4.0.0",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-unicorn": "^15.0.0",
"grunt": "^1.0.4",
"grunt-cli": "^1.3.2",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-uglify": "^4.0.1",
"grunt-karma": "^3.0.2",
"grunt-webpack": "^3.1.3",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-phantomjs-launcher": "~1.0.4",
"karma-qunit": "^4.0.0",
"lerna": "^3.19.0",
"moon-unit": "^0.2.2",
"phantomjs-prebuilt": "~2.1.16",
"promises-aplus-tests": "^2.1.2",
"puppeteer": "~2.0.0",
"qunit": "~2.9.3",
"webpack": "^4.41.4"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/zloirock/core-js.git"
},
"scripts": {
"bootstrap": "lerna bootstrap --no-ci",
"build": "grunt clean copy && npm run bootstrap && npm run build-compat && grunt bundle uglify",
"build-compat": "npm run build-compat-data && npm run build-compat-entries && npm run build-compat-modules-by-versions",
"build-compat-data": "node packages/core-js-compat/src/build-data",
"build-compat-entries": "node packages/core-js-compat/src/build-entries",
"build-compat-modules-by-versions": "node packages/core-js-compat/src/build-modules-by-versions",
"lint": "grunt clean copy && npm run bootstrap && npm run build-compat && eslint ./",
"unit-tests": "grunt clean copy && npm run bootstrap && npm run build-compat && grunt bundle webpack:helpers webpack:tests karma:tests",
"unit-tests-pure": "grunt clean copy && npm run build-compat && grunt webpack:helpers webpack:pure karma:pure",
"bundle-promises-tests": "grunt webpack:promises-aplus-tests",
"promises-tests": "promises-aplus-tests tests/promises-aplus/adapter --timeout 1000",
"observables-tests": "babel node_modules/es-observable/test/ -d tests/bundles/observables-tests/ && node tests/observables/adapter && node tests/observables/adapter-pure",
"commonjs-tests": "node tests/commonjs",
"commonjs-entries-content": "node tests/commonjs-entries-content",
"targets-parser-tests": "node tests/targets-parser",
"test": "grunt clean copy && npm run bootstrap && npm run build-compat && eslint ./ && grunt webpack:helpers webpack:tests bundle uglify karma:tests webpack:helpers webpack:pure karma:pure && npm run promises-tests && npm run observables-tests && npm run commonjs-tests && npm run commonjs-entries-content && npm run targets-parser-tests"
},
"engines": {
"node": ">=8.9.0"
}
}
{
"devDependencies": {
"@babel/cli": "^7.7.7",
"@babel/core": "^7.7.7",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.7.4",
"@babel/plugin-proposal-optional-catch-binding": "^7.7.4",
"@babel/plugin-proposal-optional-chaining": "^7.7.5",
"@babel/plugin-transform-arrow-functions": "^7.7.4",
"@babel/plugin-transform-block-scoped-functions": "^7.7.4",
"@babel/plugin-transform-block-scoping": "^7.7.4",
"@babel/plugin-transform-classes": "^7.7.4",
"@babel/plugin-transform-computed-properties": "^7.7.4",
"@babel/plugin-transform-destructuring": "^7.7.4",
"@babel/plugin-transform-exponentiation-operator": "^7.7.4",
"@babel/plugin-transform-literals": "^7.7.4",
"@babel/plugin-transform-member-expression-literals": "^7.7.4",
"@babel/plugin-transform-parameters": "^7.7.7",
"@babel/plugin-transform-property-literals": "^7.7.4",
"@babel/plugin-transform-shorthand-properties": "^7.7.4",
"@babel/plugin-transform-spread": "^7.7.4",
"@babel/plugin-transform-template-literals": "^7.7.4",
"babel-loader": "^8.0.6",
"babel-plugin-transform-es2015-modules-simple-commonjs": "~0.3.0",
"babel-plugin-transform-for-of-as-array": "^1.1.1",
"es-observable": "git+https://github.com/tc39/proposal-observable.git#bf4d87144b6189e793593868e3c022eb51a7d292",
"eslint": "^6.8.0",
"eslint-import-resolver-webpack": "^0.12.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-optimize-regex": "^1.1.7",
"eslint-plugin-qunit": "^4.0.0",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-unicorn": "^15.0.0",
"grunt": "^1.0.4",
"grunt-cli": "^1.3.2",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-uglify": "^4.0.1",
"grunt-karma": "^3.0.2",
"grunt-webpack": "^3.1.3",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-phantomjs-launcher": "~1.0.4",
"karma-qunit": "^4.0.0",
"lerna": "^3.19.0",
"moon-unit": "^0.2.2",
"phantomjs-prebuilt": "~2.1.16",
"promises-aplus-tests": "^2.1.2",
"puppeteer": "~2.0.0",
"qunit": "~2.9.3",
"webpack": "^4.41.4"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/zloirock/core-js.git"
},
"scripts": {
"bootstrap": "lerna bootstrap --no-ci",
"build": "grunt clean copy && npm run bootstrap && npm run build-compat && grunt bundle uglify",
"build-compat": "npm run build-compat-data && npm run build-compat-entries && npm run build-compat-modules-by-versions",
"build-compat-data": "node packages/core-js-compat/src/build-data",
"build-compat-entries": "node packages/core-js-compat/src/build-entries",
"build-compat-modules-by-versions": "node packages/core-js-compat/src/build-modules-by-versions",
"lint": "grunt clean copy && npm run bootstrap && npm run build-compat && eslint ./",
"unit-tests": "grunt clean copy && npm run bootstrap && npm run build-compat && grunt bundle webpack:helpers webpack:tests karma:tests",
"unit-tests-pure": "grunt clean copy && npm run build-compat && grunt webpack:helpers webpack:pure karma:pure",
"bundle-promises-tests": "grunt webpack:promises-aplus-tests",
"promises-tests": "promises-aplus-tests tests/promises-aplus/adapter --timeout 1000",
"observables-tests": "babel node_modules/es-observable/test/ -d tests/bundles/observables-tests/ && node tests/observables/adapter && node tests/observables/adapter-pure",
"commonjs-tests": "node tests/commonjs",
"commonjs-entries-content": "node tests/commonjs-entries-content",
"targets-parser-tests": "node tests/targets-parser",
"test": "grunt clean copy && npm run bootstrap && npm run build-compat && eslint ./ && grunt webpack:helpers webpack:tests bundle uglify karma:tests webpack:helpers webpack:pure karma:pure && npm run promises-tests && npm run observables-tests && npm run commonjs-tests && npm run commonjs-entries-content && npm run targets-parser-tests"
},
"engines": {
"node": ">=8.9.0"
}
}
18 changes: 9 additions & 9 deletions _freeze/site_libs/core-js-2.5.3/shim.min.js

Large diffs are not rendered by default.

Loading
Loading