Coder Social home page Coder Social logo

Comments (4)

jorisvandenbossche avatar jorisvandenbossche commented on June 16, 2024 1

Note that this is basically calling dask's set_index with the calculated distance:

ddf_shuffled = ddf.set_index(ddf.geometry.hilbert_distance())

But, one thing that we probably also want during that process is to calculate the spatial bounds of each partition, so that the resulting ddf_shuffled.spatial_partitions is set.
I am not fully sure if we can do that more efficiently by tightly integrating that into the set_index (which could mean copying some of the dask implementation to be able to adapt it), or whether calling a ddf.calculate_spatial_partitions() afterwards is as good.

from dask-geopandas.

martinfleis avatar martinfleis commented on June 16, 2024

I don't think we can make it any faster than calling one after the other.

from dask-geopandas.

jorisvandenbossche avatar jorisvandenbossche commented on June 16, 2024

One question from the meeting: we could add a keyword to control whether to actually add the calculated distance as the index or to drop it.

from dask-geopandas.

jorisvandenbossche avatar jorisvandenbossche commented on June 16, 2024

This might be worth having a separate issue about, but one of the ideas mentioned in a previous meeting is to also have a way to shuffle two dataframes at the same time with a consistent partitioning (or shuffle one dataframe to align with the partitioning of another).

from dask-geopandas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.