Skip to content

Commit

Permalink
fix groupby name property in merge method with groupby option
Browse files Browse the repository at this point in the history
  • Loading branch information
TomBor committed May 13, 2024
1 parent a8fe4ef commit 47b32a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function merge(topo, options = {}) {
const groupby_features = [];
groupby_map.forEach((value, key) => {
const features = topoMergeArcs(topo, value);
groupby_features.push({ ...features, properties: { groupby: key } });
groupby_features.push({ ...features, properties: { [groupby]: key } });
});

const output = reconstructTopojson(topo, groupby_features, {
Expand Down
4 changes: 2 additions & 2 deletions src/properties.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getLayerName } from "./helpers/layers";

/**
* Manipulate properties of a topojson layer with Arquero
* Only four arquero verb are available: select, rename, derive and join
* Manipulate properties of a topojson layer
* Four types of operations are available: select, rename, derive and join.
*
* @param {TopoJSON} topo - A valid topojson object
* @param {Object} options - optional parameters
Expand Down

0 comments on commit 47b32a8

Please sign in to comment.