public List <Duodata <string, int> > TheftPMonth() { Table tablechain = DataprocessingInitialisation.BikeTheft; Scene.SceneManager.getAScene("TestScene").SetParaMeters(tablechain.GetTable().Columns["Kennisname"].Count.ToString() + " default \n"); tablechain = new MakePerMonth("Kennisname", tablechain); Scene.SceneManager.getAScene("TestScene").SetParaMeters(tablechain.GetTable().Columns["Kennisname"].Count.ToString() + " mademonth \n"); tablechain = new CountOnColumnElement("Kennisname", tablechain); Scene.SceneManager.getAScene("TestScene").SetParaMeters(tablechain.GetTable().Columns["Kennisname"].Count.ToString() + " countedonelement \n"); StringTable table = tablechain.GetTable(); List <string> uniqueIDs, amounts; uniqueIDs = table.GetColumn("Kennisname"); amounts = table.GetColumn("Amount"); Duodata <string, int> toadd; List <Duodata <string, int> > toreturn = new List <Duodata <string, int> >(); for (int i = 0; i < uniqueIDs.Count; i++) { toadd = new Duodata <string, int>(uniqueIDs[i], int.Parse(amounts[i])); toreturn.Add(toadd); } return(toreturn); }
public List <Duodata <string, int> > TheftPMonthInNeighbourhood(string Neighbourhood) { Table tablechain = DataprocessingInitialisation.BikeTheft; tablechain = new MakePerMonth("Kennisname", tablechain); tablechain = new FilterOnly("Werkgebied", Neighbourhood, tablechain); tablechain = new CountOnColumnElement("Kennisname", tablechain); StringTable table = tablechain.GetTable(); List <string> uniqueIDs, amounts; uniqueIDs = table.GetColumn("Kennisname"); amounts = table.GetColumn("Amount"); Duodata <string, int> toadd; List <Duodata <string, int> > toreturn = new List <Duodata <string, int> >(); for (int i = 0; i < uniqueIDs.Count; i++) { toadd = new Duodata <string, int>(uniqueIDs[i], int.Parse(amounts[i])); toreturn.Add(toadd); } return(toreturn); }