Skip to content

Commit

Permalink
Updated gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
bpstewar committed Nov 15, 2024
1 parent a5a194a commit 3eac6c2
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 733 deletions.
6 changes: 3 additions & 3 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ html:
extra_navbar: ""
use_edit_page_button: true
use_repository_button: true
use_issues_button: true
use_issues_button: false
baseurl: https://github.com/worldbank/DECAT_Space2Stats
extra_footer: |
<div>
Expand All @@ -34,8 +34,8 @@ execute:
sphinx:
config:
html_show_copyright: false
html_last_updated_fmt: "%b %d, %Y"
apidoc_module_dir: ../space2stats_api/src
html_last_updated_fmt: "%Y-%m-%d"
apidoc_module_dir: space2stats_api/src
extra_extensions:
- 'sphinx.ext.autodoc'
- sphinx.ext.napoleon
Expand Down
2 changes: 1 addition & 1 deletion docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parts:
numbered: False
chapters:
- file: docs/sub_tasks/admin_bounds.md
- file: docs/sub_tasks/sub_national_poverty.md
- file: docs/sub_tasks/sub_national_welfare.md
- file: docs/sub_tasks/geest.md
- file: docs/sub_tasks/geo_enhancement.md
- caption: S2S Examples
Expand Down
45 changes: 22 additions & 23 deletions docs/annexA.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
# Annex A: S2S Datasets
|Phase|Category|Variable Name|Source|
|:----|:----|:----|:----|
|1|Access|Distance to airport |Global Friction Surface 2019|
|1|Access|Distance to market |Global Friction Surface 2019|
|1|Access|Distance to port |Global Friction Surface 2019|
|1|Climate|Precipitation |TBD (see here)|
|1|Climate|Temperature |TBD (see here)|
|1|Disaster|Flood|Fathom models|
|1|Disaster|Severe storm|IBTRACS|
|1|Economics|GDP (gridded)|UNEP and WB|
|1|Economics|Ag-GDP|IFPRI and WB|
|1|Economics|Nightlights |Lights Every Night|
|1|Environment|Deforestation |Global forest watch|
|1|Environment|Estimated biomass|Above ground biomass|
|1|Environment|Reforestation |Global forest watch|
|1|Environment|Vegetation indices |Sentinel/Landsat|
|1|Environment|Terrestrial biodiversity indicators|WB|
|1|Infrastructure|Road density/road length|OpenStreetMap|
|1|Physical|Elevation|SRTM 30|
|1|Physical|Slope |SRTM 30|
|1|Social|Conflict events|ACLED|
|1|Social|Population |GHS-Pop|
|1|Social|Population |WorldPop Demographics|
|1|Social|Urbanization|GHS-SMOD|
|2|Climate|XCO2 emissions|Dasgupta, S., S. Lall, D. Wheeler. 2021|
|2|Climate|Methane emissions |Sentinel 5P|
|2|Climate|NO2 emissions |Sentinel 5P|
|2|Climate|Heat Waves|Benny's Method|
|2|Infrastructure|Building statistics (orientation, size, alignment)|Digitize Africa/Google Buildings/Microsoft Buildings|
|2|Access|Distance to airport |Global Friction Surface 2019|
|2|Access|Distance to market |Global Friction Surface 2019|
|2|Access|Distance to port |Global Friction Surface 2019|
|2|Climate|Precipitation |TBD (see here)|
|2|Climate|Temperature |TBD (see here)|
|2|Disaster|Severe storm|IBTRACS|
|2|Environment|Deforestation |Global forest watch|
|2|Environment|Terrestrial biodiversity indicators|WB|
|3|Economics|GDP (gridded)|UNEP and WB|
|3|Economics|Ag-GDP|IFPRI and WB|
|3|Environment|Estimated biomass|Above ground biomass|
|3|Environment|Vegetation indices |Sentinel/Landsat|
|3|Infrastructure|Road density/road length|OpenStreetMap|
|3|Physical|Elevation|SRTM 30|
|3|Physical|Slope |SRTM 30|
|3|Social|Conflict events|ACLED|
|3|Climate|XCO2 emissions|Dasgupta, S., S. Lall, D. Wheeler. 2021|
|3|Climate|Methane emissions |Sentinel 5P|
|3|Climate|NO2 emissions |Sentinel 5P|
|3|Climate|Heat Waves|Benny's Method|
|3|Infrastructure|Building statistics (orientation, size, alignment)|Digitize Africa/Google Buildings/Microsoft Buildings|
|3|Climate|Climate change predictions |WB CCKP|
|3|Economics|Trade volumes (AIS)|AIS|
101 changes: 49 additions & 52 deletions notebooks/user-docs/space2stats_api_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -150,31 +150,31 @@
" <tr>\n",
" <th>0</th>\n",
" <td>866a4a017ffffff</td>\n",
" <td>POINT (36.40245 -0.10117)</td>\n",
" <td>POINT (39.24507 3.70114)</td>\n",
" <td>676.912804</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>866a4a01fffffff</td>\n",
" <td>POINT (36.29170 -0.39057)</td>\n",
" <td>POINT (39.93747 -3.76871)</td>\n",
" <td>347.182722</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>866a4a04fffffff</td>\n",
" <td>POINT (39.40696 -2.61300)</td>\n",
" <td>POINT (33.78711 4.68286)</td>\n",
" <td>285.943490</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>866a4a057ffffff</td>\n",
" <td>POINT (35.34318 -1.13463)</td>\n",
" <td>POINT (37.55111 0.93272)</td>\n",
" <td>279.463912</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>866a4a05fffffff</td>\n",
" <td>POINT (34.80333 2.72332)</td>\n",
" <td>POINT (36.22409 -0.30845)</td>\n",
" <td>235.258474</td>\n",
" </tr>\n",
" <tr>\n",
Expand All @@ -186,31 +186,31 @@
" <tr>\n",
" <th>25801</th>\n",
" <td>86969ed97ffffff</td>\n",
" <td>POINT (35.56103 -0.82817)</td>\n",
" <td>POINT (41.34641 2.65004)</td>\n",
" <td>196.448391</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25802</th>\n",
" <td>86969ed9fffffff</td>\n",
" <td>POINT (41.42538 3.56386)</td>\n",
" <td>POINT (35.60463 3.91825)</td>\n",
" <td>296.740893</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25803</th>\n",
" <td>86969eda7ffffff</td>\n",
" <td>POINT (37.98080 -3.00927)</td>\n",
" <td>POINT (35.31237 4.08646)</td>\n",
" <td>154.818453</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25804</th>\n",
" <td>86969edafffffff</td>\n",
" <td>POINT (39.24303 4.54271)</td>\n",
" <td>POINT (36.64404 4.57332)</td>\n",
" <td>157.875350</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25805</th>\n",
" <td>86969edb7ffffff</td>\n",
" <td>POINT (40.62723 -1.21057)</td>\n",
" <td>POINT (37.12169 0.66374)</td>\n",
" <td>236.127331</td>\n",
" </tr>\n",
" </tbody>\n",
Expand All @@ -220,17 +220,17 @@
],
"text/plain": [
" hex_id geometry sum_pop_2020\n",
"0 866a4a017ffffff POINT (36.40245 -0.10117) 676.912804\n",
"1 866a4a01fffffff POINT (36.29170 -0.39057) 347.182722\n",
"2 866a4a04fffffff POINT (39.40696 -2.61300) 285.943490\n",
"3 866a4a057ffffff POINT (35.34318 -1.13463) 279.463912\n",
"4 866a4a05fffffff POINT (34.80333 2.72332) 235.258474\n",
"0 866a4a017ffffff POINT (39.24507 3.70114) 676.912804\n",
"1 866a4a01fffffff POINT (39.93747 -3.76871) 347.182722\n",
"2 866a4a04fffffff POINT (33.78711 4.68286) 285.943490\n",
"3 866a4a057ffffff POINT (37.55111 0.93272) 279.463912\n",
"4 866a4a05fffffff POINT (36.22409 -0.30845) 235.258474\n",
"... ... ... ...\n",
"25801 86969ed97ffffff POINT (35.56103 -0.82817) 196.448391\n",
"25802 86969ed9fffffff POINT (41.42538 3.56386) 296.740893\n",
"25803 86969eda7ffffff POINT (37.98080 -3.00927) 154.818453\n",
"25804 86969edafffffff POINT (39.24303 4.54271) 157.875350\n",
"25805 86969edb7ffffff POINT (40.62723 -1.21057) 236.127331\n",
"25801 86969ed97ffffff POINT (41.34641 2.65004) 196.448391\n",
"25802 86969ed9fffffff POINT (35.60463 3.91825) 296.740893\n",
"25803 86969eda7ffffff POINT (35.31237 4.08646) 154.818453\n",
"25804 86969edafffffff POINT (36.64404 4.57332) 157.875350\n",
"25805 86969edb7ffffff POINT (37.12169 0.66374) 236.127331\n",
"\n",
"[25806 rows x 3 columns]"
]
Expand All @@ -248,39 +248,20 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "fc98ebd574fd4a989e4040baf6218300",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Map(layers=[ScatterplotLayer(get_fill_color=<pyarrow.lib.FixedSizeListArray object at 0x1681dd180>\n",
"[\n",
" [\n",
" 2…"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"# Define custom breaks and corresponding RGBA colors\n",
"breaks = [0, 1, 1000, 10000, 50000, 100000, 200000, gdf[\"sum_pop_2020\"].max()]\n",
"breaks = [0, 1, 10, 100, 500, 1000, 5000, gdf[\"sum_pop_2020\"].max()]\n",
"colors = np.array([\n",
" [211, 211, 211, 255], # Light gray for 0\n",
" [255, 255, 0, 255], # Yellow for 1-1000\n",
" [255, 165, 0, 255], # Orange for 1000-10000\n",
" [255, 0, 0, 255], # Red for 10000-50000\n",
" [128, 0, 128, 255], # Purple for 50000-100000\n",
" [0, 0, 255, 255], # Blue for 100000-200000\n",
" [0, 0, 139, 255], # Dark blue for 200000+\n",
" [211, 211, 211, 255], # Light gray \n",
" [255, 255, 0, 255], # Yellow \n",
" [255, 165, 0, 255], # Orange \n",
" [255, 0, 0, 255], # Red \n",
" [128, 0, 128, 255], # Purple \n",
" [0, 0, 255, 255], # Blue \n",
" [0, 0, 139, 255], # Dark blue \n",
"])\n",
"\n",
"# Function to assign colors based on custom bins\n",
Expand All @@ -300,13 +281,29 @@
"m = Map(layer)\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"gdf"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "gn",
"language": "python",
"name": "python3"
"name": "gn"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -318,7 +315,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.12.7"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 3eac6c2

Please sign in to comment.