Exemplo n.º 1
0
def make_chart_point(featureName):

    featureObject = ML_prep.feature(featureName)
    featureObject.computeProfitability()
    featureObject.computeImpactHistory()
    movieListString = ','.join(['\"'+x+'\"' for x in featureObject.MovieTitles])
    return movieListString
Exemplo n.º 2
0
def make_chart_data(featureName):
    """ make series List  """

    featureObject = ML_prep.feature(featureName)
    featureObject.computeProfitability()
    featureObject.computeImpactHistory()

    dataList = []
    for i in range(len(featureObject.Impact)):
        dataList.append([featureObject.yearImpact[i],\
                        featureObject.Impact[i]])
    seriesString = '{name:\"'+featureObject.name+'\",'

    movieListString = ','.join(['\"'+x+'\"' for x in featureObject.MovieTitles])
    dataListString = str(dataList)
    seriesString += ' id:['+movieListString+'],'
    seriesString += ' data:'+dataListString+'}'

    return seriesString