Ejemplo n.º 1
0
def main():
    print 'Main'
    dataDirectory = 'data/'
    start = time.time()
    data = DataExtractorFactory.getDataExtractor('expertisemodel', dataDirectory)
    expertUsersData = data.getAllExpertsData()
    region = Region((50, -125), (25.255, -60),center = (30,-60) ,expertise='vc')
    UsersData.addUserDataToRegions(expertUsersData)
    usersBucket = BucketUsers(region, 50)
    print time.time() - start,' is the time taken'
    usersBucket.printBuckets()
Ejemplo n.º 2
0
    def __init__(self, dataDirectory, dataExtractor=None):
        self._dictExpertiseRegions.clear()
        self._dictExpertModels.clear()
        self._dataDirectory = dataDirectory
        if dataExtractor == None:
            self._expertDataExtractor = DataExtractorFactory.getDataExtractor("expertisemodel", self._dataDirectory)
            self._expertDataExtractor.populateData(self._dataDirectory)
        else:
            self._expertDataExtractor = dataExtractor

        self._dictExpertUsersData = self._expertDataExtractor.getAllExpertsData()
        self._createParentRegions()
        UsersData.addUserDataToRegions(self._dictExpertUsersData)