GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - clevermaps/cm-data-transformation: dbt macros designed for rapid implementation of common geodata transformations tasks.

BranchesTags
Open more actions menu

Latest commit

 

History

41 Commits
41 Commits

Folders and files

NameName
Last commit message
Last commit date
dbt
dbt
 
 
docs
docs
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 

Repository files navigation

CleverMaps Transformations

This repository contains a library of standard dbt macros providing high-level spatial tasks built on top of atomic ST_* functions. The goal is to simplify, speed up, and standardize the implementation of common spatial analytics across data pipelines. Instead of repeatedly writing low-level spatial SQL, the library offers reusable task-oriented macros that can be easily integrated into existing dbt-based transformation workflows.

Key Characteristics:

  • Implemented as pure dbt macros
  • Built from atomic spatial (ST_*) functions
  • Focused on high-level analytical tasks, not low-level geometry handling
  • Designed for reuse across projects
  • Easy to compose inside standard dbt models and CTEs

Functions

/
├── agg/         # Spatial data aggregations
├── enrich/      # Data enrichment based on spatial relationships
├── filter/      # Filtering data by spatial relationships
├── find/        # Finding neighbors and nearest features
├── gen/         # Generating new spatial objects
└── cluster/     # Geometry clusterization

Functions details

Install

Add following to your packages.yml inside your dbt project:

packages:
  - git: "https://github.com/clevermaps/cm-data-transformation.git"
    subdirectory: "dbt/"

and run:

dbt deps

Example

{{ cm_dbt_macros.aggregate_by_region(
    left_source={
      "table": ref('stg_geobnd__adm4'),
      "geometry": "geom"
    },
    right_source={
      "table": ref('stg_worldpop__pop'),
      "geometry": "geom"
    },
    options={
      "agg": "sum(pop) as pop_sum"
    }
) }}

About

dbt macros designed for rapid implementation of common geodata transformations tasks.

Resources

Readme
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.