forked from MapComplete/MapComplete
New graphs
This commit is contained in:
parent
f77308dce0
commit
e3a68d0965
21 changed files with 13246 additions and 2 deletions
|
@ -567,9 +567,24 @@ function createGraphs(allFeatures: ChangeSetData[], appliedFilterDescription: st
|
|||
.keyToDate()
|
||||
.asLine({
|
||||
compare: (a, b) => a.getTime() - b.getTime(),
|
||||
name: "Running weekly average" + appliedFilterDescription
|
||||
name: "Rolling 7 day average" + appliedFilterDescription
|
||||
})
|
||||
createGraph("Changesets per day (line)" + appliedFilterDescription, perDayLine, perDayAvg)
|
||||
|
||||
const perDayAvgMonth = csPerDay.asRunningAverages(key => {
|
||||
const keys = []
|
||||
for (let i = 0; i < 31; i++) {
|
||||
const otherDay = new Date(new Date(key).getTime() - i * 1000 * 60 * 60 * 24)
|
||||
keys.push(otherDay.toISOString().substr(0, 10))
|
||||
}
|
||||
return keys
|
||||
})
|
||||
.keyToDate()
|
||||
.asLine({
|
||||
compare: (a, b) => a.getTime() - b.getTime(),
|
||||
name: "Rolling 31 day average" + appliedFilterDescription
|
||||
})
|
||||
|
||||
createGraph("Changesets per day (line)" + appliedFilterDescription, perDayLine, perDayAvg, perDayAvgMonth)
|
||||
|
||||
new Histogram<string>(allFeatures.map(f => f.properties.metadata.host))
|
||||
.asPie({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue