(
self,
data,
name=None,
min_opacity=0.5,
max_zoom=18,
radius=25,
blur=15,
gradient=None,
overlay=True,
control=True,
show=True,
**kwargs
)
| 64 | ] |
| 65 | |
| 66 | def __init__( |
| 67 | self, |
| 68 | data, |
| 69 | name=None, |
| 70 | min_opacity=0.5, |
| 71 | max_zoom=18, |
| 72 | radius=25, |
| 73 | blur=15, |
| 74 | gradient=None, |
| 75 | overlay=True, |
| 76 | control=True, |
| 77 | show=True, |
| 78 | **kwargs |
| 79 | ): |
| 80 | super().__init__(name=name, overlay=overlay, control=control, show=show) |
| 81 | self._name = "HeatMap" |
| 82 | data = if_pandas_df_convert_to_numpy(data) |
| 83 | self.data = [ |
| 84 | [*validate_location(line[:2]), *line[2:]] for line in data # noqa: E999 |
| 85 | ] |
| 86 | if np.any(np.isnan(self.data)): |
| 87 | raise ValueError("data may not contain NaNs.") |
| 88 | if kwargs.pop("max_val", None): |
| 89 | warnings.warn( |
| 90 | "The `max_val` parameter is no longer necessary. " |
| 91 | "The largest intensity is calculated automatically.", |
| 92 | stacklevel=2, |
| 93 | ) |
| 94 | self.options = remove_empty( |
| 95 | min_opacity=min_opacity, |
| 96 | max_zoom=max_zoom, |
| 97 | radius=radius, |
| 98 | blur=blur, |
| 99 | gradient=gradient, |
| 100 | **kwargs |
| 101 | ) |
| 102 | |
| 103 | def _get_self_bounds(self): |
| 104 | """ |
nothing calls this directly
no test coverage detected