-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support using GeoPandas for GEOGRAPHY columns #848
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
0e3dba2
Removed unused method
jimfulton ff6c4ff
Implemented geography_as_object argument to to_dataframe and implemen…
jimfulton ecff6f9
blacken
jimfulton 15648af
Merge remote-tracking branch 'upstream/master' into to_geodataframe
jimfulton 766be77
Need to use different table names in tests.
jimfulton a904504
check messages in error assertions (for geo)
jimfulton bc985f9
added missing comma
jimfulton fb6eafd
Added missing tests.
jimfulton 0547801
blacken
jimfulton e0dde7c
Added tests showing delegation in some to_geodataframe implementations
jimfulton 177b099
Added a missing skip
jimfulton 86820e2
blacken
jimfulton c298fbd
doc tweaks
jimfulton e9cc38f
Updated dataframe_to_bq_schema to recognize geography data
jimfulton 5f866ff
Make load_from_pandas work with GeoSeries, shapely data, and binary w…
jimfulton e23b830
Small (14% for small polygons) optimization for reading wkt data
jimfulton 950d957
blacken/lint
jimfulton 0493acf
wait for it ...
jimfulton 5d986be
geopandas needs a slightly newer (but still old) version of pandas.
jimfulton f5e2f62
skip coverage on section of code that isn't reachable by tests
jimfulton 1084c4e
assuage pytype
jimfulton cdb821d
blacken
jimfulton 054a857
Added geopandas doc snippit
jimfulton 0924a03
make sure coordinate system is set correctly
jimfulton c9f8ab6
We need at least geopandas 0.9.0, which happens to be the current ver…
jimfulton b61bebc
Set version bounds for shapely
jimfulton edbea72
blacken
jimfulton 36e9ee3
Merge branch 'master' into to_geodataframe
jimfulton 2eed7c0
Merge branch 'master' into to_geodataframe
jimfulton b163b4d
Merge branch 'master' into to_geodataframe
jimfulton b6f19c9
rename CRS to _COORDINATE_REFERENCE_SYSTEM
jimfulton 459484f
Merge branch 'to_geodataframe' of github.com:jimfulton/python-bigquer…
jimfulton 3043585
Fixed intersphinx links
jimfulton fe8ea8a
capitalize shapely
jimfulton a81015a
merge upstream/master
jimfulton 2d3c372
blacken ...whimper
jimfulton 1a977fb
🦉 Updates from OwlBot
gcf-owl-bot[bot] 7dd9f5e
tell owlbot about pandas and geopandas intersphinx
jimfulton 3c257d9
Explain the _to_wkb hijinks
jimfulton c73b856
moar comments
jimfulton 5988052
Don't rely on string representations in assertions
jimfulton 3207e57
move to_geodataframe snippet to samples
jimfulton 27071a0
Removed pointless importskips
jimfulton abf473e
blacken
jimfulton 88b0653
use older dataclasses to try to deal with pip error in CI
jimfulton 1a4005c
git merge upstream/master
jimfulton 1b6b1d7
Don't need dataclasses after Python 3.6
jimfulton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
FYI: I'm trying to deprecate
date_as_object
: #861 and remove it in v3.I think it solved the problem in the wrong way. Better to do what we're doing for TIMESTAMP columns (try cast to pandas type and fallback to object if it fails) but also for DATE and related columns.
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.
Noted.
Given that, do you want to change the way we're indicating conversion to shapley geometry?
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.
I'm not as concerned about having a flag for geometry as object. I don't think Shapely suffers the same dtype weirdness that DATE columns do, where there's a risk of an exception if you make the wrong choice.
In date, because the supported range of dates in pandas is smaller than the supported range of dates in BigQuery, we can sometimes have to fallback to object. I'd rather not force the user to know the range of results they're expecting in order to keep
to_dataframe
from crashing, which is why I dislikedate_as_object
from an API design perspective.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.
Cool