class_docstr: Creates a TimestampedGeoJson plugin from timestamped GeoJSONs to append
  into a map with Map.add_child.
  
  A geo-json is timestamped if:
  
  * it contains only features of types LineString, MultiPoint, MultiLineString,
    Polygon and MultiPolygon.
  * each feature has a 'times' property with the same length as the
    coordinates array.
  * each element of each 'times' property is a timestamp in ms since epoch,
    or in ISO string.
  
  Eventually, you may have Point features with a 'times' property being an
  array of length 1.
  
  Parameters
  ----------
  data: file, dict or str.
      The timestamped geo-json data you want to plot.
  
      * If file, then data will be read in the file and fully embedded in
        Leaflet's javascript.
      * If dict, then data will be converted to json and embedded in the
        javascript.
      * If str, then data will be passed to the javascript as-is.
  transition_time: int, default 200.
      The duration in ms of a transition from between timestamps.
  loop: bool, default True
      Whether the animation shall loop.
  auto_play: bool, default True
      Whether the animation shall start automatically at startup.
  add_last_point: bool, default True
      Whether a point is added at the last valid coordinate of a LineString.
  period: str, default "P1D"
      Used to construct the array of available times starting
      from the first available time. Format: ISO8601 Duration
      ex: 'P1M' 1/month, 'P1D' 1/day, 'PT1H' 1/hour, and 'PT1M' 1/minute
  duration: str, default None
      Period of time which the features will be shown on the map after their
      time has passed. If None, all previous times will be shown.
      Format: ISO8601 Duration
      ex: 'P1M' 1/month, 'P1D' 1/day, 'PT1H' 1/hour, and 'PT1M' 1/minute
  
  Examples
  --------
  >>> TimestampedGeoJson(
  ...     {
  ...         "type": "FeatureCollection",
  ...         "features": [
  ...             {
  ...                 "type": "Feature",
  ...                 "geometry": {
  ...                     "type": "LineString",
  ...                     "coordinates": [[-70, -25], [-70, 35], [70, 35]],
  ...                 },
  ...                 "properties": {
  ...                     "times": [1435708800000, 1435795200000, 1435881600000],
  ...                     "tooltip": "my tooltip text",
  ...                 },
  ...             }
  ...         ],
  ...     }
  ... )
  
  See https://github.com/socib/Leaflet.TimeDimension for more information.
class_docstr_tok: ["Creates","a","TimestampedGeoJson","plugin","from","timestamped","GeoJSONs","to","append","into","a","map","with","Map.add_child",".","A","geo-json","is","timestamped","if",":","*","it","contains","only","features","of","types","LineString",",","MultiPoint",",","MultiLineString",",","Polygon","and","MultiPolygon",".","*","each","feature","has","a","'times","'","property","with","the","same","length","as","the","coordinates","array",".","*","each","element","of","each","'times","'","property","is","a","timestamp","in","ms","since","epoch",",","or","in","ISO","string",".","Eventually",",","you","may","have","Point","features","with","a","'times","'","property","being","an","array","of","length","1",".","Parameters","--","--","--","--","--","data",":","file",",","dict","or","str",".","The","timestamped","geo-json","data","you","want","to","plot",".","*","If","file",",","then","data","will","be","read","in","the","file","and","fully","embedded","in","Leaflet","'s","javascript",".","*","If","dict",",","then","data","will","be","converted","to","json","and","embedded","in","the","javascript",".","*","If","str",",","then","data","will","be","passed","to","the","javascript","as-is",".","transition_time",":","int",",","default","200",".","The","duration","in","ms","of","a","transition","from","between","timestamps",".","loop",":","bool",",","default","True","Whether","the","animation","shall","loop",".","auto_play",":","bool",",","default","True","Whether","the","animation","shall","start","automatically","at","startup",".","add_last_point",":","bool",",","default","True","Whether","a","point","is","added","at","the","last","valid","coordinate","of","a","LineString",".","period",":","str",",","default","``","P1D","''","Used","to","construct","the","array","of","available","times","starting","from","the","first","available","time",".","Format",":","ISO8601","Duration","ex",":","'P1M","'","1\/month",",","'P1D","'","1\/day",",","'PT1H","'","1\/hour",",","and","'PT1M","'","1\/minute","duration",":","str",",","default","None","Period","of","time","which","the","features","will","be","shown","on","the","map","after","their","time","has","passed",".","If","None",",","all","previous","times","will","be","shown",".","Format",":","ISO8601","Duration","ex",":","'P1M","'","1\/month",",","'P1D","'","1\/day",",","'PT1H","'","1\/hour",",","and","'PT1M","'","1\/minute","Examples","--","--","--","--",">",">",">","TimestampedGeoJson","(","...","{","...","``","type","''",":","``","FeatureCollection","''",",","...","``","features","''",":","[","...","{","...","``","type","''",":","``","Feature","''",",","...","``","geometry","''",":","{","...","``","type","''",":","``","LineString","''",",","...","``","coordinates","''",":","[","[","-70",",","-25","]",",","[","-70",",","35","]",",","[","70",",","35","]","]",",","...","}",",","...","``","properties","''",":","{","...","``","times","''",":","[","1435708800000",",","1435795200000",",","1435881600000","]",",","...","``","tooltip","''",":","``","my","tooltip","text","''",",","...","}",",","...","}","...","]",",","...","}","...",")","See","https",":","\/\/github.com\/socib\/Leaflet.TimeDimension","for","more","information","."]
code: def __init__(
      self,
      data,
      transition_time=200,
      loop=True,
      auto_play=True,
      add_last_point=True,
      period="P1D",
      min_speed=0.1,
      max_speed=10,
      loop_button=False,
      date_options="YYYY-MM-DD HH:mm:ss",
      time_slider_drag_update=False,
      duration=None,
      speed_slider=True,
  ):
      super().__init__()
      self._name = "TimestampedGeoJson"
  
      if "read" in dir(data):
          self.embed = True
          self.data = data.read()
      elif type(data) is dict:
          self.embed = True
          self.data = json.dumps(data)
      else:
          self.embed = False
          self.data = data
      self.add_last_point = bool(add_last_point)
      self.period = period
      self.date_options = date_options
      self.duration = (
          "undefined" if duration is None else '"' + duration + '"'
      )
  
      self.options = parse_options(
          position="bottomleft",
          min_speed=min_speed,
          max_speed=max_speed,
          auto_play=auto_play,
          loop_button=loop_button,
          time_slider_drag_update=time_slider_drag_update,
          speed_slider=speed_slider,
          player_options={
              "transitionTime": int(transition_time),
              "loop": loop,
              "startOver": True,
          },
      )
  
file_path: folium/folium/plugins/timestamped_geo_json.py
imports: import json
  from branca.element import MacroElement
  from jinja2 import Template
  from folium.elements import JSCSSMixin
  from folium.folium import Map
  from folium.utilities import get_bounds, parse_options
label_desc: Use image node_id 1 to create a new TimestampedGeoJson object from inherited base classes: JSCSSMixin, MacroElement with example: obj = TimestampedGeoJson(data, transition_time, loop, auto_play, add_last_point, period, min_speed, max_speed, loop_button, date_options, time_slider_drag_update, duration, speed_slider)