SlideShare a Scribd company logo
SessionTwo:
•Attribute Tables and
•JOIN: how to add data to QGIS
Why are attribute tables
important?
Attribute tables define the elements of a
shapefile and allow you to see what is
“inside” the layer. They also allow you to
zoom, highlight and select for other
operations.
“Flat File” with columns and rows
Row = geographic feature record
Column = attribute field (item of
information about a feature)
Attribute field general types
• Numeric (integer or decimals)
• Text (string)
• Date
• Blob (binary large object)
Source: http://www.esi.utexas.edu/gk12/workshops/gis/ppts.php
Each different layer has
its own attribute table
so when we open a
new one here…
QGIS Module 2
ATTRIBUTE
TABLE CAN
BE USED TO
ZOOM INTO
A SELECTED
FEATURE –
IN THIS
CASE A
DISTRICT;
HIGHLIGHT
THE ENTIRE
ROW TO
SELECT IT
THE SELECTED
FEATURE IS LARGE AND
HIGHLIGHTED IN
YELLOW
YOU CAN USE THE
ZOOM FEATURES ON
THE TOOLBAR TO
ZOOMOUT TO SEE THE
SELECTION IN
CONTEXT OF THE
COUNTRY
De-select on toolbar to end
the highlighted area
JOIN
• Basic to all GIS programs is “joining”
• This is how tables of data (excel, csv,
etc) are transformed into maps
• For example, HIV prevalence by
province
Change data form
Must change the data format from EXCEL
or other database into a form that QGIS
can use
• The easiest process is using .dbf
• .dbf is an “old” data file type (dbase)
BUT shapefiles contain .dbf file data
which is why we use them
• To convert we need LibreOffice
LIBRE OFFICE
• Open Libre office and open your excel
data (name of excel file or type of data)
In Libre Office choose spreadsheet
View the data you want to add..
Save as “name”.dbf inside data
folder
Open or maximize QGIS
• You will now add your .dbf file that you
created in Libre Office to the map layers
you are already displaying
• Click on “add vector layer”
QGIS Module 2
1.
2.
3.
Open “attribute layer” for
moz_adm1
• Find the column that has the name of
the provinces in it.
QGIS Module 2
QGIS Module 2
JOIN in QGIS
• Double click on moz_adm1
• When layer opens click on “join” tab
QGIS Module 2
11.You will see this. Note
default target field ID_0
2. You MUST change target
field!
You need to match “like” with “like” so if you have province
data, in this case provincia, you must match with QGIS’s
province layer, in this case NAME_1.
Return to Map Layers and
double click on moz_adm1
Check to see that the
two layers have been
added by hitting the
tab called fields.can
you see them?
DOUBLE CLICK
ON MOZ-ADM1
CLICK ON
GENERAL, NOW
CHANGE THE
TITLE TO RESAVE
THE LAYER
UNDER A NAME
WHICH REFLECTS
YOUR DATA
RENAME
THE FILE
CLICK OK
QGIS Module 2
QGIS Module 2
“Joining”: putting table data
inside the map layer
QGIS Module 2
QGIS Module 2
Now make
sure to
change the
column so it
is set to the
file with
prevalence
that you
wish to
map. You
DO NOT
want
Column set
to ID_0
which is the
default. It
will crash
your
computer.
QGIS Module 2
How to change the
classification
Double click on a row to
begin. Be sure to select
“label” afterward to ensure
that your changes are
reflected in your labels. This
is also an opportunity to
simplify the label
presentation.
QGIS Module 2
QGIS Module 2
QGIS Module 2
Prevalence map with province
names
OK! Now try this with your
own data….
If you don’t have data make
up data to practice
Adding two variables to one
map layer
How to map a second
presentation of prevalence
onto one map: using symbols
• This step shows you how to map a
second level of prevalence, HIV
prevalence in men (MHIVPREV) onto a
map where the colors of provinces
represent the HIV prevalence of women
QGIS Module 2
Here is the final map
with the male and
female HIV prevalence
Male HIV
prevalence is
represented as
the pink dots and
female HIV
prevalence is
represented
within the blue
shaded province
layers.
Now go back to the diagram
layer, where you see pie chart
and choose text diagram.
What do you think?
End session 2
Thank you!

More Related Content

