-
Notifications
You must be signed in to change notification settings - Fork 795
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(RFC): Adds altair.datasets
#3631
Draft
dangotbanned
wants to merge
164
commits into
main
Choose a base branch
from
vega-datasets
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
- Allow quickly switching between version tags #3150 (comment)
To support [flights-200k.arrow](https://github.com/vega/vega-datasets/blob/f637f85f6a16f4b551b9e2eb669599cc21d77e69/data/flights-200k.arrow)
Not required for these requests, but may be helpful to avoid limits
As an example, for comparing against the most recent I've added the 5 most recent
- Basic mechanism for discovering new versions - Tries to minimise number of and total size of requests
Experimenting with querying the url cache w/ expressions
- `metadata_full.parquet` stores **all known** file metadata - `GitHub.refresh()` to maintain integrity in a safe manner - Roughly 3000 rows - Single release: **9kb** vs 46 releases: **21kb**
- Still undecided exactly how this functionality should work - Need to resolve `npm` tags != `gh` tags issue as well
@jonmmease I just tried updating this branch, seems to be some UpdateResolved in #3702 |
Feature has been adopted upstream in narwhals-dev/narwhals#1417
Not using doctest style here, none of these return anything but I want them hinted at
Mutability is not needed. Also see #3573
This was referenced Nov 24, 2024
Provides a generalized solution to `pd.read_(csv|json)` requiring the names of date columns to attempt parsing. cc @joelostblom The solution is possible in large part to vega/vega-datasets#631 #3631 (comment)
…arrow` Provides better dtype inference
Switching to one with a timestamp that `frictionless` recognises https://github.com/vega/vega-datasets/blob/8745f5c61ba951fe057a42562b8b88604b4a3735/datapackage.json#L2674-L2689 https://github.com/vega/vega-datasets/blob/8745f5c61ba951fe057a42562b8b88604b4a3735/datapackage.json#L45-L57
This was referenced Dec 5, 2024
Changes from vega/vega-datasets#648 Currently pinned on `main` until `v3.0.0` introduces `datapackage.json` https://github.com/vega/vega-datasets/tree/main
2 tasks
- Adds some incomplete types for fields (`sources`, `licenses`) - Misc changes from vega/vega-datasets#651, vega/vega-datasets#643
5 tasks
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.
Related
Status
Waiting on the next
vega-datasets
release.Once there is a stable
datapackage.json
available - there is quite a lot oftools/datasets
that can be simplified/removed.3.0.0
Release vega-datasets#654Description
Providing a minimal, but up-to-date source for https://github.com/vega/vega-datasets.
This PR takes a different approach to that of https://github.com/altair-viz/vega_datasets, notably:
metadata.parquet
npm
andgithub
pandas
"polars"
backend, the slowest I've had on a cache-hit is 0.1s to loadExamples
These all come from the docstrings of:
Loader
Loader.from_backend
Loader.__call__
Tasks
altair.datasets
Loader.__call__
_readers._Reader
_typing.Metadata
(Align with revised descriptions from (c572180))tools.datasets
Application
models.py
github.py
npm.py
semver.py
_PyArrowReader
JSON limitation (3fbc759), (4f5b4de)Resolved
Investigate bundling metadata
npm
does not have every version availableGitHub
npm
github
, but during testing this was much slowernpm
Plan strategy for user-configurable dataset cache
altair
, each release would simply ship with changes baked inaltair
package size with datasetsaltair
versionsALTAIR_DATASETS_DIR
Deferred
Reducing cache footprint
.(csv|tsv|json)
files as.parquet
Investigate providing a decorator to add a backend
_name: LiteralString
_read_fn: dict[Extension, Callable[..., IntoDataFrameT]]
_scan_fn: dict[_ExtensionScan, Callable[..., IntoFrameT]]
Provide more meaningful info on the state of
ALTAIR_DATASETS_DIR
sha
cover?nw.Expr.(first|last)
nw.Expr.(head|tail)(1)
not equivalent in agroup_by().agg(...)
contextpandas
-> scalarpolars
-> listpl.Enum
translating to non-orderedpd.Categorical
polars
-native solution