From 53d24630434ad7c95349c8e28eecba20432296c0 Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Mon, 4 Mar 2024 13:06:18 -0800 Subject: [PATCH 01/14] Update readme.md Update instructions about exiting the software. --- readme.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/readme.md b/readme.md index de5a6ea1..3d408ccb 100644 --- a/readme.md +++ b/readme.md @@ -127,6 +127,11 @@ As an example of a sensitivity analysis of the urban boundary used for analysis: ![image](https://github.com/global-healthy-liveable-cities/global-indicators/assets/12984626/c95e1ab4-3d89-49a6-86cb-61718f83dde5) +### Exit the software +To exit the web application click the exit button in the top right-hand corner or type `exit` in the terminal before closing the web app browser window. At the end of a Jupyter session, in the menu click File > Shut Down. Do not just close your browser tab or terminal window without stopping the web application or Jupyter first. + +To run the analysis for your study region visit our website for detailed instructions on how to configure [a new study region](https://global-healthy-liveable-cities.github.io/software/#Details) and what [input data is required](https://global-healthy-liveable-cities.github.io/software/#Data). + ## Citations The software was developed by the [Global Healthy and Sustainable City Indicators Collaboration](https://www.healthysustainablecities.org/about#team) team, an international partnership of researchers and practitioners, extending methods developed by the [Healthy Liveable Cities Lab](https://cur.org.au/research-programs/healthy-liveable-cities-group/) at RMIT University and incorporating functionality from the [OSMnx](https://github.com/gboeing/osmnx) tool developed by Geoff Boeing. From ce44e88b36ce9cab9ec060c1ece1d2304f530b79 Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Mon, 4 Mar 2024 13:14:19 -0800 Subject: [PATCH 02/14] Update example.ipynb Update the typo error in the file path of the study region directory in the Sensitivity Analysis description --- process/example.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/example.ipynb b/process/example.ipynb index 62dd5a4c..43086be1 100644 --- a/process/example.ipynb +++ b/process/example.ipynb @@ -354,7 +354,7 @@ "- Analyses could be conducted for different time points using historical data\n", "- Finally, data could be modified to represent hypothetical interventions and evaluate their impact on the calculated indicators\n", "\n", - "To run the following analysis, copy the file `process/configuration/example_ES_Las_Palmas.yml` to a new file named `example_ES_Las_Palmas_test_not_urbanx.yml`. Open this in a text editor and replace the `ghsl_urban_intersection: true` in the study region boundary to read `ghsl_urban_intersection: false`." + "To run the following analysis, copy the file `process/configuration/regions/example_ES_Las_Palmas.yml` to a new file named `example_ES_Las_Palmas_test_not_urbanx.yml`. Open this in a text editor and replace the `ghsl_urban_intersection: true` in the study region boundary to read `ghsl_urban_intersection: false`." ] }, { From 3b33c1d399b6d71edf90ab8fd4ca0cbb85d11c51 Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Mon, 4 Mar 2024 13:28:25 -0800 Subject: [PATCH 03/14] Update _utils.py Add fill_color parameter to choropleth function --- process/subprocesses/_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/process/subprocesses/_utils.py b/process/subprocesses/_utils.py index 0823c962..a504e80f 100644 --- a/process/subprocesses/_utils.py +++ b/process/subprocesses/_utils.py @@ -1575,6 +1575,7 @@ def plot_choropleth_map( field: str, layer: str = 'indicators_grid_100m', layer_id: str = 'grid_id', + fill_color: str = '', title: str = '', attribution: str = '', ): @@ -1590,6 +1591,7 @@ def plot_choropleth_map( boundary_centroid=tuple(r.get_centroid()), key_on=layer_id, fields=[layer_id, field], + fill_color=fill_color, title=title, attribution=attribution, ) @@ -1602,6 +1604,7 @@ def choropleth_map( key_on: str, fields: list, boundary_centroid: tuple, + fill_color: str, title: str, attribution: str, ): @@ -1645,7 +1648,7 @@ def choropleth_map( key_on=f'feature.properties.{key_on}', name='choropleth', columns=fields, - fill_color='YlGn', + fill_color=fill_color, fill_opacity=0.7, line_opacity=0.1, legend_name=title, From a422a7e60ae79aeeebae3455d093679dc9e85437 Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Mon, 4 Mar 2024 13:30:30 -0800 Subject: [PATCH 04/14] Update ghsci.py Add fill_color parameter to the choropleth map function. --- process/subprocesses/ghsci.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/process/subprocesses/ghsci.py b/process/subprocesses/ghsci.py index 1c2b55c3..5c374fc3 100644 --- a/process/subprocesses/ghsci.py +++ b/process/subprocesses/ghsci.py @@ -941,6 +941,7 @@ def choropleth( field: str, layer: str, id: str, + fill_color: str, title: str, save=True, attribution: str = 'Global Healthy and Sustainable City Indicators Collaboration', @@ -961,6 +962,7 @@ def choropleth( layer=layer, layer_id=id, title=title, + fill_color=fill_color, attribution=attribution, ) if save: From 530fd5a19cd891a33b7d90d51a88668f0af924a8 Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Mon, 4 Mar 2024 18:31:17 -0800 Subject: [PATCH 05/14] Update example.ipynb Added fill_color parameter to the choropleth function --- process/example.ipynb | 1 + 1 file changed, 1 insertion(+) diff --git a/process/example.ipynb b/process/example.ipynb index 43086be1..fcc57e5a 100644 --- a/process/example.ipynb +++ b/process/example.ipynb @@ -1055,6 +1055,7 @@ " field='local_walkability',\n", " layer=r.config['grid_summary'],\n", " id='grid_id',\n", + " fill_color='YlGn', " title='Local walkability',\n", " attribution='Global Healthy and Sustainable City Indicators Collaboration'\n", ")\n", From 34791949b2251b1ac77fc8181cee1560e0ca3bb2 Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Mon, 4 Mar 2024 18:45:44 -0800 Subject: [PATCH 06/14] Update example.ipynb --- process/example.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/example.ipynb b/process/example.ipynb index fcc57e5a..f635b15e 100644 --- a/process/example.ipynb +++ b/process/example.ipynb @@ -1055,7 +1055,7 @@ " field='local_walkability',\n", " layer=r.config['grid_summary'],\n", " id='grid_id',\n", - " fill_color='YlGn', + " fill_color='YlGn',\n", " title='Local walkability',\n", " attribution='Global Healthy and Sustainable City Indicators Collaboration'\n", ")\n", From 210dc42f24fab54877512d12487d2dc43d3c4606 Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Mon, 4 Mar 2024 18:54:06 -0800 Subject: [PATCH 07/14] Update ghsci.py Added fill_opacity parameter --- process/subprocesses/ghsci.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/process/subprocesses/ghsci.py b/process/subprocesses/ghsci.py index 5c374fc3..a761c661 100644 --- a/process/subprocesses/ghsci.py +++ b/process/subprocesses/ghsci.py @@ -942,6 +942,7 @@ def choropleth( layer: str, id: str, fill_color: str, + fill_opacity: float, title: str, save=True, attribution: str = 'Global Healthy and Sustainable City Indicators Collaboration', @@ -963,6 +964,7 @@ def choropleth( layer_id=id, title=title, fill_color=fill_color, + fill_opacity=fill_opacity, attribution=attribution, ) if save: From 631ed8d687c1c10ff6d0ff1760157537411582ad Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Mon, 4 Mar 2024 18:57:17 -0800 Subject: [PATCH 08/14] Update _utils.py added fill_opacity --- process/subprocesses/_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/process/subprocesses/_utils.py b/process/subprocesses/_utils.py index a504e80f..4ccb31f1 100644 --- a/process/subprocesses/_utils.py +++ b/process/subprocesses/_utils.py @@ -1576,6 +1576,7 @@ def plot_choropleth_map( layer: str = 'indicators_grid_100m', layer_id: str = 'grid_id', fill_color: str = '', + fill_opacity: float = 0.7, title: str = '', attribution: str = '', ): @@ -1592,6 +1593,7 @@ def plot_choropleth_map( key_on=layer_id, fields=[layer_id, field], fill_color=fill_color, + fill_opacity=fill_opacity, title=title, attribution=attribution, ) @@ -1605,6 +1607,7 @@ def choropleth_map( fields: list, boundary_centroid: tuple, fill_color: str, + fill_opacity: float, title: str, attribution: str, ): @@ -1649,7 +1652,7 @@ def choropleth_map( name='choropleth', columns=fields, fill_color=fill_color, - fill_opacity=0.7, + fill_opacity=fill_opacity, line_opacity=0.1, legend_name=title, ).add_to(m) From 214d8e3cf3899a3bd71f20efac1b080f54172299 Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Mon, 4 Mar 2024 18:58:30 -0800 Subject: [PATCH 09/14] Update example.ipynb added fill_color parameter --- process/example.ipynb | 1 + 1 file changed, 1 insertion(+) diff --git a/process/example.ipynb b/process/example.ipynb index f635b15e..100b2094 100644 --- a/process/example.ipynb +++ b/process/example.ipynb @@ -1056,6 +1056,7 @@ " layer=r.config['grid_summary'],\n", " id='grid_id',\n", " fill_color='YlGn',\n", + " fill_opacity=0.7,\n", " title='Local walkability',\n", " attribution='Global Healthy and Sustainable City Indicators Collaboration'\n", ")\n", From 73391676bffa3ced03387bf8d6edbb90c42665a6 Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Sat, 16 Mar 2024 16:30:28 -0700 Subject: [PATCH 10/14] Update _utils.py Add line_opacity function --- process/subprocesses/_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/process/subprocesses/_utils.py b/process/subprocesses/_utils.py index 4ccb31f1..cce1c262 100644 --- a/process/subprocesses/_utils.py +++ b/process/subprocesses/_utils.py @@ -1575,8 +1575,9 @@ def plot_choropleth_map( field: str, layer: str = 'indicators_grid_100m', layer_id: str = 'grid_id', - fill_color: str = '', + fill_color: str = 'YlGn', fill_opacity: float = 0.7, + line_opacity: float = 0.1, title: str = '', attribution: str = '', ): @@ -1594,6 +1595,7 @@ def plot_choropleth_map( fields=[layer_id, field], fill_color=fill_color, fill_opacity=fill_opacity, + line_opacity=line_opacity, title=title, attribution=attribution, ) @@ -1608,6 +1610,7 @@ def choropleth_map( boundary_centroid: tuple, fill_color: str, fill_opacity: float, + line_opacity: float, title: str, attribution: str, ): From ed91e25e43d10ee5f16acb8df6e5b2373e2680ba Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Sat, 16 Mar 2024 16:32:06 -0700 Subject: [PATCH 11/14] Update ghsci.py added line_opacity --- process/subprocesses/ghsci.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/process/subprocesses/ghsci.py b/process/subprocesses/ghsci.py index a761c661..9b0ea647 100644 --- a/process/subprocesses/ghsci.py +++ b/process/subprocesses/ghsci.py @@ -943,6 +943,7 @@ def choropleth( id: str, fill_color: str, fill_opacity: float, + line_opacity: float, title: str, save=True, attribution: str = 'Global Healthy and Sustainable City Indicators Collaboration', @@ -965,6 +966,7 @@ def choropleth( title=title, fill_color=fill_color, fill_opacity=fill_opacity, + line_opacity=line_opacity, attribution=attribution, ) if save: From ac5682d08b643e85107f26090275f24f07cf2b0c Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Tue, 19 Mar 2024 14:02:04 -0700 Subject: [PATCH 12/14] Update readme.md Noted how to stop long running process in the terminal --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 3d408ccb..487bde50 100644 --- a/readme.md +++ b/readme.md @@ -128,7 +128,7 @@ As an example of a sensitivity analysis of the urban boundary used for analysis: ![image](https://github.com/global-healthy-liveable-cities/global-indicators/assets/12984626/c95e1ab4-3d89-49a6-86cb-61718f83dde5) ### Exit the software -To exit the web application click the exit button in the top right-hand corner or type `exit` in the terminal before closing the web app browser window. At the end of a Jupyter session, in the menu click File > Shut Down. Do not just close your browser tab or terminal window without stopping the web application or Jupyter first. +To exit the web application click the **exit** button in the top right-hand corner. At the end of a Jupyter session, in the menu click _File > Shut Down_. If you close a browser window with the Jupyter Lab or GHSCI app still running, the underlying server process running these may be interrupted by pressing `Control+C` at the command prompt. To run the analysis for your study region visit our website for detailed instructions on how to configure [a new study region](https://global-healthy-liveable-cities.github.io/software/#Details) and what [input data is required](https://global-healthy-liveable-cities.github.io/software/#Data). From 5b36f5c28a9b14f67f4cf24ce24e7627bb559345 Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Tue, 19 Mar 2024 14:09:58 -0700 Subject: [PATCH 13/14] Update example.ipynb Added `line_opacity` argument to the choropleth map. --- process/example.ipynb | 1 + 1 file changed, 1 insertion(+) diff --git a/process/example.ipynb b/process/example.ipynb index 100b2094..96080357 100644 --- a/process/example.ipynb +++ b/process/example.ipynb @@ -1057,6 +1057,7 @@ " id='grid_id',\n", " fill_color='YlGn',\n", " fill_opacity=0.7,\n", + " line_opacity=0.1,\n", " title='Local walkability',\n", " attribution='Global Healthy and Sustainable City Indicators Collaboration'\n", ")\n", From 457a3a3363ba0f12d3e4c1a2c3383cb04791a6ed Mon Sep 17 00:00:00 2001 From: Daria Pugacheva <142947564+dapugacheva@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:02:56 -0700 Subject: [PATCH 14/14] Update example.ipynb note matplotlib color palete --- process/example.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/example.ipynb b/process/example.ipynb index 96080357..4eb6ee9c 100644 --- a/process/example.ipynb +++ b/process/example.ipynb @@ -1078,7 +1078,7 @@ "\n", "![image.png](attachment:01efeb07-053e-48bb-8e5b-736962ab54b9.png)\n", "\n", - "In the interactive version, you can hover over grid cells to view the value of the specified indicator for that location." + "In the interactive version, you can hover over grid cells to view the value of the specified indicator for that location. You can change graphic parameters like fill color, see [how to choose colormaps in matplotlib](https://matplotlib.org/stable/users/explain/colors/colormaps.html#classes-of-colormaps)" ] }, {