{ "cells": [ { "cell_type": "code", "execution_count": 17, "id": "07f07200-aec2-4cac-b752-f77c299a68f6", "metadata": {}, "outputs": [], "source": [ "import sqlite3\n", "import numpy as np\n", "import pandas as pd\n", "import random\n", "\n", "from holoviews.element.tiles import EsriImagery\n", "import hvplot.pandas\n", "import holoviews as hv, pandas as pd, colorcet as cc\n", "import panel as pn\n", "from datashader.utils import lnglat_to_meters\n", "\n", "from bokeh.io import output_notebook\n", "from bokeh.plotting import figure, show\n", "from bokeh.models import ColumnDataSource, LogColorMapper\n", "\n", "import folium\n", "from folium.plugins import HeatMap" ] }, { "cell_type": "markdown", "id": "07926913-4035-4b0b-a767-c2840c66a3ad", "metadata": {}, "source": [ "# Data Processing" ] }, { "cell_type": "code", "execution_count": 5, "id": "7e5dd141-0be8-42b7-9407-047e77fa2c99", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | LATITUDE | \n", "LONGITUDE | \n", "FIRE_SIZE | \n", "STATE | \n", "FIRE_YEAR | \n", "
---|---|---|---|---|---|
0 | \n", "40.036944 | \n", "-121.005833 | \n", "0.10 | \n", "CA | \n", "2005 | \n", "
1 | \n", "38.933056 | \n", "-120.404444 | \n", "0.25 | \n", "CA | \n", "2004 | \n", "
2 | \n", "38.984167 | \n", "-120.735556 | \n", "0.10 | \n", "CA | \n", "2004 | \n", "
3 | \n", "38.559167 | \n", "-119.913333 | \n", "0.10 | \n", "CA | \n", "2004 | \n", "
4 | \n", "38.559167 | \n", "-119.933056 | \n", "0.10 | \n", "CA | \n", "2004 | \n", "
\n", " | LatLonRange | \n", "LATITUDE | \n", "LONGITUDE | \n", "count | \n", "
---|---|---|---|---|
0 | \n", "24.5--81.7 | \n", "24.5 | \n", "-81.7 | \n", "1 | \n", "
1 | \n", "24.6--81.3 | \n", "24.6 | \n", "-81.3 | \n", "2 | \n", "
2 | \n", "24.6--81.4 | \n", "24.6 | \n", "-81.4 | \n", "184 | \n", "
3 | \n", "24.6--81.5 | \n", "24.6 | \n", "-81.5 | \n", "43 | \n", "
4 | \n", "24.6--81.6 | \n", "24.6 | \n", "-81.6 | \n", "11 | \n", "
\n", " | LatLonRange | \n", "LATITUDE | \n", "LONGITUDE | \n", "mean | \n", "
---|---|---|---|---|
0 | \n", "24.5--81.7 | \n", "24.5 | \n", "-81.7 | \n", "0.500000 | \n", "
1 | \n", "24.6--81.3 | \n", "24.6 | \n", "-81.3 | \n", "0.100000 | \n", "
2 | \n", "24.6--81.4 | \n", "24.6 | \n", "-81.4 | \n", "0.501630 | \n", "
3 | \n", "24.6--81.5 | \n", "24.6 | \n", "-81.5 | \n", "0.646512 | \n", "
4 | \n", "24.6--81.6 | \n", "24.6 | \n", "-81.6 | \n", "0.954545 | \n", "
\\n\"+\n", " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", " \"
\\n\"+\n", " \"\\n\"+\n",
" \"from bokeh.resources import INLINE\\n\"+\n",
" \"output_notebook(resources=INLINE)\\n\"+\n",
" \"
\\n\"+\n",
" \"\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"
\\n\"+\n \"\\n\"+\n", " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", " \"
\\n\"+\n", " \"\\n\"+\n",
" \"from bokeh.resources import INLINE\\n\"+\n",
" \"output_notebook(resources=INLINE)\\n\"+\n",
" \"
\\n\"+\n",
" \"\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"
\\n\"+\n \"\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"
\\n\"+\n \"