def get_tf_idf_vector(tags, all_terms, idf_map):
    return [(1 if term in tags else 0) * idf_map[term] for term in all_terms]
Test Various Chart views
dataset/ETHPy150Open dchaplinsky/unshred-tag/metrics/tfidf.py/get_tf_idf_vector--crossover with--dataset/ETHPy150Open dpgaspar/Flask-AppBuilder/flask_appbuilder/tests/test_mongoengine.py/FlaskTestCase.test_charts_view