Provide geographic attribute files as hosted parquet, including pre-2006 censuses
まだ誰も着手していません。
評価
調査の方向性
Start by checking the R implementation of get_statcan_geographic_attributes() and the hosted storage status described in the issue; then inspect the listed source files and layouts for the older censuses. The work also requires deciding how to expose differing census fields and documenting provenance. Done means the missing parquet files are hosted with source and licence metadata, and the function can read them across the intended census years.
索引モデルが issue の本文から書いたものです。
説明
The geographic attribute files are useful well beyond TongFen: they link the lowest census geography to the higher levels, with population, dwellings and representative points. get_statcan_geographic_attributes() only covers 2006 to 2021 and downloads from StatCan, which now puts at least the 2021 file behind a browser check (#228).
This proposes serving the attribute files as hosted parquet, written with r2parquet, and adding the older censuses.
Files
| Census | Source | Base geography | Records |
|---|---|---|---|
| 2021, 2016, 2011, 2006 | 92-151 attribute files |
DB | Not counted here |
| 2001 | GeoSuite 2001 geosuite2001.mdb, tables CB and DA |
Block, DA | 478,707 blocks, 52,993 DAs |
| 1996 | GAF1996.txt |
EA | 49,361 |
| 1991 | gaf91.txt |
EA | 45,995 |
| 1986 | GAF1986.txt |
EA | 44,042 |
| 1981 | GAF1981.txt |
EA | 41,197 |
I haven't found a separate 2001 attribute file. The GeoSuite CB table has similar content: population, dwellings, representative points, and the codes for higher levels. If StatCan did release a 2001 attribute file, it should replace this.
Hosting status
I found no attribute files in the public mountainmath S3 bucket under the tongfen, cancensus, statcan, census, gaf or attribute prefixes, and the existing mirror holds only correspondence files. R2 still needs checking, as I couldn't list its buckets.
What needs doing
- Confirm what's already hosted on R2, then convert and upload what's missing, with the source and the Statistics Canada Open Data licence in the parquet footer.
- Extend
get_statcan_geographic_attributes()to the older years and read from the hosted files. Keep the provenance visible, since re-hosting is the concern raised in #228. - Parse the older fixed-width layouts, which have a different structure for each census.
- Decide whether to return columns as released or harmonised across years. As released is simpler and closer to the source, but the older EA-based files have quite different fields from the DB-based ones.
- Decide on the function's scope. The existing name still fits, but pre-2006 results are at EA level.
- Consider the same treatment for
get_statcan_geo_suite(). Its 2001 download URL returned a Cloudflare challenge (HTTP 403) when tested from a script.
Related: mountainMath/tongfen#22, which covers the correspondence files for the same censuses.
- 主要言語
- HTML
- スター
- 90
- フォーク
- 14
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mountainMath/cancensus のほかの issue
-
user agent対応中かも @mountainMath が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
mountainMath/cancensus#231 ·
-
Translate API level labelling to "labelled" columns対応中かも @mountainMath が 3 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
mountainMath/cancensus#230 · コメント 1 件 ·
-
French language labels対応中かも @mountainMath が 3 日前に担当しました。 オープンenhancement
難易度 4/5 1〜2日 初心者へのやさしさ 15/100
mountainMath/cancensus#229 · コメント 2 件 ·
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
mountainMath/cancensus#228 · コメント 1 件 ·
-
(Warning) messages when no cache path is set対応中かも @mountainMath が 3 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
mountainMath/cancensus#227 ·
mountainMath/cancensus の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
desktop v3 windows
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
esengine/DeepSeek-Reasonix#15016 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug priority/medium qa_automation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
yugabyte/yugabyte-db#37324 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
balovess/aria2_rust#88 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 87/100
btclib-org/btclib-node#2260 ·
メンテナーはふだん 1 日以内に返信