{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Network analysis" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import movekit as mkit\n", "import numpy as np\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "from scipy.spatial import Voronoi, voronoi_plot_2d, convex_hull_plot_2d, delaunay_plot_2d\n", "import networkx as nx\n", "import collections" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Extracting all absolute features: 100%|██████████| 100.0/100 [00:01<00:00, 61.85it/s]\n" ] }, { "data": { "text/html": [ "
\n", " | time | \n", "animal_id | \n", "x | \n", "y | \n", "distance | \n", "direction | \n", "turning | \n", "average_speed | \n", "average_acceleration | \n", "stopped | \n", "
---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "1 | \n", "312 | \n", "405.29 | \n", "417.76 | \n", "0.0 | \n", "(0.0, 0.0) | \n", "0.0 | \n", "0.210217 | \n", "-0.006079 | \n", "1 | \n", "
1 | \n", "1 | \n", "511 | \n", "369.99 | \n", "428.78 | \n", "0.0 | \n", "(0.0, 0.0) | \n", "0.0 | \n", "0.020944 | \n", "0.000041 | \n", "1 | \n", "
2 | \n", "1 | \n", "607 | \n", "390.33 | \n", "405.89 | \n", "0.0 | \n", "(0.0, 0.0) | \n", "0.0 | \n", "0.070235 | \n", "0.000344 | \n", "1 | \n", "
3 | \n", "1 | \n", "811 | \n", "445.15 | \n", "411.94 | \n", "0.0 | \n", "(0.0, 0.0) | \n", "0.0 | \n", "0.370500 | \n", "0.007092 | \n", "1 | \n", "
4 | \n", "1 | \n", "905 | \n", "366.06 | \n", "451.76 | \n", "0.0 | \n", "(0.0, 0.0) | \n", "0.0 | \n", "0.118000 | \n", "-0.003975 | \n", "1 | \n", "