Skip to content
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

Delhi sample #555

Merged
merged 14 commits into from
Dec 30, 2019
Merged

Delhi sample #555

merged 14 commits into from
Dec 30, 2019

Conversation

guneetmutreja
Copy link
Contributor

  • All imports are in the first cell? First block of imports are standard libraries, second block are 3rd party libraries, third block are all arcgis imports?
  • All GIS object instantiations are one of the following?
    • 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")
  • If this notebook requires setup or teardown, did you add the appropriate code to ./misc/setup.py and/or ./misc/teardown.py?
  • If this notebook references any portal items that need to be staged on AGOL/Python API playground, did you coordinate with a Python API team member to stage the item the correct way with the api_data_owner user?
  • Code refactored & split out across multiple cells, useful comments?
  • Consistent voice/tense/narrative style? Thoroughly checked for typos?
  • All images used like <img src="base64str_here"> instead of <img src="https://some.url">? All map widgets contain a static image preview? (Call mapview_inst.take_screenshot() to do so)
  • All file paths are constructed in an OS-agnostic fashion with os.path.join()? (Instead of r"\foo\bar", os.path.join(os.path.sep, "foo", "bar"), etc.)
  • IF YOU WANT THIS SAMPLE TO BE DISPLAYED ON THE DEVELOPERS.ARCGIS.COM WEBSITE, ping @ DavidJVitale so he can add it to the list for the next deploy

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

You'll be able to see Jupyter notebook diff and discuss changes. Powered by ReviewNB.

@guneetmutreja
Copy link
Contributor Author

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 26, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

shivanip32 commented on 2019-11-26T10:18:49Z
----------------------------------------------------------------

Delhi’s green cover increased from 20.08 per cent in 2015 to 20.22 per cent in 2017 monitored from satellite images in between October and November months, according to the India State of Forests Report (ISFR) 2017. 

According to the India State of Forests Report (ISFR) 2017, satellite imageries of Delhi were monitored for October and November months and it shows that the green cover of Delhi has been increased from 20.08% in 2015 to 20.22% in 2017.

This sample shows the capabilities of different band mathematics such as Normalized Difference Vegetation index (NDVI) for calculation of green cover in Delhi, India on 15 October 2017 using Landsat 8 imagery.

This sample shows the capabilities of spectral indices such as Normalized Difference Vegetation index (NDVI) for the calculation of green cover in Delhi, India on 15 October 2017 using Landsat 8 imagery.


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 26, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

shivanip32 commented on 2019-11-26T10:18:50Z
----------------------------------------------------------------

As this notebook is to calculate green cover for Delhi, you can filter the boundary for Delhi.

The boundary of Delhi can be filtered from the layer, as this notebook focuses on the calculation of Delhi's green cover


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 26, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

shivanip32 commented on 2019-11-26T10:18:51Z
----------------------------------------------------------------

Recording the extent of New Delhi region

Extracting Landsat imagery for New Delhi Region


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 26, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

shivanip32 commented on 2019-11-26T10:18:52Z
----------------------------------------------------------------

The OBJECTID for Delhi state boundary is 7 that is what we have used in the below code

In the State Boundary layer, OBJECTID for Delhi is 7 which is used in the code below.


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 26, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

shivanip32 commented on 2019-11-26T10:18:52Z
----------------------------------------------------------------

Filter rasters based on cloudcover and time duration

Filter imageries based on cloud cover and Acquisition Date.


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 26, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

shivanip32 commented on 2019-11-26T10:18:53Z
----------------------------------------------------------------

In this example we have selected all the images captured between 1 October 2017 to 31 December 2017 with cloud cover less than or equal to 5% for Delhi region.

In this example we have selected all the imageries captured between 1 October, 2017 to 31 December, 2017 with cloud cover less than or equal to 5% for Delhi.


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 26, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

shivanip32 commented on 2019-11-26T10:18:54Z
----------------------------------------------------------------

Selecting Image dated 15 October 2017 from the collection using its OBJECTID

Selecting imagery dated 15 October, 2017 from the collection using its OBJECTID.


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 26, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

shivanip32 commented on 2019-11-26T10:18:55Z
----------------------------------------------------------------

In order to create NDVI composite for the image we can apply already defined "NDVI Raw" function in image's properties

In the Landsat layer properties, pre defined "NDVI Raw" function was applied to get the NDVI composite.


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 26, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

shivanip32 commented on 2019-11-26T10:18:56Z
----------------------------------------------------------------

Clipping the NDVI composite image tile against the boundary of Delhi region 

