IGET GIS 007 DataExploration

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Data Exploration

Using Quantum GIS

Tutorial ID: IGET_GIS_007


This tutorial has been developed by BVIEER as part of the IGET web portal intended to provide easy access to
geospatial education. This tutorial is released under the Creative Commons license. Your support will help our
team to improve the content and to continue to offer high quality geospatial educational resources. For
suggestions and feedback please visit www.dst-iget.in.
Data Exploration using QGIS

Objective: To review and explore the tutorial data supplied with this tutorial and to
present it in the form of a thematic map.

Software: Quantum GIS 2.0.1

Level: Beginner

Time required: 2 Hour

Prerequisites and Geospatial Skills

1. Quantum GIS should be installed on the computer


2. Basic knowledge about the QGIS interface
3. Should have completed Exercise ID: IGET_QGIS_006 before starting this tutorials

Reading
1. Sutton, T., Dassau, O., & Sutton, M. (2009). A gentle introduction to GIS. Chief
Directorate: Spatial Planning & Information, Eastern Cape.

Tutorial Data: Tutorial data can be downloaded from IGET_GIS_007.


IGET_GIS_007 Data Exploration using QGIS

Introduction
In this tutorial we will learn to explore and display vector data in a comprehensive manner
using QGIS. Vector data can be in the form of points, lines or polygons. In most cases vector
data will be accompanied with additional information which is stored in tabular form. This
information can be in the form of text or numbers and acts as attributes of associated vector
features. It is therefore called 'attribute data'. For this tutorial we will use tehsil-wise
population data of Pune and Beed districts in the state of Maharashtra. The vector data is in
the form of a shapefile with different population parameters like sex ratio and literacy as
attribute information. This data has been compiled from 2011 Census of India.

1. Open the QGIS Desktop → Add vector data via the 'Addvector Layer' button.
Navigate to the folder containing the files and select the file name 'Pune_Beed.shp'.
Click 'Open'. It should look something like this (the colour may be different).
1

Beed
Pune

2. On opening the data you will see the two districts named Pune and Beed sub-divided
into several polygons. These are the sub-district administrative units called ‘Tehsil’.
Pune is on the left and Beed is on the right side in the map canvas.

3. To view the data about a certain tehsil, click on the 'Identify Features' button or
‘Main menu bar → View → Identify Features’. Then click on any tehsil. The selected
tehsil will get highlighted and a window will pop up containing the associated attribute
data with it.

4. This is very useful for finding the feature's name, area, or any other property without
having to open the attribute table.

3
IGET_GIS_007 Data Exploration using QGIS

5. To view all the attributes of the entire shape file, right click on the layer under map
legend/ Layers list and click on 'Open attribute table'. The table will open with all the
attributes in the columns and the features as rows.

6. The table contains many attributes like area, population, literacy etc. The column name
in a shape file has a limited number of characters. That is why most of the column
names are seen as short forms. The following table describing the column name and its
full form.

4
IGET_GIS_007 Data Exploration using QGIS

Column Name Full form


UID Universal Identity
DIST_CODE District Code
DIST_NAME District Name
TEHSIL_NAM Tehsil Name
VARNAME_3 Alternate Name
Perimeter Perimeter of the tehsil
Area_km2 Area of tehsil in square kilometres
SR_T Sex Ratio of Total population
SR_R Rural Sex Ratio
SR_U Urban Sex Ratio
CH_SR Child Sex Ratio
CH_SR_R Rural Child Sex Ratio
CH_SR_U Urban Child Sex Ratio
LIT_POP Literacy of Total Population
LIT_TM Literacy of Total Males
LIT_TF Literacy of Total Females
LIT_RT Literacy of Rural Population
LIT_RM Literacy of Rural Males
LIT_RF Literacy of Rural Females
LIT_UT Literacy of Urban Population
LIT_UM Literacy of Urban Males
LIT_UF Literacy of Urban Females
POP_TOTAL Total Population of Tehsil
CHILD_POP Child Population of Tehsil
LITERATES Number of literate people in the Tehsil
Density Population Density
SR_Change Difference in Sex Ratio of Children and Total Population

7. The attributes can be sorted either ascending or descending order by clicking on the
column title. For example, If we want to sort the tehsils by increasing area we click on

the 'Area_km2' title. '∆' and '∇' beside the column title represents
ascending and descending orders successively.

8. To search for a certain feature by its attribute we can use ‘Column Filter’ from

dropdown menu located below the table.

9. For example, if we need to select all tehsils from Pune district, we click on ‘Show All
Features → Column Filter’ now the list of column names would be displayed, then

5
IGET_GIS_007 Data Exploration using QGIS

select 'DIST_NAME'..

10. In the search tab enter the district name as ‘Pune’ and click ‘Apply’. Now you will
notice only the tehsils belongs to Pune district in the attribute table.
10

6
IGET_GIS_007 Data Exploration using QGIS

Note: You should be careful about case sensitivity of the search word to get the desired

results. This option can be set by 'Case sensitive' check box located
besides the attribute table.

Exercise 1: Select ‘Haveli’ tehsil of Pune district from the attribute table.

11. As seen in the main window, the map polygons all have the same colour. The colours
can be assigned such that they reflect the spatial distribution/ information of any of the
above attributes. Let us take the example of literacy of total population, to create a
thematic map showing the tehsil wise literacy.

12. Right click on the Pune_Beed vector layer under the Layers list and then click on
'Properties'. This will open the 'Layer Properties' window (or simply double-click on
the Pune_Beed.shp layer).

13. Click on the 'Style' tab as shown below. In this section we have to modify the
symbology of the layer to get the desired output.

13

14

14

14. The symbology type will be given in a drop-down menu as 'Single


Symbol'. Click on this and change it to 'Graduated'. Below that will be the 'Column'

7
IGET_GIS_007 Data Exploration using QGIS

drop-down menu. Change it from 'DIST_CODE' to 'LIT_POP' and click 'OK’.

15. Layer will now show various shades of blue. This reflects the distribution of the
population literacy across the state, with the lowest values as light blue and the
highest values as dark blue.

16. On the left, next to the layer name will be a plus '+' sign. Click on this to view the class
intervals.

17. To make further adjustments to the symbology open the 'Layer Properties' window
and go the 'Color Ramp' menu where you can change the colours used to display the
data.

18. As you may notice, the class intervals are in odd intervals with decimal values. This
may not be very presentable for a map. To round up the values, change the option
under 'Mode' to 'Pretty Breaks' under ‘Style’ section in the ‘Layer Properties’. This
will change the number of classes and the class intervals to a more aesthetic form.

18

8
IGET_GIS_007 Data Exploration using QGIS

19. There are a few more modes available, like Quantile, Natural breaks and Standard
Deviation which you can use as the need arises.

20. It is also possible to assign our own class intervals to the layer. To do this, simply
double-click on the values under the 'Value' column and change the upper and lower
values according to your need. Here we accept default values.

20

21. After changing the class intervals as per your need, it is seen that the class labels have
many zeros in the decimal place. To replace these, double-click on the values under
'Label' beside 'Value' and delete the extra zeros and click ‘OK’

21

22. To label the tehsils, open the 'Layer Properties' window and click on the on the 'Label'
tab. Click on the check box next to 'Label this layer with', it will enable the rest of
the options in the window.

23. Under 'Field Containing Label', change the option to 'TEHSIL_NAM'. Below this,
there are few options relating to the format of the label like Font Size and Colour, you
can change according to your test otherwise leave it as default and click ‘OK’.

9
IGET_GIS_007 Data Exploration using QGIS

22

23

Exercise 2: Which tehsil under Pune district has the lowest Population Literacy?

10
IGET_GIS_007 Data Exploration using QGIS

24. As seen in the main window, features have been labeled according to tehsil name. We
may change the field by which we label the features to 'LIT_POP'. In this case the label
will display the Population Literacy instead of the tehsil name.

25. As is the case with most data, the output of our work is displayed in the form of a map.
To create a map in QGIS, open the Map Composer via the ‘Project’ menu (Project →
New Print Composer).

25

23

26. The new dialog box will open up asking for the title of composer. Give the title as
Pune_Beed. You can choose your own title as well and type in the dialog box and click
‘OK’. The Map Composer will open which consists of a blank canvas with toolbar above
it.

27. We will first add the map to the canvas by clicking on the 'Add New Map'
button. Then click on one corner of the canvas and drag out the desired extent of the
map.

11
IGET_GIS_007 Data Exploration using QGIS

27

28. The layers will then appear in the map box in the same form as seen in the main
window. Any changes to be made to the layer will have to be done from the tools in the
main window.

29. In case the layers appear too small, we can increase the scale by clicking on the map
box and then clicking on the 'Item Properties' tab. In the space next to 'Scale' we
enter a smaller value. In this case, we can enter the value of 1500000 and press
'Enter' button on the keyboard.

29

30. From the toolbar we can then add other map items like Legend , Scale Bar ,

Title , and North Arrow from ‘Add image’ .

31. For every item we place we have to click on its button and then click where we wish to
place it on the map. To adjust the properties of the map items, select the item and
change the settings via the 'Item Properties' Tab.

32. To print out the map in '*.pdf' format click on the 'Export to PDF' button on the
toolbar. A window will appear in which we navigate to a folder and enter a suitable

12
IGET_GIS_007 Data Exploration using QGIS

name for the output map.

33. The output map could look something like this:

Exercise
1. Create a map of the Population Density of the districts, using an Orange colour ramp with
Natural Breaks as class intervals.

13

You might also like