This file is larger than 256 KB, so syntax highlighting was skipped.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "antique-shooting",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"import xarray as xr\n",
"import geopandas as gpd\n",
"import json\n",
"\n",
"from sklearn.metrics import r2_score\n",
"from demand_mapping import *\n",
"from geo_util import *\n",
"\n",
"%matplotlib notebook\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib\n",
"\n",
"import os\n",
"import time"
]
},
{
"cell_type": "markdown",
"id": "unable-original",
"metadata": {},
"source": [
"# Load data"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "headed-republican",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/walch/miniconda3/envs/py3_geo/lib/python3.6/site-packages/IPython/core/interactiveshell.py:3072: DtypeWarning: Columns (6) have mixed types.Specify dtype option on import or set low_memory=False.\n",
"/home/walch/miniconda3/envs/py3_geo/lib/python3.6/site-packages/IPython/core/interactiveshell.py:3072: DtypeWarning: Columns (6) have mixed types.Specify dtype option on import or set low_memory=False.\n",
" * chy (chy) float64 1.076e+06 1.076e+06 1.078e+06 ... 1.294e+06 1.294e+06</pre><div class='xr-wrap' hidden><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'frequency'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>chx</span>: 347</li><li><span class='xr-has-index'>chy</span>: 220</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-42dada03-2360-45d0-bdd2-ff80714989dc' class='xr-array-in' type='checkbox' checked><label for='section-42dada03-2360-45d0-bdd2-ff80714989dc' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>nan nan nan nan nan nan nan nan ... nan nan nan nan nan nan nan nan</span></div><div class='xr-array-data'><pre>array([[nan, nan, nan, ..., nan, nan, nan],\n",
"/home/walch/miniconda3/envs/py3_geo/lib/python3.6/site-packages/xarray/plot/plot.py:970: MatplotlibDeprecationWarning: Passing parameters norm and vmin/vmax simultaneously is deprecated since 3.3 and will become an error two minor releases later. Please pass vmin/vmax directly to the norm when creating it.\n",