Read the GeoSuite from hosted parquet files

オープン
#234 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
r
領域
data

調査の方向性

Start by reading get_statcan_geo_suite() and get_statcan_geographic_attributes() in the repository, then review issue #233 for the download, caching, and refresh pattern. The work depends on parquet files being hosted by the private censusmapper-import repository, so first confirm they are available and identify the years and metadata they contain. Done means the function reads all hosted years, supports language labels, attaches metadata, and has coverage for the described table and numeric column cases.

索引モデルが issue の本文から書いたものです。

説明

Waiting on: the GeoSuite tables being built and uploaded as parquet files, which is tracked in the private censusmapper-import repo (issue 3). This issue is for rewriting get_statcan_geo_suite() once the files are hosted.

Plan

Rewrite get_statcan_geo_suite() along the lines of get_statcan_geographic_attributes() in 0.6.2 (#233):

  • Read the hosted parquet files with duckdb, using the same download, caching and refresh code.
  • Add a language parameter for the column labels, defaulting to the cancensus.language option.
  • Attach the file's metadata to the result, and say where the data comes from.
  • Columns will have short names that are the same across census years and match the style of the attribute files, so the two can be joined without renaming.
  • Cover all years that get hosted, instead of only 2021.

Problems with the current function that this fixes

  • Only 2021 is supported, and Statistics Canada blocks programmatic downloads of the zip file.
  • Representative point columns, e.g. DArplat and CSDrplamx, are returned as text, since only columns matching pop_, tdwell_, urdwell_ or area are converted to numbers.
  • Some tables can't be requested at all: CCS, the _P part tables, the CMA_CA_NCMA_CA tables, and the code tables like CSDTYPE.

For the release

  • Column names will change, so this is a breaking change for anyone using get_statcan_geo_suite() and needs a news entry like the one for the attribute files.
  • Point out the old geo_suite_<year> cache folders once per session, the same way the old attribute files are pointed out now.

Refs #228, #233

主要言語
HTML
スター
90
フォーク
14
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mountainMath/cancensus のほかの issue

mountainMath/cancensus の issue をすべて見る

似ている issue

Data Engineering の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。