GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add bigframes.bigquery.st_regionstats to join raster data from Earth Engine by tswast · Pull Request #2228 · google/bigframes

Conversation

@tswast

@tswast tswast commented Nov 4, 2025

Copy link
Copy Markdown
Collaborator

Towards internal issue b/457755215 🦕

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tswast
feat: add bigframes.bigquery.st_regionstats to join raster data from …
8706023
…Earth Engine
@tswast
tswast requested a review from a team as a code owner November 4, 2025 18:12
@tswast
tswast requested review from a team, GarrettWu and m-strzelczyk November 4, 2025 18:12
@snippet-bot

snippet-bot Bot commented Nov 4, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 1 region tag.
  • samples/snippets/st_regionstats_test.py:21, tag bigquery_dataframes_st_regionstats

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@blunderbuss-gcf blunderbuss-gcf Bot assigned liujiashang Nov 4, 2025
@product-auto-label product-auto-label Bot added size: l Pull request size is large. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Nov 4, 2025
@tswast
Merge branch 'main' into tswast-st-regionstats
924dd2c
@tswast tswast mentioned this pull request Nov 4, 2025
feat: Add BigFrames.bigquery.st_regionstats method #2200
Closed
4 tasks
@tswast

tswast commented Nov 4, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator Author

Python 3.9 failures look real. Need to bump the minimum SQLGlot version to support JSON literals, is my guess.

Edit: Done! I had to bump it even a bit further to avoid a bug with ltrim/rtrim.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tswast added 3 commits November 4, 2025 19:28
@tswast
upgrade sqlglot
a0d8e28
@tswast
Merge remote-tracking branch 'origin/tswast-st-regionstats' into tswa…
8a897cd
…st-st-regionstats
@tswast
address samples lint error
e000ce0
@tswast

tswast commented Nov 4, 2025

Copy link
Copy Markdown
Collaborator Author

Internal cl/828117205 to hopefully fix the permissions error on the code sample.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tswast added 3 commits November 4, 2025 16:32
@tswast
Merge branch 'main' into tswast-st-regionstats
9aaf580
@tswast
Merge branch 'main' into tswast-st-regionstats
771dd50
@tswast
avoid sqlglot rtrim/ltrim bug
2ddb0eb
@tswast tswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 5, 2025
@bigframes-bot bigframes-bot removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 5, 2025
GarrettWu
GarrettWu approved these changes Nov 5, 2025
View reviewed changes
Comment thread bigframes/bigquery/_operations/geo.py
def st_regionstats(
geography: Union[bigframes.series.Series, bigframes.geopandas.GeoSeries],
raster_id: str,
band: Optional[str] = None,

@GarrettWu GarrettWu Nov 5, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be consistent, we may want to make the optional args as kwargs.

def st_length(
    series: Union[bigframes.series.Series, bigframes.geopandas.GeoSeries],
    *,
    use_spheroid: bool = False,
)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@tswast tswast Nov 5, 2025

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'm okay either way with this one. In my testing, BigQuery SQL actually accepts the optional parameters to ST_REGIONSTATS as either keyword arguments or positional, so the Python default seems sensible here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tswast
tswast merged commit 10ec52f into main Nov 5, 2025
@tswast
tswast deleted the tswast-st-regionstats branch November 5, 2025 21:57
@release-please release-please Bot mentioned this pull request Nov 5, 2025
chore(main): release 2.29.0 #2225
Closed
@parthea parthea mentioned this pull request Nov 7, 2025
chore: librarian release pull request: 20251107T184449Z #2241
Closed
@release-please release-please Bot mentioned this pull request Nov 7, 2025
chore(main): release 2.29.0 #2242
Merged
sycai pushed a commit that referenced this pull request Nov 10, 2025
@release-please
chore(main): release 2.29.0 (#2242)
44e9869
🤖 I have created a release *beep* *boop*
---


##
[2.29.0](v2.28.0...v2.29.0)
(2025-11-10)


### Features

* Add bigframes.bigquery.st_regionstats to join raster data from Earth
Engine
([#2228](#2228))
([10ec52f](10ec52f))
* Add DataFrame.resample and Series.resample
([#2213](#2213))
([c9ca02c](c9ca02c))
* SQL Cell no longer escapes formatted string values
([#2245](#2245))
([d2d38f9](d2d38f9))
* Support left_index and right_index for merge
([#2220](#2220))
([da9ba26](da9ba26))


### Bug Fixes

* Correctly iterate over null struct values in ManagedArrowTable
([#2209](#2209))
([12e04d5](12e04d5))
* Simplify UnsupportedTypeError message
([#2212](#2212))
([6c9a18d](6c9a18d))
* Support results with STRUCT and ARRAY columns containing JSON
subfields in `to_pandas_batches()`
([#2216](#2216))
([3d8b17f](3d8b17f))


### Documentation

* Switch API reference docs to pydata theme
([#2237](#2237))
([9b86dcf](9b86dcf))
* Update notebook for JSON subfields support in to_pandas_batches()
([#2138](#2138))
([5663d2a](5663d2a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
@gkevinzheng gkevinzheng mentioned this pull request Nov 13, 2025
chore: librarian release pull request: 20251113T215818Z #2265
Closed
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Apr 1, 2026
@release-please
chore(main): release 2.29.0 (#2242)
a69afc4
🤖 I have created a release *beep* *boop*
---


##
[2.29.0](google/bigframes@v2.28.0...v2.29.0)
(2025-11-10)


### Features

* Add bigframes.bigquery.st_regionstats to join raster data from Earth
Engine
([#2228](google/bigframes#2228))
([10ec52f](google/bigframes@10ec52f))
* Add DataFrame.resample and Series.resample
([#2213](google/bigframes#2213))
([c9ca02c](google/bigframes@c9ca02c))
* SQL Cell no longer escapes formatted string values
([#2245](google/bigframes#2245))
([d2d38f9](google/bigframes@d2d38f9))
* Support left_index and right_index for merge
([#2220](google/bigframes#2220))
([da9ba26](google/bigframes@da9ba26))


### Bug Fixes

* Correctly iterate over null struct values in ManagedArrowTable
([#2209](google/bigframes#2209))
([12e04d5](google/bigframes@12e04d5))
* Simplify UnsupportedTypeError message
([#2212](google/bigframes#2212))
([6c9a18d](google/bigframes@6c9a18d))
* Support results with STRUCT and ARRAY columns containing JSON
subfields in `to_pandas_batches()`
([#2216](google/bigframes#2216))
([3d8b17f](google/bigframes@3d8b17f))


### Documentation

* Switch API reference docs to pydata theme
([#2237](google/bigframes#2237))
([9b86dcf](google/bigframes@9b86dcf))
* Update notebook for JSON subfields support in to_pandas_batches()
([#2138](google/bigframes#2138))
([5663d2a](google/bigframes@5663d2a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@m-strzelczyk m-strzelczyk Awaiting requested review from m-strzelczyk m-strzelczyk was automatically assigned from googleapis/python-samples-reviewers
1 more reviewer
@GarrettWu GarrettWu GarrettWu approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@liujiashang liujiashang

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: l Pull request size is large.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@tswast @GarrettWu @liujiashang @bigframes-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.