PDF
QGIS Module 1
PPTX
Digital Elevation Model (DEM)
PPTX
GIS data analysis
PDF
QGIS training class 1
PPTX
QGIS Training.pptx
PDF
QGIS training class 3
PPT
GIS - lecture-1.ppt
PPTX
Landsat
QGIS Module 1
Digital Elevation Model (DEM)
GIS data analysis
QGIS training class 1
QGIS Training.pptx
QGIS training class 3
GIS - lecture-1.ppt
Landsat

What's hot (20)

PDF
QGIS Module 3
PPTX
QGIS Basic Training
PPTX
GEOPROCESSING IN QGIS
PDF
Raster
PDF
QGIS Tutorial 2
PPTX
Intro to qgis workshop
PDF
QGIS Module 4
PPTX
Introduction to gis
PDF
Applications of Arc GIS
PDF
ArcGIS Pro Lesson 1
PDF
Arc gis introduction-ppt
PPTX
Gis functions
PDF
QGIS Tutorial 1
PDF
QGIS Open Source Desktop GIS
PDF
Introduction to arc gis
PPTX
Lec_6_Intro to geo-referencing
PPT
GIS Data Types
PPTX
Types of GIS Data
PDF
Introduction to ArcGIS 10.1
QGIS Module 3
QGIS Basic Training
GEOPROCESSING IN QGIS
Raster
QGIS Tutorial 2
Intro to qgis workshop
QGIS Module 4
Introduction to gis
Applications of Arc GIS
ArcGIS Pro Lesson 1
Arc gis introduction-ppt
Gis functions
QGIS Tutorial 1
QGIS Open Source Desktop GIS
Introduction to arc gis
Lec_6_Intro to geo-referencing
GIS Data Types
Types of GIS Data
Introduction to ArcGIS 10.1
Ad

Viewers also liked (19)

