{ "cells": [ { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "# raster to geodataframe #\n", "\n", "import geopandas as gpd\n", "import rasterio as rio\n", "from rasterio.plot import show\n", "from rasterio.features import geometry_mask\n", "from rasterio.mask import mask\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import pandas as pd\n", "import os\n", "import glob\n", "import xarray as xr\n", "import rioxarray as rxr\n", "\n", "# path for output\n", "outputPath = r\"C:/Users/jtrum/Desktop/wb_outputs\"\n", "os.chdir(r'C:/Users/jtrum/world_bank/data/')\n", "aoi = gpd.read_file('aoiLuanda.geojson')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Fathom \n", "**IHME (access to improved water sources)** \n", "**IHME (access to improved sanitation)** \n", "**IHME (reliance on open defecation)** \n", "HDSL (children) \n", "HDSL (elderly) \n", "HDSL (women of reproductive age) \n", "**WSF 2019 (built-up area)** " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### IHME (water)" ] }, { "cell_type": "code", "execution_count": 90, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\jtrum\\AppData\\Local\\Temp\\ipykernel_17780\\2764959518.py:1: DeprecationWarning: open_rasterio is Deprecated in favor of rioxarray. For information about transitioning, see: https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html\n", " improved_water_sources = xr.open_rasterio(r\"C:/Users/jtrum/world_bank/data/IHME_LMIC_WASH_2000_2017_W_IMP_PERCENT_MEAN_2017_Y2020M06D02.tif\")\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "File saved to improved_water_sources_gdf_aoi.geojson\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
latitudelongitudepctgeometry
9977647-9.31250113.18751633.094032POINT (13.18752 -9.31250)
9977646-9.31250113.14584937.536205POINT (13.14585 -9.31250)
9971036-9.27083413.14584936.304882POINT (13.14585 -9.27083)
9971037-9.27083413.18751636.074020POINT (13.18752 -9.27083)
9964425-9.22916813.10418332.597126POINT (13.10418 -9.22917)
...............
9885114-8.72916813.47918399.981781POINT (13.47918 -8.72917)
9885116-8.72916813.56251698.460533POINT (13.56252 -8.72917)
9878503-8.68750113.43751699.396202POINT (13.43752 -8.68750)
9878505-8.68750113.52084996.345879POINT (13.52085 -8.68750)
9878504-8.68750113.47918399.813766POINT (13.47918 -8.68750)
\n", "

116 rows × 4 columns

\n", "
" ], "text/plain": [ " latitude longitude pct geometry\n", "9977647 -9.312501 13.187516 33.094032 POINT (13.18752 -9.31250)\n", "9977646 -9.312501 13.145849 37.536205 POINT (13.14585 -9.31250)\n", "9971036 -9.270834 13.145849 36.304882 POINT (13.14585 -9.27083)\n", "9971037 -9.270834 13.187516 36.074020 POINT (13.18752 -9.27083)\n", "9964425 -9.229168 13.104183 32.597126 POINT (13.10418 -9.22917)\n", "... ... ... ... ...\n", "9885114 -8.729168 13.479183 99.981781 POINT (13.47918 -8.72917)\n", "9885116 -8.729168 13.562516 98.460533 POINT (13.56252 -8.72917)\n", "9878503 -8.687501 13.437516 99.396202 POINT (13.43752 -8.68750)\n", "9878505 -8.687501 13.520849 96.345879 POINT (13.52085 -8.68750)\n", "9878504 -8.687501 13.479183 99.813766 POINT (13.47918 -8.68750)\n", "\n", "[116 rows x 4 columns]" ] }, "execution_count": 90, "metadata": {}, "output_type": "execute_result" } ], "source": [ "improved_water_sources = xr.open_rasterio(r\"C:/Users/jtrum/world_bank/data/IHME_LMIC_WASH_2000_2017_W_IMP_PERCENT_MEAN_2017_Y2020M06D02.tif\")\n", "improved_water_sources = improved_water_sources.squeeze().drop(labels=\"band\")\n", "improved_water_sources = improved_water_sources.rename({\"x\":\"longitude\", \"y\":\"latitude\"})\n", "#convert to geodataframe\n", "improved_water_sources = improved_water_sources.to_dataframe(name=\"pct\")\n", "#turn latitude and longitude into columns\n", "improved_water_sources.reset_index(inplace=True)\n", "improved_water_sources_gdf = gpd.GeoDataFrame(improved_water_sources, geometry=gpd.points_from_xy(improved_water_sources.longitude, improved_water_sources.latitude))\n", "improved_water_sources_gdf.set_crs(epsg=4326, inplace=True)\n", "improved_water_sources_gdf_aoi = gpd.clip(improved_water_sources_gdf, aoi)\n", "improved_water_sources_gdf_aoi.to_file(os.path.join(outputPath, \"improved_water_sources_gdf_aoi.geojson\"))\n", "print(\"File saved to improved_water_sources_gdf_aoi.geojson\")\n", "improved_water_sources_gdf_aoi" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "improved_water_sources = xr.open_rasterio(r\"C:/Users/jtrum/world_bank/data/IHME_LMIC_WASH_2000_2017_W_IMP_PERCENT_MEAN_2017_Y2020M06D02.tif\")\n", "improved_water_sources = improved_water_sources.squeeze().drop(labels=\"band\")\n", "improved_water_sources = improved_water_sources.rename({\"x\":\"longitude\", \"y\":\"latitude\"})\n", "#convert to geodataframe\n", "improved_water_sources = improved_water_sources.to_dataframe(name=\"pct\")\n", "#turn latitude and longitude into columns\n", "improved_water_sources.reset_index(inplace=True)\n", "improved_water_sources_gdf = gpd.GeoDataFrame(improved_water_sources, geometry=gpd.points_from_xy(improved_water_sources.longitude, improved_water_sources.latitude))\n", "improved_water_sources_gdf.set_crs(epsg=4326, inplace=True)\n", "improved_water_sources_gdf_aoi = gpd.clip(improved_water_sources_gdf, aoi)\n", "improved_water_sources_gdf_aoi.to_file(os.path.join(outputPath, \"improved_water_sources_gdf_aoi.geojson\"))\n", "print(\"File saved to improved_water_sources_gdf_aoi.geojson\")\n", "improved_water_sources_gdf_aoi" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### IHME (sanitation)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\jtrum\\AppData\\Local\\Temp\\ipykernel_5004\\2086645591.py:1: DeprecationWarning: open_rasterio is Deprecated in favor of rioxarray. For information about transitioning, see: https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html\n", " improved_sanitation_sources = xr.open_rasterio(r\"C:/Users/jtrum/world_bank/data/IHME_LMIC_WASH_2000_2017_S_IMP_PERCENT_MEAN_2017_Y2020M06D02.tif\")\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "File saved to improved_sanitation_sources_gdf_aoi.geojson\n" ] } ], "source": [ "improved_sanitation_sources = xr.open_rasterio(r\"C:/Users/jtrum/world_bank/data/IHME_LMIC_WASH_2000_2017_S_IMP_PERCENT_MEAN_2017_Y2020M06D02.tif\")\n", "improved_sanitation_sources = improved_sanitation_sources.squeeze().drop(labels=\"band\")\n", "improved_sanitation_sources = improved_sanitation_sources.rename({\"x\":\"longitude\", \"y\":\"latitude\"})\n", "#convert to geodataframe\n", "improved_sanitation_sources = improved_sanitation_sources.to_dataframe(name=\"pct\")\n", "#turn latitude and longitude into columns\n", "improved_sanitation_sources.reset_index(inplace=True)\n", "improved_sanitation_sources_gdf = gpd.GeoDataFrame(improved_sanitation_sources, geometry=gpd.points_from_xy(improved_sanitation_sources.longitude, improved_sanitation_sources.latitude))\n", "improved_sanitation_sources_gdf.set_crs(epsg=4326, inplace=True)\n", "improved_sanitation_sources_gdf_aoi = gpd.clip(improved_sanitation_sources_gdf, aoi)\n", "improved_sanitation_sources_gdf_aoi.to_file(os.path.join(outputPath, \"improved_sanitation_sources_gdf_aoi.geojson\"))\n", "print(\"File saved to improved_sanitation_sources_gdf_aoi.geojson\")\n", "improved_sanitation_sources_gdf_aoi = improved_sanitation_sources_gdf_aoi[['pct', 'geometry']]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### IHME (open defacation)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\jtrum\\AppData\\Local\\Temp\\ipykernel_5004\\4003020799.py:1: DeprecationWarning: open_rasterio is Deprecated in favor of rioxarray. For information about transitioning, see: https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html\n", " open_def_sources = xr.open_rasterio(r\"C:/Users/jtrum/world_bank/data/IHME_LMIC_WASH_2000_2017_S_OD_PERCENT_MEAN_2017_Y2020M06D02.tif\")\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "File saved to open_def_sources_gdf_aoi.geojson\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
pctgeometry
997764728.999447POINT (13.18752 -9.31250)
997764621.648537POINT (13.14585 -9.31250)
997103626.851372POINT (13.14585 -9.27083)
997103727.775961POINT (13.18752 -9.27083)
996442526.202843POINT (13.10418 -9.22917)
.........
988511424.031370POINT (13.47918 -8.72917)
988511621.044580POINT (13.56252 -8.72917)
987850326.772446POINT (13.43752 -8.68750)
987850519.226595POINT (13.52085 -8.68750)
987850418.228943POINT (13.47918 -8.68750)
\n", "

116 rows × 2 columns

\n", "
" ], "text/plain": [ " pct geometry\n", "9977647 28.999447 POINT (13.18752 -9.31250)\n", "9977646 21.648537 POINT (13.14585 -9.31250)\n", "9971036 26.851372 POINT (13.14585 -9.27083)\n", "9971037 27.775961 POINT (13.18752 -9.27083)\n", "9964425 26.202843 POINT (13.10418 -9.22917)\n", "... ... ...\n", "9885114 24.031370 POINT (13.47918 -8.72917)\n", "9885116 21.044580 POINT (13.56252 -8.72917)\n", "9878503 26.772446 POINT (13.43752 -8.68750)\n", "9878505 19.226595 POINT (13.52085 -8.68750)\n", "9878504 18.228943 POINT (13.47918 -8.68750)\n", "\n", "[116 rows x 2 columns]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "open_def_sources = xr.open_rasterio(r\"C:/Users/jtrum/world_bank/data/IHME_LMIC_WASH_2000_2017_S_OD_PERCENT_MEAN_2017_Y2020M06D02.tif\")\n", "open_def_sources = open_def_sources.squeeze().drop(labels=\"band\")\n", "open_def_sources = open_def_sources.rename({\"x\":\"longitude\", \"y\":\"latitude\"})\n", "#convert to geodataframe\n", "open_def_sources = open_def_sources.to_dataframe(name=\"pct\")\n", "#turn latitude and longitude into columns\n", "open_def_sources.reset_index(inplace=True)\n", "open_def_sources_gdf = gpd.GeoDataFrame(open_def_sources, geometry=gpd.points_from_xy(open_def_sources.longitude, open_def_sources.latitude))\n", "open_def_sources_gdf.set_crs(epsg=4326, inplace=True)\n", "open_def_sources_gdf_aoi = gpd.clip(open_def_sources_gdf, aoi)\n", "open_def_sources_gdf_aoi.to_file(os.path.join(outputPath, \"open_def_sources_gdf_aoi.geojson\"))\n", "print(\"File saved to open_def_sources_gdf_aoi.geojson\")\n", "open_def_sources_gdf_aoi = open_def_sources_gdf_aoi[['pct', 'geometry']]\n", "open_def_sources_gdf_aoi" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Children under 5" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "raster = rxr.open_rasterio(r\"C:/Users/jtrum/world_bank/data/ago_children_under_five_2020.tif\")\n", "clip_bound = aoi.geometry\n", "clip_raster = raster.rio.clip(clip_bound, from_disk=True)\n", "children_under_five = clip_raster.squeeze().drop(labels=\"band\")\n", "children_under_five = children_under_five.rename({\"x\":\"longitude\", \"y\":\"latitude\"})\n", "children_under_five = children_under_five.to_dataframe(name=\"pct\")\n", "children_under_five = children_under_five.reset_index()\n", "children_under_five_gdf = gpd.GeoDataFrame(children_under_five, geometry=gpd.points_from_xy(children_under_five.longitude, children_under_five.latitude))\n", "children_under_five_gdf.set_crs(epsg=4326, inplace=True)\n", "children_under_five_gdf_aoi = gpd.clip(children_under_five_gdf, aoi)\n", "children_under_five_gdf_aoi.dropna(inplace=True)\n", "children_under_five_gdf_aoi[['pct', 'geometry']]\n", "children_under_five_gdf_aoi.to_file(os.path.join(outputPath, \"children_under_five_gdf_aoi.geojson\"))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Elderly" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\jtrum\\AppData\\Local\\Temp\\ipykernel_5004\\150416882.py:11: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " children_under_five_gdf_aoi.dropna(inplace=True)\n" ] } ], "source": [ "raster = rxr.open_rasterio(r\"C:/Users/jtrum/world_bank/data/ago_elderly_60_plus_2020.tif\")\n", "clip_bound = aoi.geometry\n", "clip_raster = raster.rio.clip(clip_bound, from_disk=True)\n", "children_under_five = clip_raster.squeeze().drop(labels=\"band\")\n", "children_under_five = children_under_five.rename({\"x\":\"longitude\", \"y\":\"latitude\"})\n", "children_under_five = children_under_five.to_dataframe(name=\"pct\")\n", "children_under_five = children_under_five.reset_index()\n", "children_under_five_gdf = gpd.GeoDataFrame(children_under_five, geometry=gpd.points_from_xy(children_under_five.longitude, children_under_five.latitude))\n", "children_under_five_gdf.set_crs(epsg=4326, inplace=True)\n", "children_under_five_gdf_aoi = gpd.clip(children_under_five_gdf, aoi)\n", "children_under_five_gdf_aoi.dropna(inplace=True)\n", "children_under_five_gdf_aoi[['pct', 'geometry']]\n", "children_under_five_gdf_aoi.to_file(os.path.join(outputPath, \"elderly_over_60_gdf_aoi.geojson\"))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Women" ] }, { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\jtrum\\AppData\\Local\\Temp\\ipykernel_5004\\2577157081.py:11: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " children_under_five_gdf_aoi.dropna(inplace=True)\n" ] } ], "source": [ "raster = rxr.open_rasterio(r\"C:/Users/jtrum/world_bank/data/ago_women_of_reproductive_age_15_49_2020.tif\")\n", "clip_bound = aoi.geometry\n", "clip_raster = raster.rio.clip(clip_bound, from_disk=True)\n", "children_under_five = clip_raster.squeeze().drop(labels=\"band\")\n", "children_under_five = children_under_five.rename({\"x\":\"longitude\", \"y\":\"latitude\"})\n", "children_under_five = children_under_five.to_dataframe(name=\"pct\")\n", "children_under_five = children_under_five.reset_index()\n", "children_under_five_gdf = gpd.GeoDataFrame(children_under_five, geometry=gpd.points_from_xy(children_under_five.longitude, children_under_five.latitude))\n", "children_under_five_gdf.set_crs(epsg=4326, inplace=True)\n", "children_under_five_gdf_aoi = gpd.clip(children_under_five_gdf, aoi)\n", "children_under_five_gdf_aoi.dropna(inplace=True)\n", "children_under_five_gdf_aoi[['pct', 'geometry']]\n", "children_under_five_gdf_aoi.to_file(os.path.join(outputPath, \"women_reproductive_age_gdf_aoi.geojson\"))" ] }, { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 38, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkIAAAGdCAYAAAD+JxxnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/OQEPoAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA/jUlEQVR4nO3dfXBU5d3/8c8mJBtCSQBpnm4CxIeCyJOEksaqBQ1ZaMaSSqmCVaQIlTtpDblvpPiDEIgzWCwoampqlQdHqciMxRYYyBIEtCxQAimCwqBFaUc2WBUiQZIlOb8/Ojk3S0KSxWxi9nq/ZjLhnPPd61zfPWc3H3bPJg7LsiwBAAAYKKyjJwAAANBRCEIAAMBYBCEAAGAsghAAADAWQQgAABiLIAQAAIxFEAIAAMYiCAEAAGN16egJfJPV19frk08+Uffu3eVwODp6OgAAoBUsy9KXX36ppKQkhYU1/5oPQagZn3zyiZKTkzt6GgAA4Cr885//VJ8+fZqtIQg1o3v37pL+c0fGxMS0yz59Pp9KS0uVmZmpiIiIdtlnR6HX0GVSv/QaukzqN9R6raqqUnJysv1zvDkEoWY0vB0WExPTrkEoOjpaMTExIXEyNodeQ5dJ/dJr6DKp31DttTWXtXCxNAAAMBZBCAAAGIsgBAAAjEUQAgAAxiIIAQAAYxGEAACAsQhCAADAWAQhAABgLIIQAAAwFkEIAAAYiyAEAACMRRACAADGIggBAABjEYQAAICxunT0BIBg6//rTR09BTnDLS0dJQ0u3KqaOkeL9R89kdUOswIA8IoQAAAwFkEIAAAYiyAEAACMRRACAADGIggBAABjEYQAAICxCEIAAMBYBCEAAGCsgILQkiVL9N3vflfdu3dXXFycsrOzdezYMb+aCxcuKCcnR9dcc42+9a1vaeLEiaqsrPSrOXnypLKyshQdHa24uDjNmTNHFy9e9KvZsWOHRowYIafTqeuvv16rV69uNJ/i4mL1799fUVFRSktL0759+wKeCwAAMFdAQWjnzp3KycnRnj175Ha75fP5lJmZqerqartm9uzZ+stf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aSkWF999ZU9xh133GE9++yz9vJrr71mOZ1Oa/Xq1dZ7771nzZw50+rRo4fl9Xrbvb9LNddrbW2t9aMf/cjq06ePVVFR4fcYrqmpsce4vNeWHgsdqbl+v/zyS+t///d/LY/HY504ccLatm2bNWLECOuGG26wLly4YI8RCse2wdmzZ63o6Gjr+eefb3KMznJsW/Oz5uGHH7b69u1rbd++3dq/f7+Vnp5upaen+40zYMAA64033rCXW/NY74wIQu1IUpNfq1atsmt+8IMfWFOnTrWX8/LyrL59+1qRkZFWfHy89cMf/tA6cOBA+08+QPfcc4+VmJhoRUZGWv/1X/9l3XPPPdYHH3xgb7+8T8uyrNdff936zne+Y0VGRlo33XSTtWnTpnae9dXbunWrJck6duxYo22d/Zi+9dZbTZ63DT3V19dbCxYssOLj4y2n02ndeeedje6Hfv36WQsXLvRb9+yzz9r3w6hRo6w9e/a0U0dX1lyvJ06cuOJj+K233rLHuLzXlh4LHam5fs+fP29lZmZa3/72t62IiAirX79+1owZMxoFmlA4tg1+//vfW127drXOnDnT5Bid5di25mfNV199Zf33f/+31bNnTys6Otr68Y9/bJ06darROJfepjWP9c7IYVmWFZzXmgAAAL7ZuEYIAAAYiyAEAACMRRACAADGIggBAABjEYQAAICxCEIAAMBYBCEAAGAsghAAADAWQQgAABiLIAQAAIxFEAIAAMYiCAEAAGP9f5Mlr+hN9ibqAAAAAElFTkSuQmCC", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "children_under_five_gdf_aoi['pct'].hist()" ] }, { "cell_type": "code", "execution_count": 39, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "351877" ] }, "execution_count": 39, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(children_under_five_gdf_aoi)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### WSF 2019" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [], "source": [ "#open wsf2019 raster\n", "built_up_area = xr.open_rasterio(r\"C:/Users/jtrum/world_bank/data/wsf2019.tif\")\n", "built_up_area = built_up_area.squeeze().drop(labels=\"band\")\n", "built_up_area = built_up_area.rename({\"x\":\"longitude\", \"y\":\"latitude\"})\n", "built_up_area" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "\n", "# Assuming 'built_up_area' is the raster you want to crop\n", "built_up_area_data = built_up_area.read(1) # Read the raster data\n", "\n", "# Apply the mask to the raster data\n", "cropped_raster_data = np.ma.masked_array(built_up_area_data, mask)\n", "\n", "# Create a new rasterio dataset with the cropped data\n", "cropped_raster = rio.open(\n", " \"C:/Users/jtrum/Desktop/wb_outputs/cropped_wsf2019.tif\",\n", " \"w\",\n", " driver=\"GTiff\",\n", " height=cropped_raster_data.shape[0],\n", " width=cropped_raster_data.shape[1],\n", " count=1, # Assuming a single band raster\n", " dtype=str(cropped_raster_data.dtype),\n", " crs=built_up_area.crs,\n", " transform=built_up_area.transform,\n", ")\n", "\n", "# Write the cropped data to the new raster dataset\n", "cropped_raster.write(cropped_raster_data.filled(fill_value=0), 1) # Fill masked values with 0 or another suitable value\n", "cropped_raster.close()\n" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\jtrum\\AppData\\Local\\Temp\\ipykernel_17780\\1584535359.py:1: DeprecationWarning: open_rasterio is Deprecated in favor of rioxarray. For information about transitioning, see: https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html\n", " built_up_area = xr.open_rasterio(r\"C:/Users/jtrum/world_bank/data/wsf2019.tif\")\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
<xarray.DataArray (latitude: 22487, longitude: 22487)>\n",
       "[505665169 values with dtype=uint8]\n",
       "Coordinates:\n",
       "  * latitude   (latitude) float64 -7.99 -7.99 -7.99 ... -10.01 -10.01 -10.01\n",
       "  * longitude  (longitude) float64 11.99 11.99 11.99 11.99 ... 14.01 14.01 14.01\n",
       "Attributes:\n",
       "    transform:      (8.983152841195215e-05, 0.0, 11.989993760200077, 0.0, -8....\n",
       "    crs:            +proj=longlat +datum=WGS84 +no_defs=True\n",
       "    res:            (8.983152841195215e-05, 8.983152841195215e-05)\n",
       "    is_tiled:       0\n",
       "    nodatavals:     (nan,)\n",
       "    scales:         (1.0,)\n",
       "    offsets:        (0.0,)\n",
       "    AREA_OR_POINT:  Area
" ], "text/plain": [ "\n", "[505665169 values with dtype=uint8]\n", "Coordinates:\n", " * latitude (latitude) float64 -7.99 -7.99 -7.99 ... -10.01 -10.01 -10.01\n", " * longitude (longitude) float64 11.99 11.99 11.99 11.99 ... 14.01 14.01 14.01\n", "Attributes:\n", " transform: (8.983152841195215e-05, 0.0, 11.989993760200077, 0.0, -8....\n", " crs: +proj=longlat +datum=WGS84 +no_defs=True\n", " res: (8.983152841195215e-05, 8.983152841195215e-05)\n", " is_tiled: 0\n", " nodatavals: (nan,)\n", " scales: (1.0,)\n", " offsets: (0.0,)\n", " AREA_OR_POINT: Area" ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "built_up_area = xr.open_rasterio(r\"C:/Users/jtrum/world_bank/data/wsf2019.tif\")\n", "built_up_area = built_up_area.squeeze().drop(labels=\"band\")\n", "built_up_area = built_up_area.rename({\"x\":\"longitude\", \"y\":\"latitude\"})\n", "built_up_area" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [], "source": [ "#convert to geodataframe\n", "built_up_area = built_up_area.to_dataframe(name=\"built_up_area\")" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
built_up_area
latitudelongitude
-7.99002013.464713255
13.464803255
13.464893255
13.464983255
13.465072255
.........
-10.00772612.498485255
12.498575255
12.630268255
12.630358255
12.630448255
\n", "

49377713 rows × 1 columns

\n", "
" ], "text/plain": [ " built_up_area\n", "latitude longitude \n", "-7.990020 13.464713 255\n", " 13.464803 255\n", " 13.464893 255\n", " 13.464983 255\n", " 13.465072 255\n", "... ...\n", "-10.007726 12.498485 255\n", " 12.498575 255\n", " 12.630268 255\n", " 12.630358 255\n", " 12.630448 255\n", "\n", "[49377713 rows x 1 columns]" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#drop zero values\n", "built_up_area_255 = built_up_area[built_up_area.built_up_area != 0]\n", "built_up_area_0 = built_up_area[built_up_area.built_up_area == 0]\n", "built_up_area_255" ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
latitudelongitudebuilt_up_area
0-7.99002013.464713255
1-7.99002013.464803255
2-7.99002013.464893255
3-7.99002013.464983255
4-7.99002013.465072255
............
49377708-10.00772612.498485255
49377709-10.00772612.498575255
49377710-10.00772612.630268255
49377711-10.00772612.630358255
49377712-10.00772612.630448255
\n", "

49377713 rows × 3 columns

\n", "
" ], "text/plain": [ " latitude longitude built_up_area\n", "0 -7.990020 13.464713 255\n", "1 -7.990020 13.464803 255\n", "2 -7.990020 13.464893 255\n", "3 -7.990020 13.464983 255\n", "4 -7.990020 13.465072 255\n", "... ... ... ...\n", "49377708 -10.007726 12.498485 255\n", "49377709 -10.007726 12.498575 255\n", "49377710 -10.007726 12.630268 255\n", "49377711 -10.007726 12.630358 255\n", "49377712 -10.007726 12.630448 255\n", "\n", "[49377713 rows x 3 columns]" ] }, "execution_count": 29, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#turn latitude and longitude into columns\n", "built_up_area_255.reset_index(inplace=True)\n", "built_up_area_255" ] }, { "cell_type": "code", "execution_count": 42, "metadata": {}, "outputs": [], "source": [ "built_up_area_255_gdf = gpd.GeoDataFrame(built_up_area_255, geometry=gpd.points_from_xy(built_up_area_255.longitude, built_up_area_255.latitude))" ] }, { "cell_type": "code", "execution_count": 43, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
geometrybuilt
0POINT (13.46471 -7.99002)True
1POINT (13.46480 -7.99002)True
2POINT (13.46489 -7.99002)True
3POINT (13.46498 -7.99002)True
4POINT (13.46507 -7.99002)True
.........
49377708POINT (12.49849 -10.00773)True
49377709POINT (12.49857 -10.00773)True
49377710POINT (12.63027 -10.00773)True
49377711POINT (12.63036 -10.00773)True
49377712POINT (12.63045 -10.00773)True
\n", "

49377713 rows × 2 columns

\n", "
" ], "text/plain": [ " geometry built\n", "0 POINT (13.46471 -7.99002) True\n", "1 POINT (13.46480 -7.99002) True\n", "2 POINT (13.46489 -7.99002) True\n", "3 POINT (13.46498 -7.99002) True\n", "4 POINT (13.46507 -7.99002) True\n", "... ... ...\n", "49377708 POINT (12.49849 -10.00773) True\n", "49377709 POINT (12.49857 -10.00773) True\n", "49377710 POINT (12.63027 -10.00773) True\n", "49377711 POINT (12.63036 -10.00773) True\n", "49377712 POINT (12.63045 -10.00773) True\n", "\n", "[49377713 rows x 2 columns]" ] }, "execution_count": 43, "metadata": {}, "output_type": "execute_result" } ], "source": [ "built_up_area_255_gdf['built'] = \"True\"\n", "built_up_area_255_gdf = built_up_area_255_gdf.drop(columns=['built_up_area', 'latitude', 'longitude'])\n", "built_up_area_255_gdf" ] }, { "cell_type": "code", "execution_count": 44, "metadata": {}, "outputs": [], "source": [ "#set up built_up_are_255_gdf to crs of aoi\n", "built_up_area_255_gdf = built_up_area_255_gdf.set_crs(epsg=4326)" ] }, { "cell_type": "code", "execution_count": 40, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
geometrybuilt
0POINT (-7.99002 13.46471)True
1POINT (-7.99002 13.46480)True
2POINT (-7.99002 13.46489)True
3POINT (-7.99002 13.46498)True
4POINT (-7.99002 13.46507)True
.........
49377708POINT (-10.00773 12.49849)True
49377709POINT (-10.00773 12.49857)True
49377710POINT (-10.00773 12.63027)True
49377711POINT (-10.00773 12.63036)True
49377712POINT (-10.00773 12.63045)True
\n", "

49377713 rows × 2 columns

\n", "
" ], "text/plain": [ " geometry built\n", "0 POINT (-7.99002 13.46471) True\n", "1 POINT (-7.99002 13.46480) True\n", "2 POINT (-7.99002 13.46489) True\n", "3 POINT (-7.99002 13.46498) True\n", "4 POINT (-7.99002 13.46507) True\n", "... ... ...\n", "49377708 POINT (-10.00773 12.49849) True\n", "49377709 POINT (-10.00773 12.49857) True\n", "49377710 POINT (-10.00773 12.63027) True\n", "49377711 POINT (-10.00773 12.63036) True\n", "49377712 POINT (-10.00773 12.63045) True\n", "\n", "[49377713 rows x 2 columns]" ] }, "execution_count": 40, "metadata": {}, "output_type": "execute_result" } ], "source": [ "built_up_area_255_gdf" ] }, { "cell_type": "code", "execution_count": 41, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
NAME_1GID_0COUNTRYGID_1NL_NAME_1GID_2NAME_2VARNAME_2NL_NAME_2TYPE_2ENGTYPE_2CC_2HASC_2geometry
0LuandaAGOAngolaAGO.11_1NAAGO.11.1_1CacuacoNANAMunicípioMunicpality|City Council1108AO.LU.CCMULTIPOLYGON (((13.01919 -9.02194, 13.02049 -9...
\n", "
" ], "text/plain": [ " NAME_1 GID_0 COUNTRY GID_1 NL_NAME_1 GID_2 NAME_2 VARNAME_2 \\\n", "0 Luanda AGO Angola AGO.11_1 NA AGO.11.1_1 Cacuaco NA \n", "\n", " NL_NAME_2 TYPE_2 ENGTYPE_2 CC_2 HASC_2 \\\n", "0 NA Município Municpality|City Council 1108 AO.LU.CC \n", "\n", " geometry \n", "0 MULTIPOLYGON (((13.01919 -9.02194, 13.02049 -9... " ] }, "execution_count": 41, "metadata": {}, "output_type": "execute_result" } ], "source": [ "aoi" ] }, { "cell_type": "code", "execution_count": 45, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "c:\\Users\\jtrum\\miniconda3\\envs\\wash\\lib\\site-packages\\IPython\\core\\interactiveshell.py:3448: FutureWarning: The `op` parameter is deprecated and will be removed in a future release. Please use the `predicate` parameter instead.\n", " if await self.run_code(code, result, async_=asy):\n" ] } ], "source": [ "#only keep points within aoi\n", "built_up_area_255_gdf_aoi = gpd.sjoin(built_up_area_255_gdf, aoi, how=\"inner\", op='intersects')" ] }, { "cell_type": "code", "execution_count": 46, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "5539893\n" ] } ], "source": [ "print(len(built_up_area_255_gdf_aoi))" ] }, { "cell_type": "code", "execution_count": 47, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
geometrybuiltindex_rightNAME_1GID_0COUNTRYGID_1NL_NAME_1GID_2NAME_2VARNAME_2NL_NAME_2TYPE_2ENGTYPE_2CC_2HASC_2
15924125POINT (13.41441 -8.63807)True0LuandaAGOAngolaAGO.11_1NAAGO.11.1_1CacuacoNANAMunicípioMunicpality|City Council1108AO.LU.CC
16025943POINT (13.41522 -8.63968)True0LuandaAGOAngolaAGO.11_1NAAGO.11.1_1CacuacoNANAMunicípioMunicpality|City Council1108AO.LU.CC
16025944POINT (13.41531 -8.63968)True0LuandaAGOAngolaAGO.11_1NAAGO.11.1_1CacuacoNANAMunicípioMunicpality|City Council1108AO.LU.CC
16025945POINT (13.41540 -8.63968)True0LuandaAGOAngolaAGO.11_1NAAGO.11.1_1CacuacoNANAMunicípioMunicpality|City Council1108AO.LU.CC
16031698POINT (13.41522 -8.63977)True0LuandaAGOAngolaAGO.11_1NAAGO.11.1_1CacuacoNANAMunicípioMunicpality|City Council1108AO.LU.CC
...................................................
48886381POINT (13.15426 -9.34297)True0LuandaAGOAngolaAGO.11_1NAAGO.11.1_1CacuacoNANAMunicípioMunicpality|City Council1108AO.LU.CC
48886382POINT (13.15435 -9.34297)True0LuandaAGOAngolaAGO.11_1NAAGO.11.1_1CacuacoNANAMunicípioMunicpality|City Council1108AO.LU.CC
48886383POINT (13.15443 -9.34297)True0LuandaAGOAngolaAGO.11_1NAAGO.11.1_1CacuacoNANAMunicípioMunicpality|City Council1108AO.LU.CC
48886384POINT (13.15452 -9.34297)True0LuandaAGOAngolaAGO.11_1NAAGO.11.1_1CacuacoNANAMunicípioMunicpality|City Council1108AO.LU.CC
48886385POINT (13.15461 -9.34297)True0LuandaAGOAngolaAGO.11_1NAAGO.11.1_1CacuacoNANAMunicípioMunicpality|City Council1108AO.LU.CC
\n", "

5539893 rows × 16 columns

\n", "
" ], "text/plain": [ " geometry built index_right NAME_1 GID_0 COUNTRY \\\n", "15924125 POINT (13.41441 -8.63807) True 0 Luanda AGO Angola \n", "16025943 POINT (13.41522 -8.63968) True 0 Luanda AGO Angola \n", "16025944 POINT (13.41531 -8.63968) True 0 Luanda AGO Angola \n", "16025945 POINT (13.41540 -8.63968) True 0 Luanda AGO Angola \n", "16031698 POINT (13.41522 -8.63977) True 0 Luanda AGO Angola \n", "... ... ... ... ... ... ... \n", "48886381 POINT (13.15426 -9.34297) True 0 Luanda AGO Angola \n", "48886382 POINT (13.15435 -9.34297) True 0 Luanda AGO Angola \n", "48886383 POINT (13.15443 -9.34297) True 0 Luanda AGO Angola \n", "48886384 POINT (13.15452 -9.34297) True 0 Luanda AGO Angola \n", "48886385 POINT (13.15461 -9.34297) True 0 Luanda AGO Angola \n", "\n", " GID_1 NL_NAME_1 GID_2 NAME_2 VARNAME_2 NL_NAME_2 \\\n", "15924125 AGO.11_1 NA AGO.11.1_1 Cacuaco NA NA \n", "16025943 AGO.11_1 NA AGO.11.1_1 Cacuaco NA NA \n", "16025944 AGO.11_1 NA AGO.11.1_1 Cacuaco NA NA \n", "16025945 AGO.11_1 NA AGO.11.1_1 Cacuaco NA NA \n", "16031698 AGO.11_1 NA AGO.11.1_1 Cacuaco NA NA \n", "... ... ... ... ... ... ... \n", "48886381 AGO.11_1 NA AGO.11.1_1 Cacuaco NA NA \n", "48886382 AGO.11_1 NA AGO.11.1_1 Cacuaco NA NA \n", "48886383 AGO.11_1 NA AGO.11.1_1 Cacuaco NA NA \n", "48886384 AGO.11_1 NA AGO.11.1_1 Cacuaco NA NA \n", "48886385 AGO.11_1 NA AGO.11.1_1 Cacuaco NA NA \n", "\n", " TYPE_2 ENGTYPE_2 CC_2 HASC_2 \n", "15924125 Município Municpality|City Council 1108 AO.LU.CC \n", "16025943 Município Municpality|City Council 1108 AO.LU.CC \n", "16025944 Município Municpality|City Council 1108 AO.LU.CC \n", "16025945 Município Municpality|City Council 1108 AO.LU.CC \n", "16031698 Município Municpality|City Council 1108 AO.LU.CC \n", "... ... ... ... ... \n", "48886381 Município Municpality|City Council 1108 AO.LU.CC \n", "48886382 Município Municpality|City Council 1108 AO.LU.CC \n", "48886383 Município Municpality|City Council 1108 AO.LU.CC \n", "48886384 Município Municpality|City Council 1108 AO.LU.CC \n", "48886385 Município Municpality|City Council 1108 AO.LU.CC \n", "\n", "[5539893 rows x 16 columns]" ] }, "execution_count": 47, "metadata": {}, "output_type": "execute_result" } ], "source": [ "built_up_area_255_gdf_aoi" ] }, { "cell_type": "code", "execution_count": 48, "metadata": {}, "outputs": [], "source": [ "#export as geojson to output folder\n", "built_up_area_255_gdf_aoi.to_file(r\"C:/Users/jtrum/Desktop/wb_outputs/built_up_area_255_gdf_aoi.geojson\", driver='GeoJSON')" ] } ], "metadata": { "kernelspec": { "display_name": "wash", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.18" } }, "nbformat": 4, "nbformat_minor": 2 }