fix(demos): plot the unit-values time series off a plain frame - #378
Merged
thodson-usgs merged 1 commit intoAug 13, 2026
Merged
Conversation
The cell raised ``TypeError: Axes.scatter() got multiple values for
argument 'x'`` and, because ``nbsphinx_allow_errors = True``, rendered
that traceback on the published docs page rather than failing the build.
``get_continuous`` returns a ``GeoDataFrame``, and ``.plot()`` on one
dispatches to the *geospatial* plot unless a pandas ``kind`` is given.
So ``x="time"`` was carried through as a style keyword into
``ax.scatter(x, y, **kwargs)``, which already had ``x`` positionally.
Subsetting to the two plotted columns yields a plain ``DataFrame`` and
the pandas plot, which is what the two sibling notebooks doing the same
time-series plot already do:
dailyStreamflow[0][["time", "value"]].plot(x="time", y="value")
data[0][["time", "value"]].plot(x="time", y="value", style=".")
This one was the only one missing the subset. Verified by executing the
notebook end to end against the live API.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BTaSm7HmVb94RSJiKW4WAS
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
One line in
demos/hydroshare/USGS_WaterData_UnitValues_Examples.ipynb:Why
The cell raised
TypeError: Axes.scatter() got multiple values for argument 'x'. Becauseconf.pysetsnbsphinx_allow_errors = True, this did not fail the docs build — it rendered the traceback on the published example page instead, which is why it went unnoticed.waterdata.get_continuousreturns aGeoDataFrame, andGeoDataFrame.plot()dispatches to the geospatial plot unless a pandaskindis given. Sox="time"was carried through as a style keyword down intoax.scatter(x, y, **kwargs), which already hadxpositionally.Subsetting to the two plotted columns yields a plain
DataFrameand therefore the pandas plot. That is exactly what the two sibling notebooks doing the same time-series plot already do:So this restores the established convention rather than introducing a new one. (
kind="line"also fixes it, but would make this notebook the odd one out.)Testing
All 23 tracked notebooks were executed against the live APIs. Result: 21 passed, 2 failed.
demos/R Python Vignette equivalents.ipynb— not a code defect. It fails onwaterqualitydata.uswithSSL: CERTIFICATE_VERIFY_FAILED … self-signed certificate in certificate chain, an artifact of a TLS-intercepting proxy on the machine that ran it.api.waterdata.usgs.govwas reachable in the same run. Nothing to change.🤖 Generated with Claude Code
https://claude.ai/code/session_01BTaSm7HmVb94RSJiKW4WAS