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","."]
docstr: Parameters
  ----------
  term_doc_matrix : TermDocMatrix
  category_to_timestep_func : lambda
  is_gap_between_sequences_func : lambda
          timesteps_to_lag : int
  num_top_terms_each_timestep : int
  num_terms_to_include : int
  starting_time_step : object
  term_ranker : TermRanker
  term_scorer : TermScorer
docstr_tok: ["Parameters","--","--","--","--","--","term_doc_matrix",":","TermDocMatrix","category_to_timestep_func",":","lambda","is_gap_between_sequences_func",":","lambda","timesteps_to_lag",":","int","num_top_terms_each_timestep",":","int","num_terms_to_include",":","int","starting_time_step",":","object","term_ranker",":","TermRanker","term_scorer",":","TermScorer"]
code: def __init__(
      self,
      term_doc_matrix,
      category_to_timestep_func,
      is_gap_between_sequences_func,
      timesteps_to_lag=4,
      num_top_terms_each_timestep=10,
      num_terms_to_include=40,
      starting_time_step=None,
      term_ranker=AbsoluteFrequencyRanker,
      term_scorer=RankDifference(),
  ):
      """
      Parameters
      ----------
      term_doc_matrix : TermDocMatrix
      category_to_timestep_func : lambda
      is_gap_between_sequences_func : lambda
              timesteps_to_lag : int
      num_top_terms_each_timestep : int
      num_terms_to_include : int
      starting_time_step : object
      term_ranker : TermRanker
      term_scorer : TermScorer
      """
      self.corpus = term_doc_matrix
      self.timesteps_to_lag = timesteps_to_lag
      self.num_top_terms_each_timestep = num_top_terms_each_timestep
      self.num_terms_to_include = num_terms_to_include
      self.is_gap_between_sequences_func = is_gap_between_sequences_func
      self.category_to_timestep_func = category_to_timestep_func
      self.term_ranker = term_ranker
      self.term_scorer = term_scorer
      categories = list(sorted(self.corpus.get_categories()))
      if len(categories) <= timesteps_to_lag:
          raise Exception(
              "The number of categories in the term doc matrix is <= "
              + str(timesteps_to_lag)
          )
      if starting_time_step is None:
          starting_time_step = categories[timesteps_to_lag + 1]
      self.starting_time_step = starting_time_step
  
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 1 to create a new GanttChart object from inherited base classes: object with example: obj = GanttChart(term_doc_matrix, category_to_timestep_func, is_gap_between_sequences_func, timesteps_to_lag, num_top_terms_each_timestep, num_terms_to_include, starting_time_step, term_ranker, term_scorer)