class_docstr: Put realtime data on a Leaflet map: live tracking GPS units,
  sensor data or just about anything.
  
  Based on: https://github.com/perliedman/leaflet-realtime
  
  Parameters
  ----------
  source: str, dict, JsCode
      The source can be one of:
  
      * a string with the URL to get data from
      * a dict that is passed to javascript's `fetch` function
        for fetching the data
      * a `folium.JsCode` object in case you need more freedom.
  start: bool, default True
      Should automatic updates be enabled when layer is added
      on the map and stopped when layer is removed from the map
  interval: int, default 60000
      Automatic update interval, in milliseconds
  get_feature_id: JsCode, optional
      A JS function with a geojson `feature` as parameter
      default returns `feature.properties.id`
      Function to get an identifier to uniquely identify a feature over time
  update_feature: JsCode, optional
      A JS function with a geojson `feature` as parameter
      Used to update an existing feature's layer;
      by default, points (markers) are updated, other layers are discarded
      and replaced with a new, updated layer.
      Allows to create more complex transitions,
      for example, when a feature is updated
  remove_missing: bool, default False
      Should missing features between updates been automatically
      removed from the layer
  
  
  Other keyword arguments are passed to the GeoJson layer, so you can pass
  `style`, `point_to_layer` and/or `on_each_feature`.
  
  Examples
  --------
  >>> from folium import JsCode
  >>> m = folium.Map(location=[40.73, -73.94], zoom_start=12)
  >>> rt = Realtime(
  ...     "https://raw.githubusercontent.com/python-visualization/folium-example-data/main/subway_stations.geojson",
  ...     get_feature_id=JsCode("(f) => { return f.properties.objectid; }"),
  ...     point_to_layer=JsCode(
  ...         "(f, latlng) => { return L.circleMarker(latlng, {radius: 8, fillOpacity: 0.2})}"
  ...     ),
  ...     interval=10000,
  ... )
  >>> rt.add_to(m)
code: def __init__(
      self,
      source: Union[str, dict, JsCode],
      start: bool = True,
      interval: int = 60000,
      get_feature_id: Optional[JsCode] = None,
      update_feature: Optional[JsCode] = None,
      remove_missing: bool = False,
      **kwargs,
  ):
      super().__init__()
      self._name = "Realtime"
      self.src = source
  
      kwargs["start"] = start
      kwargs["interval"] = interval
      if get_feature_id is not None:
          kwargs["get_feature_id"] = get_feature_id
      if update_feature is not None:
          kwargs["update_feature"] = update_feature
      kwargs["remove_missing"] = remove_missing
  
      # extract JsCode objects
      self.functions = {}
      for key, value in list(kwargs.items()):
          if isinstance(value, JsCode):
              self.functions[camelize(key)] = value.js_code
              kwargs.pop(key)
  
      self.options = parse_options(**kwargs)
  
file_path: folium/folium/plugins/realtime.py
imports: from typing import Optional, Union
  from branca.element import MacroElement
  from jinja2 import Template
  from folium.elements import JSCSSMixin
  from folium.utilities import JsCode, camelize, parse_options
label_desc: Use image node_id 1 to create a new Realtime object from inherited base classes: JSCSSMixin, MacroElement with example: obj = Realtime(source, start, interval, get_feature_id, update_feature, remove_missing)