Skip to content

Commit

Permalink
Updated country codes csv file and readme for new world borders map
Browse files Browse the repository at this point in the history
  • Loading branch information
doc78 committed Nov 15, 2024
1 parent 411abad commit 2d30765
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lisfloodutilities/water-demand-historic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ The utility consists of five scripts which require several following datasets an
1. [USGS NWIS](https://waterdata.usgs.gov/nv/nwis/wu) water withdrawal estimates for 1985--present. For each state in the "Geographic Area" drop-down menu, select "State Data", "ALL Years", "State Total", and "ALL Categories" and click "Submit". Then select "Tab-separated data" and click "Submit". Do this for each state and put files in `usgs_water_use_folder`.
1. USGS water withdrawal data files for [1985](https://water.usgs.gov/watuse/data/1985/index.html) and [1990](https://water.usgs.gov/watuse/data/1990/index.html) (to supplement the NWIS data). Download "Data file of state-level data" for each year (`us85st.txt` and `us90st.txt`) and put the files in `usgs_water_use_folder`.
1. [Vassolo and Döll (2005)](https://doi.org/10.1029/2004WR003360) industrial and thermoelectric water withdrawal maps (included in this repository with permission from Petra Döll). The industrial withdrawal shape file is rasterized using `gdal_rasterize -l "industry_paper_vassolo&doell" -a MANUF_WWD -tr 0.5 0.5 -a_nodata 0.0 -te -180.0 -90.0 180.0 90.0 -ot Float32 -of GTiff "industry_paper_vassolo&doell.shp" manuf_wwd.tif`. Thermoelectric shape file rasterized using same command but with `WWD_PS` and `wwd_ps.tif`. Put the files in `vassolo_doll_folder`.
1. [GISCO](https://ec.europa.eu/eurostat/web/gisco/geodata/administrative-units/countries) country borders shape file. Select year 2024, File format SHP, Geometry type Polygons (RG), Scale 01M, Coordinate system EPGS 4326, click Download. Rasterize to 0.01° using `gdal_rasterize -l CNTR_RG_01M_2024_4326 -a UN -tr 0.01 0.01 -a_nodata 0.0 -te -180.0 -90.0 180.0 90.0 -ot Float32 -of GTiff CNTR_RG_01M_2024_4326.shp CNTR_RG_01M_2024_4326_rasterized.tif`. Put the result in `world_borders_folder`.
1. [GISCO](https://ec.europa.eu/eurostat/web/gisco/geodata/administrative-units/countries) country borders shape file. Select year 2024, File format SHP, Geometry type Polygons (RG), Scale 01M, Coordinate system EPGS 4326, click Download. Open QGIS, then open the shape file and the csv file "un_country_codes.csv" in ancillary_data folder. Open Preprocessing->Toolbox and search for "Join Attributes by Field Value". Select the shape file as Input Layer with Table field "ISO3_CODE" and the csv file as Input layer 2 with Table field "alpha-3". Select "country-code" into "Layer 2 fields to copy" and run the preprocessing. Save the reulting layer as "CNTR_RG_01M_2024_4326".
Rasterize to 0.01° using `gdal_rasterize -l CNTR_RG_01M_2024_4326 -a country-co -tr 0.01 0.01 -a_nodata 0.0 -te -180.0 -90.0 180.0 90.0 -ot Float32 -of GTiff CNTR_RG_01M_2024_4326.shp CNTR_RG_01M_2024_4326_rasterized.tif`. Put the result in `world_borders_folder`.

1. [World Bank](https://data.worldbank.org/) manufacturing value added and gross domestic product data. Search for "Manufacturing, value added (constant 2015 US$)" and "GDP (constant 2015 US$)", download as CSV, and put in `world_bank_folder` (Remove Metadata csv files, if any).
<!---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,22 @@ Western Sahara,EH,ESH,732,ISO 3166-2:EH,Africa,Northern Africa,"",002,015,""
Yemen,YE,YEM,887,ISO 3166-2:YE,Asia,Western Asia,"",142,145,""
Zambia,ZM,ZMB,894,ISO 3166-2:ZM,Africa,Sub-Saharan Africa,Eastern Africa,002,202,014
Zimbabwe,ZW,ZWE,716,ISO 3166-2:ZW,Africa,Sub-Saharan Africa,Eastern Africa,002,202,014
Ile Clipperton,CP,CPT,1001,,,,,,,
Abyei Region (Disputed Territory),XU,XU,1002,,,,,,,
Aksai Chin (Disputed Territory),XC,XC,1003,,,,,,,
Arunashal Pradesh (Disputed Territory),XD,XD,1004,,,,,,,
Bir Tawil (Disputed Territory),XV,XV,1005,,,,,,,
Chagos Islands (disputed territory),XXS,XXS,1006,,,,,,,
China/India (Disputed Territory),XE,XE,1007,,,,,,,
Equatorial Guinea/Gabon (disputed territory),XXR,XXR,1008,,,,,,,
"Fr Territory (Juan de Nova, Glorioso, Europa, Tromelin, Bassas Da India)",XO,XO,1009,,,,,,,
Hala'Ib Triangle (Disputed Territory),XF,XF,1010,,,,,,,
Ilemi Triangle (Disputed Territory),XG,XG,1011,,,,,,,
Jammu Kashmir (Disputed Territory),XH,XH,1012,,,,,,,
Kuril Islands (Disputed Territory),XI,XI,1013,,,,,,,
Navassa Island (Disputed Territory),XL,XL,1014,,,,,,,
Paracel Islands (Disputed Territory),XA,XA,1015,,,,,,,
Scarborough Reef (Disputed Territory),XM,XM,1016,,,,,,,
Senkaku Islands (Disputed Territory),XN,XN,1017,,,,,,,
Spratly Islands (Disputed Territory),XB,XB,1018,,,,,,,
No mans land,XJL,XJL,1019,,,,,,,
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import pandas as pd
import numpy as np
from netCDF4 import Dataset
import matplotlib.pyplot as plt
#import matplotlib.pyplot as plt
from skimage.transform import resize
from tools import *
import rasterio
Expand Down

0 comments on commit 2d30765

Please sign in to comment.