class_docstr: Note: the Gantt charts listed here are inspired by
  Dustin Arendt and Svitlana Volkova. ESTEEM: A Novel Framework for Qualitatively Evaluating and
  Visualizing Spatiotemporal Embeddings in Social Media. ACL System Demonstrations. 2017.
  http://www.aclweb.org/anthology/P/P17/P17-4005.pdf
  
  In order to use the make chart function, Altair must be installed.
class_docstr_tok: ["Note",":","the","Gantt","charts","listed","here","are","inspired","by","Dustin","Arendt","and","Svitlana","Volkova",".","ESTEEM",":","A","Novel","Framework","for","Qualitatively","Evaluating","and","Visualizing","Spatiotemporal","Embeddings","in","Social","Media",".","ACL","System","Demonstrations",".","2017.","http",":","\/\/www.aclweb.org\/anthology\/P\/P17\/P17-4005.pdf","In","order","to","use","the","make","chart","function",",","Altair","must","be","installed","."]
code: def _get_term_time_df(self):
      data = []
      tdf = self.term_ranker(self.corpus).get_ranks()
      for cat in sorted(self.corpus.get_categories()):
          if cat >= self.starting_time_step:
              negative_categories = self._get_negative_categories(
                  cat, tdf
              )
              scores = self.term_scorer.get_scores(
                  tdf[cat + " freq"].astype(int),
                  tdf[negative_categories].sum(axis=1),
              )
              top_term_indices = np.argsort(-scores)[
                  : self.num_top_terms_each_timestep
              ]
              for term in tdf.index[top_term_indices]:
                  data.append(
                      {
                          "time": self.category_to_timestep_func(cat),
                          "term": term,
                          "top": 1,
                      }
                  )
      return pd.DataFrame(data)
  
file_path: scattertext/scattertext/diachronic/GanttChart.py
imports: import numpy
  import pandas
  from scattertext.termranking import AbsoluteFrequencyRanker
  from scattertext.termscoring.RankDifference import RankDifference
label_desc: Use image node_id 5 for calling the GanttChart obj's underlying member method code with example usage: obj._get_term_time_df() and returns: pd