Clipping the NDVI composite for Delhi and setting the extent of the generated raster


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 26, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

shivanip32 commented on 2019-11-26T10:18:57Z
----------------------------------------------------------------

Defining the NDVI range for agricultural land and forest area in Delhi using "remap" function. The NDVI values used for calculating agricultural land ranges from [0.4,0.5] and for forest land/ tree cover mapping, [0.5,1] range of the NDVI values are considered.

"remap" function was used to define the NDVI range for agricultural land and forest. The NDVI values between 0.4 - 0.5 represents agricultural land whereas NDVI values between 0.5 - 1 shows forest/ tree cover.


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 26, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

shivanip32 commented on 2019-11-26T10:18:58Z
----------------------------------------------------------------

In this study, we have calculated green cover for Delhi as on 15 October 2017 using Landsat 8 imagery. We used Normalised Difference Vegetation Index which is a very well known and widely used index for the calculation of green areas.

In this study, green cover of Delhi is calculated using Landsat 8 imagery for 15 October, 2017. Normalised Difference Vegetation Index (NDVI) is used for the calculation of green areas, which is a well known and widely accepted spectral index for vegetation studies. NDVI is used here compared to the other spectral indices because it is easy to compute and requires only two bands.

Towards the end, we calculated the area equivalent of the selected pixels under each class to estimate overall green cover of Delhi.

Finally, the area of the pixels of agricultural land and forest class is calculated to estimate overall green cover of Delhi.

According to the India State of Forests Report (ISFR) 2017, Delhi's green cover for the year 2017 was 20.22% whereas in our study the green cover comes out to be roughly around 19% of total geographical area of Delhi which is quite near to the figures.

According to the India State of Forests Report (ISFR) 2017, Delhi's green cover for the year 2017 was 20.22%, whereas in the study the green cover comes out to be around 19% of total geographical area of Delhi which is quite close to ISFR's estimate.


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:40Z
----------------------------------------------------------------

put space between the word cloud cover

Filter rasters based on cloud cover and time duration

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:41Z
----------------------------------------------------------------

first line could be rephrased

The India State of Forests Report (ISFR) 2017, showed that green cover of Delhi has increased from 20.08% in 2015 to 20.22% in 2017, as observed from satellite imageries of Delhi for the month of October and November. This was a welcome news for the city struggling with severe pollution and rising population, which makes it necessary to monitor the city's green cover and keep the city liveable.

make a new paragraph

This sample shows the capabilities of spectral indices such as Normalized Difference Vegetation index (NDVI) for the calculation of green cover in Delhi, India on 15 October 2017, using Landsat 8 imagery.

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:41Z
----------------------------------------------------------------

import the specific library instead of all

from arcgis.raster.functions import *

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:43Z
----------------------------------------------------------------

spell check

Search for Multispectral Landsat layer in ArcGIS Online.

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:44Z
----------------------------------------------------------------

change esri to Esri

Imagery Layer by Esri

guneetmutreja commented on 2019-11-27T10:10:22Z
----------------------------------------------------------------

Can not be done as it is run time result provided by the api

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:45Z
----------------------------------------------------------------

spell check

Search for India State Boundaries 2018 layer in ArcGIS Online.

could be rephrased to avoid repetition

The boundary of Delhi can be filtered from the layer, as this notebook focuses on the city's green cover.

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:46Z
----------------------------------------------------------------

could be rephrased for replacing extra 'the'

In State Boundary layer, OBJECTID for Delhi is 7 which is used below. Also, it is important to add extent to the geometry of selected boundary.

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:47Z
----------------------------------------------------------------

could be rephrased

In order to have good result


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:48Z
----------------------------------------------------------------

tense rephrase

"NDVI Raw" function is applied to get the NDVI composite

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:49Z
----------------------------------------------------------------

could be rephrased - avoid repetition

Clipping the NDVI composite for Delhi and setting the extent of the generated raster.

@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:50Z
----------------------------------------------------------------

check if any graph is missing here


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:51Z
----------------------------------------------------------------

in the map legend define what 1 and 2 represent. Also explain the results in the map briefly


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:52Z
----------------------------------------------------------------

Title could be rephrased - remove the word some calculations

Area Derivation

explain about what area is derived here


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:53Z
----------------------------------------------------------------

explain the chart briefly with percentages


@review-notebook-app
Copy link

review-notebook-app bot commented Nov 27, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-11-27T08:49:54Z
----------------------------------------------------------------

break into paragraphs and rephrase the last line

