New graphs
| 
						 | 
					@ -533,10 +533,10 @@ function stackHists<K, V>(hists: [V, Histogram<K>][]): [V, Histogram<K>][] {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function createGraphs(allFeatures: ChangeSetData[], appliedFilterDescription: string) {
 | 
					function createGraphs(allFeatures: ChangeSetData[], appliedFilterDescription: string, cutoff = undefined) {
 | 
				
			||||||
    const hist = new Histogram<string>(allFeatures.map(f => f.properties.metadata.theme))
 | 
					    const hist = new Histogram<string>(allFeatures.map(f => f.properties.metadata.theme))
 | 
				
			||||||
    hist
 | 
					    hist
 | 
				
			||||||
        .createOthersCategory("other", 20)
 | 
					        .createOthersCategory("other", cutoff ?? 20)
 | 
				
			||||||
        .addCountToName()
 | 
					        .addCountToName()
 | 
				
			||||||
        .asBar({name: "Changesets per theme (bar)" + appliedFilterDescription})
 | 
					        .asBar({name: "Changesets per theme (bar)" + appliedFilterDescription})
 | 
				
			||||||
    .render()
 | 
					    .render()
 | 
				
			||||||
| 
						 | 
					@ -545,7 +545,7 @@ function createGraphs(allFeatures: ChangeSetData[], appliedFilterDescription: st
 | 
				
			||||||
    new Histogram<string>(allFeatures.map(f => f.properties.user))
 | 
					    new Histogram<string>(allFeatures.map(f => f.properties.user))
 | 
				
			||||||
        .binPerCount()
 | 
					        .binPerCount()
 | 
				
			||||||
        .stringifyName()
 | 
					        .stringifyName()
 | 
				
			||||||
        .createOthersCategory("25 or more", (key, _) => Number(key) >= 25).asBar(
 | 
					        .createOthersCategory("25 or more", (key, _) => Number(key) >=(cutoff ?? 25)).asBar(
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            compare: (a, b) => Number(a) - Number(b),
 | 
					            compare: (a, b) => Number(a) - Number(b),
 | 
				
			||||||
            name: "Contributors per changeset count" + appliedFilterDescription
 | 
					            name: "Contributors per changeset count" + appliedFilterDescription
 | 
				
			||||||
| 
						 | 
					@ -598,7 +598,7 @@ function createGraphs(allFeatures: ChangeSetData[], appliedFilterDescription: st
 | 
				
			||||||
        }).render()
 | 
					        }).render()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    new Histogram<string>(allFeatures.map(f => f.properties.metadata.theme))
 | 
					    new Histogram<string>(allFeatures.map(f => f.properties.metadata.theme))
 | 
				
			||||||
        .createOthersCategory("< 25 changesets", 25)
 | 
					        .createOthersCategory("< 25 changesets", (cutoff ?? 25))
 | 
				
			||||||
        .addCountToName()
 | 
					        .addCountToName()
 | 
				
			||||||
        .asPie({
 | 
					        .asPie({
 | 
				
			||||||
            name: "Changesets per theme (pie)" + appliedFilterDescription
 | 
					            name: "Changesets per theme (pie)" + appliedFilterDescription
 | 
				
			||||||
| 
						 | 
					@ -608,14 +608,14 @@ function createGraphs(allFeatures: ChangeSetData[], appliedFilterDescription: st
 | 
				
			||||||
        "Changesets per theme" + appliedFilterDescription,
 | 
					        "Changesets per theme" + appliedFilterDescription,
 | 
				
			||||||
        allFeatures,
 | 
					        allFeatures,
 | 
				
			||||||
        f => f.properties.metadata.theme,
 | 
					        f => f.properties.metadata.theme,
 | 
				
			||||||
        25
 | 
					        cutoff ?? 25
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Group.createStackedBarChartPerDay(
 | 
					    Group.createStackedBarChartPerDay(
 | 
				
			||||||
        "Changesets per version number" + appliedFilterDescription,
 | 
					        "Changesets per version number" + appliedFilterDescription,
 | 
				
			||||||
        allFeatures,
 | 
					        allFeatures,
 | 
				
			||||||
        f => f.properties.editor.substr("MapComplete ".length, 6).replace(/[a-zA-Z-/]/g, ''),
 | 
					        f => f.properties.editor.substr("MapComplete ".length, 6).replace(/[a-zA-Z-/]/g, ''),
 | 
				
			||||||
        1
 | 
					        cutoff ?? 1
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    Group.createStackedBarChartPerDay(
 | 
					    Group.createStackedBarChartPerDay(
 | 
				
			||||||
| 
						 | 
					@ -627,14 +627,14 @@ function createGraphs(allFeatures: ChangeSetData[], appliedFilterDescription: st
 | 
				
			||||||
        	return major+"."+minor
 | 
					        	return major+"."+minor
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        1
 | 
					        cutoff ??1
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Group.createStackedBarChartPerDay(
 | 
					    Group.createStackedBarChartPerDay(
 | 
				
			||||||
        "Deletion-changesets per theme" + appliedFilterDescription,
 | 
					        "Deletion-changesets per theme" + appliedFilterDescription,
 | 
				
			||||||
        allFeatures.filter(f => f.properties.delete > 0),
 | 
					        allFeatures.filter(f => f.properties.delete > 0),
 | 
				
			||||||
        f => f.properties.metadata.theme,
 | 
					        f => f.properties.metadata.theme,
 | 
				
			||||||
        1
 | 
					        cutoff ?? 1
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
| 
						 | 
					@ -715,7 +715,8 @@ async function main(): Promise<void>{
 | 
				
			||||||
    createGraphs(allFeatures, "")
 | 
					    createGraphs(allFeatures, "")
 | 
				
			||||||
    // createGraphs(allFeatures.filter(f => f.properties.date.startsWith("2020")), " in 2020")
 | 
					    // createGraphs(allFeatures.filter(f => f.properties.date.startsWith("2020")), " in 2020")
 | 
				
			||||||
    // createGraphs(allFeatures.filter(f => f.properties.date.startsWith("2021")), " in 2021")
 | 
					    // createGraphs(allFeatures.filter(f => f.properties.date.startsWith("2021")), " in 2021")
 | 
				
			||||||
    createGraphs(allFeatures.filter(f => f.properties.date.startsWith("2022")), " in 2022")
 | 
					    createGraphs(allFeatures.filter(f => f.properties.date.startsWith("2022")), " in 2022"),
 | 
				
			||||||
 | 
					    createGraphs(allFeatures.filter(f => f.properties.metadata.theme==="toerisme_vlaanderen"), " met pin je punt", 0)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
main().then(_ => console.log("All done!"))
 | 
					main().then(_ => console.log("All done!"))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
		 Before Width: | Height: | Size: 500 KiB After Width: | Height: | Size: 562 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Docs/Tools/graphs/Changesets per day (line) met pin je punt.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 298 KiB  | 
| 
		 Before Width: | Height: | Size: 370 KiB After Width: | Height: | Size: 368 KiB  | 
| 
		 Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 578 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Docs/Tools/graphs/Changesets per host met pin je punt.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 209 KiB  | 
| 
		 Before Width: | Height: | Size: 213 KiB After Width: | Height: | Size: 330 KiB  | 
| 
		 Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 131 KiB  | 
| 
		 After Width: | Height: | Size: 105 KiB  | 
| 
		 Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 181 KiB  | 
| 
		 Before Width: | Height: | Size: 231 KiB After Width: | Height: | Size: 280 KiB  | 
| 
		 Before Width: | Height: | Size: 646 KiB After Width: | Height: | Size: 652 KiB  | 
| 
		 Before Width: | Height: | Size: 257 KiB After Width: | Height: | Size: 332 KiB  | 
| 
		 Before Width: | Height: | Size: 887 KiB After Width: | Height: | Size: 890 KiB  | 
| 
		 Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 213 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Docs/Tools/graphs/Changesets per theme met pin je punt.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 95 KiB  | 
| 
		 Before Width: | Height: | Size: 580 KiB After Width: | Height: | Size: 582 KiB  | 
| 
		 Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 208 KiB  | 
| 
		 After Width: | Height: | Size: 153 KiB  | 
| 
		 Before Width: | Height: | Size: 671 KiB After Width: | Height: | Size: 687 KiB  | 
| 
		 Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 133 KiB  | 
| 
		 Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 138 KiB  | 
| 
		 Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 125 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								Docs/Tools/graphs/Contributors per day met pin je punt.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 116 KiB  | 
| 
		 Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 126 KiB  | 
| 
		 Before Width: | Height: | Size: 224 KiB After Width: | Height: | Size: 227 KiB  | 
| 
		 After Width: | Height: | Size: 112 KiB  | 
| 
		 Before Width: | Height: | Size: 257 KiB After Width: | Height: | Size: 262 KiB  | 
| 
		 Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 98 KiB  |