Skip to content

feat(r/sedonadb): Add spatial join syntax and join type helpers#814

Draft
paleolimbot wants to merge 8 commits intoapache:mainfrom
paleolimbot:r-join-df-syntax
Draft

feat(r/sedonadb): Add spatial join syntax and join type helpers#814
paleolimbot wants to merge 8 commits intoapache:mainfrom
paleolimbot:r-join-df-syntax

Conversation

@paleolimbot
Copy link
Copy Markdown
Member

library(sedonadb)

cities <- sd_read_parquet(system.file(
  "files/natural-earth_cities_geo.parquet",
  package = "sedonadb"
))
countries <- sd_read_parquet(system.file(
  "files/natural-earth_countries_geo.parquet",
  package = "sedonadb"
))

cities |> sd_left_join(countries, by = sd_join_intersects())
#> <sedonab_dataframe: NA x 4>
#> ┌──────────────┬───────────────────────────────┬────────────┬───────────┐
#> │    name.x    ┆            geometry           ┆   name.y   ┆ continent │
#> │     utf8     ┆            geometry           ┆    utf8    ┆    utf8   │
#> ╞══════════════╪═══════════════════════════════╪════════════╪═══════════╡
#> │ Lobamba      ┆ POINT(31.1999971 -26.4666675) ┆ eSwatini   ┆ Africa    │
#> ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┤
#> │ Vaduz        ┆ POINT(9.5166695 47.1337238)   ┆ Austria    ┆ Europe    │
#> ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┤
#> │ Luxembourg   ┆ POINT(6.1300028 49.6116604)   ┆ Luxembourg ┆ Europe    │
#> ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┤
#> │ Vatican City ┆ POINT(12.4533865 41.9032822)  ┆ Italy      ┆ Europe    │
#> ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┤
#> │ San Marino   ┆ POINT(12.4417702 43.9360958)  ┆ Italy      ┆ Europe    │
#> ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┤
#> │ Palikir      ┆ POINT(158.1499743 6.9166437)  ┆            ┆           │
#> └──────────────┴───────────────────────────────┴────────────┴───────────┘
#> Preview of up to 6 row(s)

Created on 2026-05-04 with reprex v2.1.1

paleolimbot and others added 8 commits May 3, 2026 23:19
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@github-actions github-actions Bot requested a review from zhangfengcdt May 5, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant