From f5aa0cf7c34ef15304a9327653758c3dc2322ff4 Mon Sep 17 00:00:00 2001 From: Frank <33519926+Conengmo@users.noreply.github.com> Date: Wed, 3 Apr 2024 12:47:06 +0200 Subject: [PATCH] Remove one more deprecated example notebook --- docs/user_guide/plugins/heatmap_with_time.md | 2 +- examples/HeatMapWithTime.ipynb | 538 +------------------ 2 files changed, 6 insertions(+), 534 deletions(-) diff --git a/docs/user_guide/plugins/heatmap_with_time.md b/docs/user_guide/plugins/heatmap_with_time.md index 13fe51954..956759a51 100644 --- a/docs/user_guide/plugins/heatmap_with_time.md +++ b/docs/user_guide/plugins/heatmap_with_time.md @@ -6,7 +6,7 @@ import folium import folium.plugins ``` -# HeatMapWithTime Plugin +# HeatMapWithTime In this example we show the basic usage of the HeatMapWithTime plugin. diff --git a/examples/HeatMapWithTime.ipynb b/examples/HeatMapWithTime.ipynb index 743385ec9..f3e727004 100644 --- a/examples/HeatMapWithTime.ipynb +++ b/examples/HeatMapWithTime.ipynb @@ -2,541 +2,13 @@ "cells": [ { "cell_type": "markdown", - "metadata": {}, "source": [ - "# HeatMapWithTime Plugin" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "In this example we show the most basic usage of the HeatMapWithTime plugin.\n", - "\n", - "We generate a random set of points with lat/lon coordinates to draw on the map, and then move these points slowly in a random direction to simulate a time dimension. The points are arranged into a list of sets of data to draw." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "import folium\n", - "import folium.plugins as plugins\n", - "import numpy as np\n", - "\n", - "np.random.seed(3141592)\n", - "initial_data = np.random.normal(size=(100, 2)) * np.array([[1, 1]]) + np.array(\n", - " [[48, 5]]\n", - ")\n", - "\n", - "move_data = np.random.normal(size=(100, 2)) * 0.01\n", - "\n", - "data = [(initial_data + move_data * i).tolist() for i in range(100)]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Weights\n", - "\n", - "In order to control intensity shown on the map, each data entry needs to have a `weight`. Which should be between 0 and 1. \n", - "Below we generate weights randomly such that intensity increases over time. " - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "time_ = 0\n", - "N = len(data)\n", - "itensify_factor = 30\n", - "for time_entry in data:\n", - " time_ = time_+1\n", - " for row in time_entry:\n", - " weight = min(np.random.uniform()*(time_/(N))*itensify_factor, 1)\n", - " row.append(weight)" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "