diff --git a/process/example.ipynb b/process/example.ipynb index 22465447..f19f7a7a 100644 --- a/process/example.ipynb +++ b/process/example.ipynb @@ -161,7 +161,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`." ] }, { @@ -325,6 +325,9 @@ " field='local_walkability',\n", " layer=r.config['grid_summary'],\n", " 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", @@ -345,7 +348,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)" ] }, { diff --git a/process/subprocesses/_utils.py b/process/subprocesses/_utils.py index ba12605a..ca75ee4e 100644 --- a/process/subprocesses/_utils.py +++ b/process/subprocesses/_utils.py @@ -1577,6 +1577,9 @@ def plot_choropleth_map( field: str, layer: str = 'indicators_grid_100m', layer_id: str = 'grid_id', + fill_color: str = 'YlGn', + fill_opacity: float = 0.7, + line_opacity: float = 0.1, title: str = '', attribution: str = '', ): @@ -1592,6 +1595,9 @@ def plot_choropleth_map( boundary_centroid=tuple(r.get_centroid()), key_on=layer_id, fields=[layer_id, field], + fill_color=fill_color, + fill_opacity=fill_opacity, + line_opacity=line_opacity, title=title, attribution=attribution, ) @@ -1604,6 +1610,9 @@ def choropleth_map( key_on: str, fields: list, boundary_centroid: tuple, + fill_color: str, + fill_opacity: float, + line_opacity: float, title: str, attribution: str, ): @@ -1647,8 +1656,8 @@ def choropleth_map( key_on=f'feature.properties.{key_on}', name='choropleth', columns=fields, - fill_color='YlGn', - fill_opacity=0.7, + fill_color=fill_color, + fill_opacity=fill_opacity, line_opacity=0.1, legend_name=title, ).add_to(m) diff --git a/process/subprocesses/ghsci.py b/process/subprocesses/ghsci.py index 87c71b2f..b63a0657 100644 --- a/process/subprocesses/ghsci.py +++ b/process/subprocesses/ghsci.py @@ -951,6 +951,9 @@ def choropleth( field: str, layer: str, id: str, + fill_color: str, + fill_opacity: float, + line_opacity: float, title: str, save=True, attribution: str = 'Global Healthy and Sustainable City Indicators Collaboration', @@ -971,6 +974,9 @@ def choropleth( layer=layer, layer_id=id, title=title, + fill_color=fill_color, + fill_opacity=fill_opacity, + line_opacity=line_opacity, attribution=attribution, ) if save: diff --git a/readme.md b/readme.md index de5a6ea1..487bde50 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. 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). + ## 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.