{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import pickle, pandas as pd, pmdarima as pmd, geopandas as gpd,numpy as np\n", "from random import choice\n", "import crf_utilities_again as crf_util\n", "import xarray as xr, geopandas as gpd, rioxarray, os\n", "from shapely.geometry import box, mapping\n", "import geopandas as gpd\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "regions_all = gpd.read_file(\n", " '/home/gchossie/2020_aq/monitor_based/data/all_regions.geojson')" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "results_geo = regions_all.copy()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "results_geo" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "for col in ['NO2 mean', 'NO2 2.5', 'NO2 97.5',\n", " 'PM2.5 mean', 'PM2.5 2.5', 'PM2.5 97.5',\n", " 'O3 mean', 'O3 2.5', 'O3 97.5']:\n", " results_geo.loc[:,col] = 0" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "results_geo.reset_index(drop=True,inplace=True)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Ensemble | \n", "Country | \n", "Region | \n", "Population | \n", "geometry | \n", "NO2 mean | \n", "NO2 2.5 | \n", "NO2 97.5 | \n", "PM2.5 mean | \n", "PM2.5 2.5 | \n", "PM2.5 97.5 | \n", "O3 mean | \n", "O3 2.5 | \n", "O3 97.5 | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "Japan | \n", "Japan | \n", "Aichi | \n", "7220143.5 | \n", "MULTIPOLYGON (((137.09523 34.65330, 137.09546 ... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "
1 | \n", "Japan | \n", "Japan | \n", "Osaka | \n", "8177242.0 | \n", "MULTIPOLYGON (((135.31573 34.43310, 135.31544 ... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "
2 | \n", "Japan | \n", "Japan | \n", "Shizuoka | \n", "3460957.0 | \n", "MULTIPOLYGON (((141.46085 24.24579, 141.46115 ... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "