Skip to content

📋 Issue: data.world integration #103

@profsergiocosta

Description

@profsergiocosta

Title:
[ENH] Re-add data.world integration in dissmodel.io

Labels:
enhancement data-world io sparql

Objective:
Restore the ability to load geospatial data directly from data.world via SPARQL queries, returning a GeoDataFrame ready for use in DisSModel.

Previous functionality (reference):

def dw_query(dataset, query, geo_column='wkt', query_type='sparql'):
    results = dw.query(dataset, query, query_type)
    gdf = gpd.GeoDataFrame(
        results.dataframe,
        geometry=gpd.GeoSeries.from_wkt(results.dataframe[geo_column])
    )
    return gdf

Initial ideas:

  • Create dissmodel/io/dataworld.py with query functions
  • Support for SPARQL and SQL (if applicable)
  • Automatic WKT/WKB to geometry conversion
  • Integration with vector_to_raster_backend for direct flow: data.world → GeoDataFrame → RasterBackend
  • Credentials via environment variables (.env)

Next steps:

  • Review current datadotworld API (changes since last version)
  • Decide whether to keep as optional dependency
  • Decide whether to expose only raw query or also specific helpers (e.g., load_dbcells())
  • Implement and test with a real dataset

Notes:
Detailed implementation to be defined after investigation. Consider credential security and connection error handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions