<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=QGIS%2FC4%2FNearest-Neighbour-Analysis%2FEnglish-timed</id>
		<title>QGIS/C4/Nearest-Neighbour-Analysis/English-timed - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=QGIS%2FC4%2FNearest-Neighbour-Analysis%2FEnglish-timed"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=QGIS/C4/Nearest-Neighbour-Analysis/English-timed&amp;action=history"/>
		<updated>2026-04-28T19:08:56Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=QGIS/C4/Nearest-Neighbour-Analysis/English-timed&amp;diff=54596&amp;oldid=prev</id>
		<title>PoojaMoolya: Created page with &quot;{|border=1 |- ||'''Time''' || '''Narration''' |- ||00:01 ||Welcome to this tutorial on '''Nearest Neighbour Analysis''' in ''' QGIS'''. |- ||00:07 ||In this tutorial, we will...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=QGIS/C4/Nearest-Neighbour-Analysis/English-timed&amp;diff=54596&amp;oldid=prev"/>
				<updated>2020-12-21T05:26:23Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{|border=1 |- ||&amp;#039;&amp;#039;&amp;#039;Time&amp;#039;&amp;#039;&amp;#039; || &amp;#039;&amp;#039;&amp;#039;Narration&amp;#039;&amp;#039;&amp;#039; |- ||00:01 ||Welcome to this tutorial on &amp;#039;&amp;#039;&amp;#039;Nearest Neighbour Analysis&amp;#039;&amp;#039;&amp;#039; in &amp;#039;&amp;#039;&amp;#039; QGIS&amp;#039;&amp;#039;&amp;#039;. |- ||00:07 ||In this tutorial, we will...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{|border=1&lt;br /&gt;
|-&lt;br /&gt;
||'''Time'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
||00:01&lt;br /&gt;
||Welcome to this tutorial on '''Nearest Neighbour Analysis''' in ''' QGIS'''.&lt;br /&gt;
|-&lt;br /&gt;
||00:07&lt;br /&gt;
||In this tutorial, we will learn about&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:11&lt;br /&gt;
|| '''Nearest Neighbour Analysis '''by '''Distance matrix''' method.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:16&lt;br /&gt;
||'''Statistics''' using '''Nearest Neighbour Analysis''' tool.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:21&lt;br /&gt;
||Here I am using,&lt;br /&gt;
&lt;br /&gt;
'''Ubuntu Linux '''OS version. 16.04&lt;br /&gt;
&lt;br /&gt;
'''QGIS '''version''' 2.18&lt;br /&gt;
|-&lt;br /&gt;
|| 00:32&lt;br /&gt;
||To follow this tutorial learner must be familiar with '''QGIS '''interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:39&lt;br /&gt;
||For pre-requisite QGIS tutorials, please use this link.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:45&lt;br /&gt;
||The files required to practise this tutorial are available in the '''Code files''' link.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:52&lt;br /&gt;
||Please download and extract the contents of the folder.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||00:57&lt;br /&gt;
||Here I have the folder with the required file to practise this tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:04&lt;br /&gt;
||Double-click to open the folder.&lt;br /&gt;
&lt;br /&gt;
Here you will find, '''Urban areas.shp''' and '''Volcanoes.shp'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:15&lt;br /&gt;
||'''Volcanoes.shp''' layer shows active volcanoes in the world.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:21&lt;br /&gt;
||'''Urban areas.shp''' shows populated urban areas of the world.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:28&lt;br /&gt;
||Open the two shape files in QGIS, select both the files.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:35&lt;br /&gt;
||Right-click and select '''Open with QGIS Desktop''' option from the context menu.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:42&lt;br /&gt;
||QGIS interface opens with two layers loaded in the layers panel.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:49&lt;br /&gt;
||Right-click on the '''volcanoes '''layer and select '''zoom to layer''' option.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01:55&lt;br /&gt;
||On the canvas you will see a map with point features.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:01&lt;br /&gt;
|| Let us label these point features.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:05&lt;br /&gt;
|| Right-click on '''Volcanoes layer''', from the sub menu click on '''Properties'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:12&lt;br /&gt;
|| '''Layer Properties''' dialog-box opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:16&lt;br /&gt;
|| Select '''Labels''' from the left panel.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:20&lt;br /&gt;
|| Select '''Show labels for this layer''' option from the drop down.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:25&lt;br /&gt;
|| In the '''Label with '''drop down select '''Name'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:29&lt;br /&gt;
||Here you will find various options to modify the label style.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:34&lt;br /&gt;
||Choose the required style and click on '''OK '''button.&lt;br /&gt;
|-&lt;br /&gt;
|| 02:39&lt;br /&gt;
|| On the canvas, points with the names is displayed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:44&lt;br /&gt;
|| Similarly let us label '''Urban areas'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:51&lt;br /&gt;
|| On the canvas point features are labeled with their cities.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:57&lt;br /&gt;
||QGIS has tools to analyze spatial relationships between features.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:04&lt;br /&gt;
||One such tool is '''Nearest Neighbour Analysis. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:08&lt;br /&gt;
||'''Nearest Neighbour Analysis '''is used for the following analysis.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:13&lt;br /&gt;
||Finding distance between two '''Point features'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:17&lt;br /&gt;
|| Finding features which are closest to a given feature.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:23&lt;br /&gt;
||First, we will create '''distance matrix''' for calculating the distances.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:29&lt;br /&gt;
||Let us open the''' attribute''' table for the '''Volcanoes''' layer. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:34&lt;br /&gt;
||Right-click on '''Volcanoes''' layer. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:37&lt;br /&gt;
||Select '''Open Attribute Table'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:40&lt;br /&gt;
||In the '''attribute table''' there are multiple columns.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:45&lt;br /&gt;
||Various attributes for the point features are listed here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:50&lt;br /&gt;
||Names of the volcanoes and their locations are also listed here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:56&lt;br /&gt;
||Close the '''attribute table'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:59&lt;br /&gt;
||Open the '''attribute table''' for the '''Urban areas''' layer. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:04&lt;br /&gt;
||Notice the various columns in the table.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:08&lt;br /&gt;
||You will find names of the cities, countries and other information in this table.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:15&lt;br /&gt;
||Close the '''attribute table'''.&lt;br /&gt;
|-&lt;br /&gt;
|| 04:18&lt;br /&gt;
||Let us calculate the distance between the active volcanoes and nearest cities. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:24&lt;br /&gt;
||Click on '''Vector''' menu.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:27&lt;br /&gt;
||Select '''Analysis Tools'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:30&lt;br /&gt;
||Select '''Distance Matrix''' option from the sub-menu.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:34&lt;br /&gt;
||'''Distance Matrix''' dialog-box opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:38&lt;br /&gt;
||Please read the description about '''Distance matrix''' on the right-panel.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:44&lt;br /&gt;
||By default '''Parameters '''tab opens on the screen.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:49&lt;br /&gt;
||Select the Parameters as shown here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:53&lt;br /&gt;
||Select '''Volcanoes''' as an '''Input Point Layer'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:58&lt;br /&gt;
||Select '''NAME''' as '''Input unique ID field '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:03&lt;br /&gt;
||Select '''Urban Areas '''as''' Target Point Layer'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:08&lt;br /&gt;
||Select '''City''' as '''Target unique ID field'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:13&lt;br /&gt;
||Keep''' Output matrix type''' as '''Linear'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:17&lt;br /&gt;
||Let us find the distance from the volcano to two nearest cities.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:23&lt;br /&gt;
||Hence, select 2 in '''Use only the nearest  target Points''' field.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:30&lt;br /&gt;
||Click on the 3 dots button next to '''Distance Matrix''' field.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:35&lt;br /&gt;
||From the drop-down menu, select '''Save to file'''. option.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:40&lt;br /&gt;
||In the dialog-box, give an appropriate name and location. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:44&lt;br /&gt;
||Choose''' Files of type''', as''' CSV '''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:49&lt;br /&gt;
||In the '''Encoding''' field choose '''System'''. &lt;br /&gt;
&lt;br /&gt;
Click on '''Save''' button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:56&lt;br /&gt;
||In the '''Distance matrix''' dialog-box check the check-box for the following.&lt;br /&gt;
&lt;br /&gt;
'''Open output file after running  algorithm'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:06&lt;br /&gt;
||Click on the '''Run '''button at the bottom-right corner of the dialog box.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:12&lt;br /&gt;
||The process will take few seconds.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:15&lt;br /&gt;
||A new '''csv layer''' named as '''Distance matrix''' is added in the '''Layers''' panel.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:22&lt;br /&gt;
||Open the '''attribute table''' for '''Distance matrix''' layer. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:27&lt;br /&gt;
||In the '''attribute table''' there are three columns.&lt;br /&gt;
&lt;br /&gt;
The last column is the distance between the volcano and nearest city. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:38&lt;br /&gt;
||Please note, here the distance is in meters.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:43&lt;br /&gt;
||This is because the layers are projected in '''WGS 84 UTM Zone 46N system'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:52&lt;br /&gt;
||Depending on the '''CRS''', the distance can also be in '''layer units''' or in '''degrees'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:00&lt;br /&gt;
||Also observe that for each volcano, two nearest cities are listed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||07:07&lt;br /&gt;
||Let us get some statistical analysis for the layers using '''Nearest neighbour tool'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:14&lt;br /&gt;
||We will run a '''nearest neighbour analysis''' to analyze the distribution of features.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:21&lt;br /&gt;
||The results will establish, the distribution as clustered, dispersed or random.&lt;br /&gt;
|-&lt;br /&gt;
|| 07:29&lt;br /&gt;
||Close the '''attribute table'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:32&lt;br /&gt;
||Click on '''Vector''' menu.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:35&lt;br /&gt;
||Scroll down and click on the '''Analysis Tools'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:40&lt;br /&gt;
||From the sub-menu, select the '''Nearest Neighbour analysis'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:46&lt;br /&gt;
||'''Nearest Neighbour Analysis''' dialog-box opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:50&lt;br /&gt;
||Read the information given about '''Nearest neighbour analysis''' on the right-panel.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:57&lt;br /&gt;
||Select '''Volcanoes''' layer in the '''Points''' drop-down.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:02&lt;br /&gt;
||Click on '''Run''' button at the bottom-right corner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:06&lt;br /&gt;
||'''Results''' window opens. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:09&lt;br /&gt;
||Some statistical parameters for the volcanoes layer are listed here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||08:15&lt;br /&gt;
||'''Observed mean distance'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:17&lt;br /&gt;
||'''Expected mean distance'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:20&lt;br /&gt;
||'''Nearest neighbour index'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:23&lt;br /&gt;
||'''Number of point features''' and&lt;br /&gt;
&lt;br /&gt;
'''Z-Score'''.&lt;br /&gt;
|-&lt;br /&gt;
|| 08:29&lt;br /&gt;
||The '''Nearest Neighbour Index''' is expressed as the ratio of the '''Observed Mean Distance''' to the '''Expected Mean Distance'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:39&lt;br /&gt;
||If the index value is less than 1, the pattern exhibits clustering.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:45&lt;br /&gt;
||If the index value is greater than 1, the trend is towards dispersion.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:52&lt;br /&gt;
||Here the '''Nearest Neighbor Index''' value of 0.2 indicates clustering.&lt;br /&gt;
&lt;br /&gt;
Which means, the volcanoes are located close to each other.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:04&lt;br /&gt;
||Similarly a negative '''Z-Score''' also indicates clustering of point features.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:10&lt;br /&gt;
||Close the '''Results''' window.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:13&lt;br /&gt;
||Save the project using '''Project''' menu.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:17&lt;br /&gt;
||Let us summarize. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:19&lt;br /&gt;
||In this tutorial we have learnt about,&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:22&lt;br /&gt;
||'''Nearest Neighbour Analysis''' by '''Distance Matrix''' method.&lt;br /&gt;
&lt;br /&gt;
Statistics using '''Nearest Neighbour Analysis''' tool.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:32&lt;br /&gt;
||As an assignment, Create '''Distance Matrix''' for nearest 5 volcanoes to urban areas.&lt;br /&gt;
&lt;br /&gt;
Hint: Use '''Urban Areas''' as Input and '''K''' as 5.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:46&lt;br /&gt;
||Your completed assignment should look as shown here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:51&lt;br /&gt;
||The video at the following link summarizes the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:59&lt;br /&gt;
||The Spoken Tutorial project team conducts workshops and gives certificates. For more details please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:09&lt;br /&gt;
||Please post your timed queries in this forum.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:13&lt;br /&gt;
||The Spoken Tutorial Project is funded by''', MHRD''' '''Government''' of India. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:20&lt;br /&gt;
||This tutorial is contributed by Ambadas Maske from College of Engineering Pune, Snehalatha Kaliappan and Himanshi Karwanje from IIT Bombay.&lt;br /&gt;
&lt;br /&gt;
Thank you for joining. &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>PoojaMoolya</name></author>	</entry>

	</feed>