New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Estimation of river turbidity using sentinel-2 satellite data #742
Conversation
Check out this pull request on Review Jupyter notebook visual diffs & provide feedback on notebooks. Powered by ReviewNB |
ArcGIS/geosaurus/issues/4245 |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:32Z Create geometry of AOI Generate water body mask Create water body mask |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:33Z Turbidity represents the level of suspended sediments in water also indicating water clarity or how clear is the water. It is mainly caused by the presence of silt, algae in a water body, or industrial waste disposed in the rivers by mining activity, factory operation, logging, etc.
Traditionally, turbidity is analyzed by evaluating water samples taken during field measurements. However, field studies are expensive, time and labor intensive, besides, during lockdown field surveys cannot be undertaken. Thus, a good alternative to field survey measurements is satellite remote sensing data, which can as well capture both spatial and temporal variations in river turbidity levels. Accordingly, Sentinel-2 multispectral data is used in the current study to evaluate the changes in river turbidity during COVID-19 lockdown, near the holy city of Allahabad, India.
The case study area of Allahabad is in the northern part of India, at the confluence of Ganga and Yamuna river, which is considered as one of the important cities in Hindu religion. Everyday thousands of Hindu devotees visit the city and disposes waste directly in the rivers. The small-scale factories situated in the city also disposes its waste into the rivers adding to the water pollution. On 25th March 2020, lockdown was announced in India for controlling the COVID-19 spread which meant total shutdown of industries and restricted human movement. The lockdown resulted in reduction of turbidity hence improved water quality in rivers throughout the country. This notebook will elaborate the steps to measure this change in turbidity using arcgis api for python tools. |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:34Z Necessary |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:34Z 1. check if this line is needed from arcgis import *
2. the arcgis imports can be grouped together like this,
import pandas as pd from datetime import datetime from ipywidgets import HBox, VBox, Label, Layout |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:35Z Sentinel-2 Views was used in the analysis: - this multispectral and multitemporal imagery consists of 13 bands with 10, 20, and 60m spatial resolution, which is rendered on-the-fly and available for visualization and analytics. This imagery layer pulls directly from the Sentinel-2 on AWS collection and is updated daily with new imagery. |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:36Z add some description what is being done in this step of searching allahabad aoi, also why it is needed |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:37Z describe the methodology briefly in words as elaborated in the graphics shivanip32 commented on 2020-11-19T03:35:27Z Section below this diagram is explaining the whole workflow shivanip32 commented on 2020-11-19T03:36:28Z Section below this diagram is explaining the whole workflow |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:38Z Sentinel-2 Views imagery layers consists data for the whole world and span different time periods. Thus the first step is to filter out the data of the river in the Allahabad region prior to lockdwon and during the period of lockdown. |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:39Z Create geometry of area of interest (AOI) |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:40Z The geometry of AOI was created for filtering out the Sentinel-2 tiles for the study area. |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:41Z briefly refer where are you getting the fid=1 |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:42Z describe briefly what is being done here |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:43Z briefly refer how you are getting category=1 |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:43Z briefly refer where you are getting the object id for filtering |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:45Z provide a brief what will be done here along with the filter_by parameters source reference |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:45Z Generate water body mask
|
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:46Z Create normalized difference water index (NDWI) raster |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:47Z Normalized difference water index (NDWI) is a satellite based index used for mapping and detecting the surface water bodies. Water absorbs electromagnetic radiation in visible to infrared spectrum, that is why Green and Near Infrared bands are used to detect the water bodies. In the current study, band 3 (green) and band 8 (NIR) of Sentinel-2 is used for generating NDWI raster. Accordingly the bands are first extracted followed by creation of the NDWI raster as follows:
move the Extract bands section within this section of -Generate water bodies mask- after this paragraph so that it becomes clear why these particular bands are extracted, and change the content accordingly shivanip32 commented on 2020-10-15T11:18:15Z These band will also be used for NDTI calculation. |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:48Z Binary raster is created from NDWI raster using a threshold value. The binary raster consists of two classes of water and non-water pixels where pixels with value greater than 0.03 are considered as water. Accordingly this threshold value of 0.03 is used for creating the binary raster using the greater_than function. |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:49Z Create water body mask
add text explaining this step |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:50Z The binary rasters are converted to feature layer for extracting the boundaries of the water bodies. |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:50Z In the feature layer returned above, 'gridcode=0' represents non water class and 'gridcode=1' represents water class. Thus the water polygons with 'gridcode=1 are selected using the |
View / edit / reply to this conversation on ReviewNB moonlanderr commented on 2020-09-03T07:04:51Z explain the parameter t |
Section below this diagram is explaining the whole workflow View entire conversation on ReviewNB |
1 similar comment
Section below this diagram is explaining the whole workflow View entire conversation on ReviewNB |
@mohi9282 & @moonlanderr thank you for reviewing the sample. I have updated the notebook with suggested changes. cc. @AtmaMani & @priyankatuteja |
@mohi9282 could you verify the revision and approve the PR? |
Date formats: March 9th, 2020 and April 13th, 2020 View entire conversation on ReviewNB |
View / edit / reply to this conversation on ReviewNB mohi9282 commented on 2020-11-20T19:47:15Z "Ganga and Yamuna river falls under the world's most polluted river due to dumping of waste from industrial and religious activities indicated by its highly turbid water. " can be reworded to:
Ganga and Yamuna rivers are among the world's most polluted due to dumping of waste from industrial and religious activities as indicated by their highly turbid water.
"During the period of lock down there was a significant improvement in the pollution level of both the rivers due to complete shutdown of the above-mentioned functions." can be reworded to:
During the lockdown period, pollution levels fell dramatically in both rivers due to complete shutdown of the above-mentioned functions. |
@shivanip32 - thanks for the updates. Requesting minor changes to date format at 1 place and some conclusion verbiage. |
@mohi9282, thank you for reviewing my notebook, I have updated the changes. cc. @AtmaMani & @priyankatuteja |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
View / edit / reply to this conversation on ReviewNB priyankatuteja commented on 2020-12-01T10:24:13Z River Turbidity Estimation using Sentinel-2Can we keep the sample title generalized? |
View / edit / reply to this conversation on ReviewNB priyankatuteja commented on 2020-12-01T10:24:14Z gis3 = GIS("your_enterprise_portal")
I suggest naming gis2 and gis3 as agol_gis, ent_gis or gis. Also replace "your_online_profile" with "home" and pas credentials for enterprise portal explicitly. |
View / edit / reply to this conversation on ReviewNB priyankatuteja commented on 2020-12-01T10:24:14Z
Sentinel-2 Views |
View / edit / reply to this conversation on ReviewNB priyankatuteja commented on 2020-12-01T10:24:15Z The item id is specific to demos deldev portal. We need to provide a public item. |
View / edit / reply to this conversation on ReviewNB priyankatuteja commented on 2020-12-01T10:24:16Z This item needs to be published using api_data_owner account. |
View / edit / reply to this conversation on ReviewNB priyankatuteja commented on 2020-12-01T10:24:16Z the estimation of the river turbidity. remove extra space |
View / edit / reply to this conversation on ReviewNB priyankatuteja commented on 2020-12-01T10:24:17Z was --> is
|
View / edit / reply to this conversation on ReviewNB priyankatuteja commented on 2020-12-01T10:24:18Z this output item has also been saved to a private portal. Can we run it against public portal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shivanip32 I have suggested minor changes, in addition to those if you can rename file from river_turbidity_estimation_using_sentinel2_data_for_allahabad to river_turbidity_estimation_using_sentinel2. Thanks!
@shivanip32 |
@priyankatuteja, I have updated the image in sample. |
@shivanip32 thanks for the sample. @moonlanderr @mohi9282 @priyankatuteja thank you for the detailed reviews |
This notebook shows how river turbidity can be estimated using satellite data without any field measurement.
Checklist
Please go through each entry in the below checklist and mark an 'X' if that condition has been met. Every entry should be marked with an 'X' to be get the Pull Request approved.
import
s are in the first cell? First block of imports are standard libraries, second block are 3rd party libraries, third block are allarcgis
imports? Note that in some cases, for samples, it is a good idea to keep the imports next to where they are used, particularly for uncommonly used features that we want to highlight.GIS
object instantiations are one of the following?gis = GIS()
gis = GIS('https://www.arcgis.com', 'arcgis_python', 'P@ssword123')
gis = GIS(profile="your_online_profile")
gis = GIS('https://pythonapi.playground.esri.com/portal', 'arcgis_python', 'amazing_arcgis_123')
gis = GIS(profile="your_enterprise_portal")
./misc/setup.py
and/or./misc/teardown.py
?<img src="base64str_here">
instead of<img src="https://some.url">
? All map widgets contain a static image preview? (Callmapview_inst.take_screenshot()
to do so)os.path.join()
? (Instead ofr"\foo\bar"
,os.path.join(os.path.sep, "foo", "bar")
, etc.)