adding CityCountsByBatchcodeTablesMerger
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import pandas as pd
|
||||
from GoogleAnalytics.RegionCountsByClickedBatchcodeProvider import RegionCountsByClickedBatchcodeProvider
|
||||
from GoogleAnalytics.FilesProvider import FilesProvider
|
||||
from GoogleAnalytics.Resolution import Resolution
|
||||
from TablesHelper import TablesHelper
|
||||
|
||||
class RegionCountsByBatchcodeTablesMerger:
|
||||
|
||||
@staticmethod
|
||||
def getRegionCountsByClickedBatchcode(dataDir):
|
||||
files = FilesProvider(dataDir).getFilesHavingResolution(Resolution.CITY)
|
||||
tables = [RegionCountsByClickedBatchcodeProvider.getRegionCountsByClickedBatchcode(file) for file in files]
|
||||
table = TablesHelper.concatTables_groupByIndex_sum(tables)
|
||||
return table
|
||||
cityCountsByClickedBatchcodeTables = [RegionCountsByClickedBatchcodeProvider._getCityCountsByClickedBatchcode(file) for file in files]
|
||||
table = pd.concat(cityCountsByClickedBatchcodeTables)
|
||||
return RegionCountsByClickedBatchcodeProvider._getRegionCountsByClickedBatchcodeFromTable(table)
|
||||
|
||||
Reference in New Issue
Block a user