New graphs, script to create slices centerpoints

This commit is contained in:
Pieter Vander Vennet 2022-01-16 01:58:02 +01:00
parent 4a8823af4b
commit cce6a9e832
23 changed files with 42133 additions and 41166 deletions

View file

@ -662,15 +662,21 @@ function createMiscGraphs(allFeatures: ChangeSetData[], emptyCS: ChangeSetData[]
}).render() }).render()
const geojson = { const geojson = {
type: "FeatureCollection", type: "FeatureCollection",
features: Utils.NoNull(allFeatures.map(f => { features: Utils.NoNull(allFeatures
try { .map(f => {
const point = GeoOperations.centerpoint(f.geometry); try {
point.properties = f.properties const point = GeoOperations.centerpoint(f.geometry);
return point point.properties = {...f.properties, ...f.properties.metadata}
} catch (e) { delete point.properties.metadata
console.error("Could not create center point: ", e, f) for (const key in f.properties.metadata) {
return undefined point.properties[key] = f.properties.metadata[key]
} }
return point
} catch (e) {
console.error("Could not create center point: ", e, f)
return undefined
}
})) }))
} }
writeFileSync("centerpoints.geojson", JSON.stringify(geojson, undefined, 2)) writeFileSync("centerpoints.geojson", JSON.stringify(geojson, undefined, 2))

View file

@ -0,0 +1,13 @@
#! /bin/bash
ts-node GenerateSeries.ts
# Move to the root of the repo
cd ../..
cd ../MapComplete-data
git pull
cd -
ts-node scripts/slice.ts Docs/Tools/centerpoints.geojson 8 ../MapComplete-data/mapcomplete-changes/
cd -
git add mapcomplete-changes/*
git commit -am "New changeset data"
git push

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 KiB

After

Width:  |  Height:  |  Size: 372 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 KiB

After

Width:  |  Height:  |  Size: 365 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 142 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 KiB

After

Width:  |  Height:  |  Size: 227 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 KiB

After

Width:  |  Height:  |  Size: 619 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 848 KiB

After

Width:  |  Height:  |  Size: 846 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 103 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 549 KiB

After

Width:  |  Height:  |  Size: 549 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 KiB

After

Width:  |  Height:  |  Size: 605 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 128 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Before After
Before After

File diff suppressed because it is too large Load diff