In this study, green cover of Delhi is calculated using Landsat 8 imagery for 15 October, 2017. Normalised Difference Vegetation Index (NDVI) is used for the calculation of green areas, which is a well known and widely accepted spectral index for vegetation studies.

NDVI is used here compared to the other spectral indices because it is easy to compute and requires only two bands. Pixels with NDVI values greater than 0.4 and less than 0.5 are considered as agricultural land, parks, etc and the pixels with more than or equal to 0.5 NDVI values are considered as tree cover/ forest areas.

Finally, the area of the pixels of agricultural land and forest class is calculated to estimate overall green cover of Delhi.

The study shows how green land use cover of an area could be easily computed in few lines of code using Esri's predefined NDVI layer and Landsat 8 imagery from ArcGIS server. 

add any source, report references, links at the end

@review-notebook-app
Copy link

review-notebook-app bot commented Dec 9, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-12-09T06:30:31Z
----------------------------------------------------------------

could be rephrased

Here, the pixels with light green color having a value of "1" represent agricultural land whereas

@review-notebook-app
Copy link

review-notebook-app bot commented Dec 9, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

moonlanderr commented on 2019-12-09T06:30:32Z
----------------------------------------------------------------

remove duplication of this sentence

Finally, the area of the pixels of agricultural land and forest class is calculated to estimate overall green cover of Delhi.

@guneetmutreja
Copy link
Contributor Author

@moonlanderr I've made these changes, please review it and let me know if there are more

Copy link
Collaborator

@moonlanderr moonlanderr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

take care of the image

@moonlanderr
Copy link
Collaborator

@AtmaMani this sample is ready for further review. You may add to your review list.

@guneetmutreja
Copy link
Contributor Author

@AtmaMani Did you get a chance to have a look at the notebook? Any updates or changes, I need to incorporate?

@AtmaMani
Copy link
Contributor

@guneetmutreja not yet. It has been a busy week.

@review-notebook-app
Copy link

review-notebook-app bot commented Dec 20, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

AtmaMani commented on 2019-12-20T00:12:22Z
----------------------------------------------------------------

Overall comments:

  1. Notebook title and headings are all level 1. Keep title at heading size 1 and lower headings and subheadings to size 2, 3, etc. This will improve how the page looks in final website and your ToC

guneetmutreja commented on 2019-12-23T03:08:54Z
----------------------------------------------------------------

Done

@review-notebook-app
Copy link

review-notebook-app bot commented Dec 20, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

AtmaMani commented on 2019-12-20T00:12:23Z
----------------------------------------------------------------

Good, I like that instead of hard coding, you are querying the SR from landast layer.


guneetmutreja commented on 2019-12-23T03:00:55Z
----------------------------------------------------------------

Thank you

@review-notebook-app
Copy link

review-notebook-app bot commented Dec 20, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

AtmaMani commented on 2019-12-20T00:12:23Z
----------------------------------------------------------------

Good that you added the date in the comment,.


guneetmutreja commented on 2019-12-23T03:01:11Z
----------------------------------------------------------------

Thanks

@review-notebook-app
Copy link

review-notebook-app bot commented Dec 20, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

AtmaMani commented on 2019-12-20T00:12:24Z
----------------------------------------------------------------

After each of these operations, query the imagery layer so we get to see the output


guneetmutreja commented on 2019-12-23T03:13:52Z
----------------------------------------------------------------

Done

@review-notebook-app
Copy link

review-notebook-app bot commented Dec 20, 2019

View / edit / reply to this conversation on ReviewNB (backstory for this conversation format).

AtmaMani commented on 2019-12-20T00:12:25Z
----------------------------------------------------------------

display the variable so we can see the result of clip operation


guneetmutreja commented on 2019-12-23T03:14:02Z
----------------------------------------------------------------

Done

Copy link
Contributor

Change file name so it is same as the title. Use lowercase and no spaces or special characters.

@AtmaMani
Copy link
Contributor

@shivanip32, @moonlanderr thanks for the detailed review
@guneetmutreja this is a good sample, I have asked for a few changes including the file name. For future, I would recommend expanding this sample by running a veg analysis on prior date (2015) and the current one on 2017 to see if you observe a change in green cover %

Copy link
Contributor Author

guneetmutreja commented Dec 23, 2019

@AtmaMani thanks for the review. I have made all the changes you suggested and made a commit. Please have a look at the same. I will surely work on your recommendations for expanding the notebook in the near future.

@AtmaMani AtmaMani merged commit ca9daa3 into Esri:master Dec 30, 2019
@AtmaMani
Copy link
Contributor

Looks good, thanks @guneetmutreja

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants