Skip to content

Commit

Permalink
mics updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bpstewar committed Jul 26, 2023
1 parent ad24cf8 commit 796b590
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 315 deletions.
65 changes: 6 additions & 59 deletions Notebooks/Implementations/JUP_SURGP_GLO_B_D__LEI_Evaluation.ipynb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -45,22 +46,6 @@
"from src.LEI import *\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"calculate_LEI?"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -84,6 +69,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -131,6 +117,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -205,6 +192,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -252,6 +240,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -315,6 +304,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -400,49 +390,6 @@
"source": [
"summarize_LEI(in_file)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# DEBUGGING"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"bad_files = []\n",
"\n",
"for root, dirs, files in os.walk('/home/wb411133/data/Projects/LEI/'):\n",
" for f in files:\n",
" if \"90_00.csv\" in f:\n",
" bad_files.append(os.path.join(root, f))\n",
" \n",
"bad_files"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import shutil\n",
"\n",
"for b in bad_files:\n",
" new_file = b.replace(\"_90_00\", \"_90_0014\")\n",
" shutil.move(b, new_file)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
88 changes: 0 additions & 88 deletions Notebooks/Implementations/Mapping_Informality/Untitled.ipynb

This file was deleted.

2 changes: 2 additions & 0 deletions Notebooks/Implementations/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Implementations
The primary role of the GOST team in the World Bank Group is to support operational teams in their exploitation of geospatial data. This happens in many different ways, and the notebooks herein present examples of the specific support the team has provided to various investigations of urbanization.
48 changes: 30 additions & 18 deletions Notebooks/Implementations/URB_DECAT_B_ExploringGHSSMODcode.ipynb
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Exploring DEGURBA\n",
"The Degree of Urbanization methodology developed by the European Commission provides a consistent definition of urban through application of population density and total population theresholds to gridded population data."
]
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[1;31mRunning cells with 'geog' requires the ipykernel package.\n",
"\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
"\u001b[1;31mCommand: 'conda install -n geog ipykernel --update-deps --force-reinstall'"
]
}
],
"source": [
"import sys, os, importlib, shutil\n",
"import requests\n",
"import rasterio, elevation, richdem\n",
"import sys, os, importlib\n",
"import rasterio\n",
"import rasterio.warp\n",
"\n",
"import pandas as pd\n",
Expand All @@ -20,7 +39,7 @@
"from shapely.geometry import MultiPolygon, Polygon\n",
"\n",
"#Import GOST urban functions\n",
"sys.path.append(\"../\")\n",
"sys.path.append(\"../GOST_Urban\")\n",
"import src.UrbanRaster as urban\n",
"import src.urban_helper as helper\n",
"\n",
Expand Down Expand Up @@ -192,6 +211,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -211,15 +231,6 @@
"import matplotlib.colors as colors"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"ax.imshow?"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -254,6 +265,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -402,9 +414,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python (geog)",
"display_name": "geog",
"language": "python",
"name": "geog"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -416,7 +428,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.9.16"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 796b590

Please sign in to comment.