MCPcopy Create free account
hub / github.com/python-visualization/folium / __init__

Method __init__

folium/plugins/heat_map_withtime.py:215–282  ·  view source on GitHub ↗
(
        self,
        data,
        index=None,
        name=None,
        radius=15,
        blur=0.8,
        min_opacity=0,
        max_opacity=0.6,
        scale_radius=False,
        gradient=None,
        use_local_extrema=False,
        auto_play=False,
        display_index=True,
        index_steps=1,
        min_speed=0.1,
        max_speed=10,
        speed_step=0.1,
        position="bottomleft",
        overlay=True,
        control=True,
        show=True,
    )

Source from the content-addressed store, hash-verified

213 ]
214
215 def __init__(
216 self,
217 data,
218 index=None,
219 name=None,
220 radius=15,
221 blur=0.8,
222 min_opacity=0,
223 max_opacity=0.6,
224 scale_radius=False,
225 gradient=None,
226 use_local_extrema=False,
227 auto_play=False,
228 display_index=True,
229 index_steps=1,
230 min_speed=0.1,
231 max_speed=10,
232 speed_step=0.1,
233 position="bottomleft",
234 overlay=True,
235 control=True,
236 show=True,
237 ):
238 super().__init__(name=name, overlay=overlay, control=control, show=show)
239 self._name = "HeatMap"
240 self._control_name = self.get_name() + "Control"
241
242 # Input data.
243 self.data = data
244 self.index = (
245 index if index is not None else [str(i) for i in range(1, len(data) + 1)]
246 )
247 if len(self.data) != len(self.index):
248 raise ValueError(
249 "Input data and index are not of compatible lengths."
250 ) # noqa
251 self.times = list(range(1, len(data) + 1))
252
253 # Heatmap settings.
254 self.radius = radius
255 self.blur = blur
256 self.min_opacity = min_opacity
257 self.max_opacity = max_opacity
258 self.scale_radius = "true" if scale_radius else "false"
259 self.use_local_extrema = "true" if use_local_extrema else "false"
260 self.gradient = gradient
261
262 # Time dimension settings.
263 self.auto_play = "true" if auto_play else "false"
264 self.display_index = "true" if display_index else "false"
265 self.min_speed = min_speed
266 self.max_speed = max_speed
267 self.position = position
268 self.speed_step = speed_step
269 self.index_steps = index_steps
270
271 # Hard coded defaults for simplicity.
272 self.backward_button = "true"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected