Attach StatCan geographies to geocode() / reverse_geocode() results

Đang mở
#5 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
r
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu với geocode(), reverse_geocode(), vignette Querying NAR và phép join Addresses-to-Locations trên LOC_GUID. Xác định hình dạng API được đề xuất, các cột địa lý, cách xử lý các hàng không có ADDR_GUID và ngữ nghĩa của geom_source; được xem là hoàn tất khi giao diện được chọn gắn các kết quả địa lý đã được lập tài liệu mà không yêu cầu bên gọi tự viết phép join.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Split out of #1, which is closed: `Locations` is imported and carries `CSD_CODE`, `FED_CODE`/`FED_ENG_NAME`/`FED_FRE_NAME` and `ER_CODE`/`ER_ENG_NAME`/`ER_FRE_NAME`, joined to `Addresses` on `LOC_GUID`.

What is missing is a convenience layer. Today a user who wants the census subdivision or federal riding for a geocoded address has to know the schema and write the join themselves — the Querying NAR vignette shows how, but it is manual:

tbl(con, "Addresses") |>
  left_join(tbl(con, "Locations") |> select(LOC_GUID, FED_ENG_NAME, ER_ENG_NAME),
            by = "LOC_GUID")

Proposal: attach the geography for callers who never touch the database directly.

Open questions, roughly in the order they need answering:

  • Shape. An argument on the existing functions (`geocode(geographies = TRUE)`, `reverse_geocode(geographies = ...)`) or a standalone verb (`nar_geographies(x, con)`) that takes a result and adds columns? A standalone verb composes better and keeps the two entry points from growing a third mode each.
  • Which columns, and named how. All of CSD/FED/ER, or a selectable subset? NAR ships codes and both official-language names; returning nine columns by default is a lot.
  • Rows with no `ADDR_GUID`. Interpolated and `bc_*` rows have no NAR record to join through, so the geography would have to come from the point rather than the key — a spatial lookup against something the package does not currently carry. Simplest first cut is to fill `NA` for those and document it; anything better needs boundary files.
  • `geom_source`. A blockface-derived point can sit on the far side of a boundary from the building it stands for. Worth a note if the geography is ever derived spatially.
Ngôn ngữ chính
R
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của mountainMath/cangeocode

Tất cả issue của mountainMath/cangeocode

Issue tương tự

Thêm issue về R

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.