<jupyter_start><jupyter_text>Data layers structure   Data table<jupyter_code>payload = {'q': "SELECT * FROM water_risk_indicators limit 1"}
r = requests.get(sql_endpoint, params=payload)

tableStructure= pd.read_json(json.dumps(r.json()['rows']), orient='records')
tableStructure.head()<jupyter_output><empty_output><jupyter_text>Geometry table  WWF hydrobasins level 6:Used for aqueduct v3.x the id used is PFAF_ID  that correspond to [Pfafstetter Coding System](https://en.wikipedia.org/wiki/Pfafstetter_Coding_System)<jupyter_code>iframe = '<iframe width="100%" height="520" frameborder="0" src="https://resourcewatch.carto.com/u/wri-rw/builder/db3c53be-4787-11e7-9eb1-0ee66e2c9693/embed" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe>'
IPython.display.HTML(iframe)<jupyter_output><empty_output><jupyter_text>GDBD:Currently used for aqueduct v2.x; on the platform they will cover projected data until we recived v3 projected data.<jupyter_code>payload = {'q': "SELECT * FROM wri_subcatchements Limit 1"}
r = requests.get(sql_endpoint, params=payload)

tableStructure= pd.read_json(json.dumps(r.json()['rows']), orient='records')
tableStructure.head(0)<jupyter_output><empty_output><jupyter_text>**Key column for joins:** basinidParameters definition:  * **{{indicator}}:**      [Indicator list](cell2)* **{{scenario}}:**      historic ( bs )      pessimistic ( 38 ) ssp3 rcp85      optimistic ( 24 ) ssp2 rcp45      bau ( 28 ) ssp2 rcp85   * **{{period_type}}:**      month,      year,       quarter         * **{{period_value}}:**      month: 1:12       year: null      quarter: 1:4        * **{{year}}:**      2014       2020       2030       2040          * **{{data_type}}:**      absolute      change from baseline      uncertainity Raster layers The table naming convention will follow this structure:```{{indicator}}-{{scenario}}-{{period_type}}-{{year}}-{{period_value}}.tif``` example:  drought_severity_flow-historic-year-2014.tif  Example geometry map```sqlwith r as (SELECT basinid, label, value FROM water_risk_indicators where indicator = 'water_stress' and model = 'historic' and period = 'year' and period_value is null and year =2014 and type = 'absolute')select s.*, label, value from wri_subcatchements s left join r on s.basinid=r.basinid`````` csswater_risk_indicators{  polygon-fill:transparent;  polygon-opacity: 1;  line-color:transparent;  line-width: 1;  line-opacity: 1;}water_risk_indicators [ label='5. Extremely high (>80%)'] {   polygon-fill:B10026;  line-color:B10026}water_risk_indicators [ label='4. High (40-80%)'] {   polygon-fill:  FC4E2A;  line-color:  FC4E2A}water_risk_indicators [ label='3. Medium to high (20-40%)'] {   polygon-fill: FD8D3C;  line-color: FD8D3C}water_risk_indicators [ label='2. Low to medium (10-20%)'] {   polygon-fill: FED976;  line-color:  FED976}water_risk_indicators [label='1. Low (<10%)'] {   polygon-fill: FFFFB2;  line-color:  FFFFB2}water_risk_indicators [label='Arid & low water use'] {   polygon-fill: eee;  line-color:  eee}```<jupyter_code>api_endpoint =<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1402439024390244, 'fraction_numerical': 0.041399229781771504, 'mean_word_length': 5.246492985971944, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '388776', 'license': 'MIT', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1052, 'n_words': 233, 'path': 'Aqueduct/lab/AQ_2_Layer_definition.ipynb', 'repo_name': 'resource-watch/notebooks', 'size': '3116'}