PDF
QGIS training class 2
PDF
OSM and QGIS
PDF
The shine study
PDF
Urban health study ii
PDF
QGIS Workshop Introduction - CalGIS 2015
PPTX
QGIS - How does it work?
PDF
Opening slides - South-East UK QGIS user group meeting
PPT
Glacier and snow
PDF
Spatial Analysis Tools with Open Source GIS
PPT
MISSION TO PLANETS (CHANDRAYAAN,MAVEN,CURIOSITY,MANGALYAAN,CASSINI SOLSTICE M...
ODP
The GRASS GIS software (with QGIS) - GIS Seminar
PPTX
What is GIS?
PPT
Remote Sensing And GIS Application In Wetland Mapping
PPT
Remote Sensing And GIS Application In Mineral , Oil , Ground Water MappingMin...
PDF
Introduction to GIS
PDF
IT for Business Intelligence Term Paper
PPT
Geographic information system
PPT
Gis (geographic information system)
PDF
What Is GIS?
QGIS training class 2
OSM and QGIS
The shine study
Urban health study ii
QGIS Workshop Introduction - CalGIS 2015
QGIS - How does it work?
Opening slides - South-East UK QGIS user group meeting
Glacier and snow
Spatial Analysis Tools with Open Source GIS
MISSION TO PLANETS (CHANDRAYAAN,MAVEN,CURIOSITY,MANGALYAAN,CASSINI SOLSTICE M...
The GRASS GIS software (with QGIS) - GIS Seminar
What is GIS?
Remote Sensing And GIS Application In Wetland Mapping
Remote Sensing And GIS Application In Mineral , Oil , Ground Water MappingMin...
Introduction to GIS
IT for Business Intelligence Term Paper
Geographic information system
Gis (geographic information system)
What Is GIS?
Ad

Similar to QGIS Module 2 (20)

PDF
02+ +step+by+step+qgis
PPT
Ms Access ppt
PPTX
Operate Spreadsheet applications ppt.pptx
PDF
Geohosting english manual
PPTX
Module 08 Access & Use Database Application.pptx
PPTX
Measure the right stuff with crystal reports bb con 2011
PPTX
Class viii ch-3 working with tables
PDF
Excel 2003 tutorial 2
PPT
Arcgis training day_1
PDF
Gd401 1 p autocad tables-doc
PPTX
DOC-20240624-WA00ggdfhjfgbbhhgfuujb00.pptx
PPTX
Priyank Goel PPT.pptx
PPTX
OPERATE DATABASE APPLICATION
PDF
Building Geodatabase 2014
PDF
annotation_tutorial_2008
PDF
annotation_tutorial_2008
PDF
Tableau.pdf
PDF
Excel Graphs Charts
PDF
MS Access 2010 tutorial 3
PDF
Customizing Forms
02+ +step+by+step+qgis
Ms Access ppt
Operate Spreadsheet applications ppt.pptx
Geohosting english manual
Module 08 Access & Use Database Application.pptx
Measure the right stuff with crystal reports bb con 2011
Class viii ch-3 working with tables
Excel 2003 tutorial 2
Arcgis training day_1
Gd401 1 p autocad tables-doc
DOC-20240624-WA00ggdfhjfgbbhhgfuujb00.pptx
Priyank Goel PPT.pptx
OPERATE DATABASE APPLICATION
Building Geodatabase 2014
annotation_tutorial_2008
annotation_tutorial_2008
Tableau.pdf
Excel Graphs Charts
MS Access 2010 tutorial 3
Customizing Forms

More from CAPSUCSF (12)

PDF
The ballroom community project
PDF
Relate project abstract
PDF
Moving mountains
PDF
Implementing eban ii
PDF
Hiv testing feasibility and acceptability with low wage immigrant workers
PDF
Hiv disclosure abstract
PDF
Enhancing hiv testing and counseling for men recently released from jail or p...
PDF
Documenting challenges for people living with hiv
PDF
Connecting resources for urban sexual health
PDF
A randomized controlled trial of the bruthas program
PDF
Community based participatory research to address late diagnosis of hiv among...
PDF
The cultural and relationship context of hiv among bisexually active black me...
The ballroom community project
Relate project abstract
Moving mountains
Implementing eban ii
Hiv testing feasibility and acceptability with low wage immigrant workers
Hiv disclosure abstract
Enhancing hiv testing and counseling for men recently released from jail or p...
Documenting challenges for people living with hiv
Connecting resources for urban sexual health
A randomized controlled trial of the bruthas program
Community based participatory research to address late diagnosis of hiv among...
The cultural and relationship context of hiv among bisexually active black me...

Recently uploaded (20)

PDF
Red Light Wali Muskurahat – A Heart-touching Hindi Story
PPT
WORKPLACE HARMONY AND HOW TO BEHAVE IN THE WORKPLACE
PDF
The Power of Pausing Before You React by Meenakshi Khakat
PPTX
Presentation on interview preparation.pt
PDF
Dating And Courtship Quotes Handbook By Walter Tynash.pdf
PPTX
Chapter-7-The-Spiritual-Self-.pptx-First
PPTX
Personal Development - By Knowing Oneself?
PPTX
The concept of how to manage time for beginners .pptx
PPTX
Attitudes presentation for psychology.pptx
PPTX
Development-of-the-Learners-at-Various-Stages-Part-I.pptx
PPT
Spirituality_Typical_Student FOR rdneb religion.ppt
PPTX
SELF ASSESSMENT -SNAPSHOT.pptx an index of yourself by Dr NIKITA SHARMA
PDF
Attachment Theory What Childhood Says About Your Relationships.pdf
PDF
My 'novel' Account of Human Possibility pdf.pdf
PPTX
Self -Management and Self Awareness.pptx
PDF
The Zeigarnik Effect by Meenakshi Khakat.pdf
PDF
The Spotlight Effect No One Is Thinking About You as Much as You Think - by M...
PPTX
Learn numerology content and join tarot reading
PPTX
How to Deal with Imposter Syndrome for Personality Development?
PPT
proper hygiene for teenagers for secondary students .ppt
Red Light Wali Muskurahat – A Heart-touching Hindi Story
WORKPLACE HARMONY AND HOW TO BEHAVE IN THE WORKPLACE
The Power of Pausing Before You React by Meenakshi Khakat
Presentation on interview preparation.pt
Dating And Courtship Quotes Handbook By Walter Tynash.pdf
Chapter-7-The-Spiritual-Self-.pptx-First
Personal Development - By Knowing Oneself?
The concept of how to manage time for beginners .pptx
Attitudes presentation for psychology.pptx
Development-of-the-Learners-at-Various-Stages-Part-I.pptx
Spirituality_Typical_Student FOR rdneb religion.ppt
SELF ASSESSMENT -SNAPSHOT.pptx an index of yourself by Dr NIKITA SHARMA
Attachment Theory What Childhood Says About Your Relationships.pdf
My 'novel' Account of Human Possibility pdf.pdf
Self -Management and Self Awareness.pptx
The Zeigarnik Effect by Meenakshi Khakat.pdf
The Spotlight Effect No One Is Thinking About You as Much as You Think - by M...
Learn numerology content and join tarot reading
How to Deal with Imposter Syndrome for Personality Development?
proper hygiene for teenagers for secondary students .ppt

QGIS Module 2

  • 2. Why are attribute tables important? Attribute tables define the elements of a shapefile and allow you to see what is “inside” the layer. They also allow you to zoom, highlight and select for other operations.
  • 3. “Flat File” with columns and rows Row = geographic feature record Column = attribute field (item of information about a feature)
  • 4. Attribute field general types • Numeric (integer or decimals) • Text (string) • Date • Blob (binary large object) Source: http://www.esi.utexas.edu/gk12/workshops/gis/ppts.php
  • 5. Each different layer has its own attribute table so when we open a new one here…
  • 7. ATTRIBUTE TABLE CAN BE USED TO ZOOM INTO A SELECTED FEATURE – IN THIS CASE A DISTRICT; HIGHLIGHT THE ENTIRE ROW TO SELECT IT
  • 8. THE SELECTED FEATURE IS LARGE AND HIGHLIGHTED IN YELLOW
  • 9. YOU CAN USE THE ZOOM FEATURES ON THE TOOLBAR TO ZOOMOUT TO SEE THE SELECTION IN CONTEXT OF THE COUNTRY
  • 10. De-select on toolbar to end the highlighted area
  • 11. JOIN • Basic to all GIS programs is “joining” • This is how tables of data (excel, csv, etc) are transformed into maps • For example, HIV prevalence by province
  • 12. Change data form Must change the data format from EXCEL or other database into a form that QGIS can use • The easiest process is using .dbf • .dbf is an “old” data file type (dbase) BUT shapefiles contain .dbf file data which is why we use them • To convert we need LibreOffice
  • 13. LIBRE OFFICE • Open Libre office and open your excel data (name of excel file or type of data)
  • 14. In Libre Office choose spreadsheet
  • 15. View the data you want to add.. Save as “name”.dbf inside data folder
  • 16. Open or maximize QGIS • You will now add your .dbf file that you created in Libre Office to the map layers you are already displaying • Click on “add vector layer”
  • 19. Open “attribute layer” for moz_adm1 • Find the column that has the name of the provinces in it.
  • 22. JOIN in QGIS • Double click on moz_adm1 • When layer opens click on “join” tab
  • 24. 11.You will see this. Note default target field ID_0 2. You MUST change target field! You need to match “like” with “like” so if you have province data, in this case provincia, you must match with QGIS’s province layer, in this case NAME_1.
  • 25. Return to Map Layers and double click on moz_adm1
  • 26. Check to see that the two layers have been added by hitting the tab called fields.can you see them?
  • 27. DOUBLE CLICK ON MOZ-ADM1 CLICK ON GENERAL, NOW CHANGE THE TITLE TO RESAVE THE LAYER UNDER A NAME WHICH REFLECTS YOUR DATA
  • 31. “Joining”: putting table data inside the map layer
  • 34. Now make sure to change the column so it is set to the file with prevalence that you wish to map. You DO NOT want Column set to ID_0 which is the default. It will crash your computer.
  • 36. How to change the classification Double click on a row to begin. Be sure to select “label” afterward to ensure that your changes are reflected in your labels. This is also an opportunity to simplify the label presentation.
  • 40. Prevalence map with province names
  • 41. OK! Now try this with your own data…. If you don’t have data make up data to practice
  • 42. Adding two variables to one map layer
  • 43. How to map a second presentation of prevalence onto one map: using symbols • This step shows you how to map a second level of prevalence, HIV prevalence in men (MHIVPREV) onto a map where the colors of provinces represent the HIV prevalence of women
  • 45. Here is the final map with the male and female HIV prevalence Male HIV prevalence is represented as the pink dots and female HIV prevalence is represented within the blue shaded province layers.
  • 46. Now go back to the diagram layer, where you see pie chart and choose text diagram. What do you think?