Skip to content
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

Remove dask anti-pattern example on README and docs #263

Open
codeananda opened this issue Feb 1, 2024 · 1 comment
Open

Remove dask anti-pattern example on README and docs #263

codeananda opened this issue Feb 1, 2024 · 1 comment

Comments

@codeananda
Copy link

The first example people see when reading about dask-geopandas is actually an anti-pattern that dask encourage us not to use.

Anti-pattern (loading outside of dask then transferring to dask)

import geopandas
import dask_geopandas

df = geopandas.read_file('...')
ddf = dask_geopandas.from_geopandas(df, npartitions=4)

It would be better to include an example that loads a file using dask-geopandas e.g.

import dask_geopandas
ddf = dask_geopandas.read_file("file.gpkg", npartitions=4)

Also, users are likely to come to dask-geopandas because they cannot load data using geopandas (it is too large). So, this also makes the first (and only) example on the README unhelpful.

@martinfleis
Copy link
Member

This comes from era when read_file was not implemented and nearly only way of getting dask_geopandas object was from a geopandas object.

PR is welcome!

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

No branches or pull requests

2 participants