mapping census data in arcview 3 - carleton …...mapping census data in arcview 3.x nancy lemay...

Post on 12-Apr-2020

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

April 2004 Ontario DLI training

Mapping Census Data

in ArcView 3.x

Nancy Lemay

University of Ottawa

Barbara Znamirowski

Trent University

April 2004 Ontario DLI training

Workshop Outline

• Defining certain concepts and terms: Map scale,

coordinate systems, datum and projections.

We will try to

understand

these

concepts

April 2004 Ontario DLI training

Workshop Outline (cont’d)

• Understanding different file formats:

- “.e00”, “.shp”, “.shx”, “.dbf”, “.sbn” and “.sbx”.

• Introduction to ArcView and its components.

• Hands-on exercise using census data and cartographic

boundary files (CBF).

April 2004 Ontario DLI training

Map Scales

A defined dimensional relationship between reality and the map (Robinson et al., 1995):

a) Verbal: “one cm represents ten kilometers”

b) Representative fraction: 1:10,000

c) Graphic scale:

d) Area scale:

Represents square kilometers

5 0 0 0 0 5 0 0 0 1 0 0 0 0 M e t e r s

April 2004 Ontario DLI training

Calculate Map Scales

• For example, if 2 cm on a map represents 1 km on the

ground the scale would be 2 cm = 1 km, or...

• Scale is “unitless” because it is a ratio.

April 2004 Ontario DLI training

Examples small vs. large scale

Small scale: 1:250,000

Large scale: 1:50,000

April 2004 Ontario DLI training

Coordinate systems

• A coordinate system is a reference system based on

mathematical rules for specifying positions (locations)

on the surface of the earth. The coordinate values can

be spherical (latitude and longitude) or planar (such as

Universal Transverse Mercator).

• A coordinate system is usually defined by a datum,

ellipsoid and projection, and is specified in terms of

units (e.g. degrees, meters).

April 2004 Ontario DLI training

Types of Coordinate Systems

Geographic coordinate system:

– Uses latitude and longitude for locating positions

on the uniformly curved surface of the earth.

Rectangular/plane coordinate systems:

– Used to locate positions on a flat map.

– For example Universal Transverse Mercator

(UTM)

April 2004 Ontario DLI training

Geographic Coordinate System

• The Equator (latitude) and Prime Meridian (longitude) are the

reference points. Usually Greenwich, England is the Prime

Meridian.

• The Cartographic Boundary Files, the Road Network Files and

the representative points are disseminated in latitude/longitude

coordinates.

Prime meridian

Equator

April 2004 Ontario DLI training

Decimal Degrees (DD)

• Decimal degrees are similar to degrees/ minutes/seconds

(DMS) except that minutes and seconds are expressed as

decimal values.

• Decimal degrees make digital storage of coordinates easier

and computations faster.

60.34444 instead of 60º20'40"

April 2004 Ontario DLI training

Example: Converting DMS to DD

20 minutes.= 0.33333 (20/60)

40 seconds = 0.01111 (40/3600)

Add up the degrees to get an answer:

60º + 0.33333 + 0.01111=60.34444 DD

60º20'40" degrees

minutes

seconds

April 2004 Ontario DLI training

Ellipsoid (Spheroid) and Geoid

• Ellipsoid - used as a reference of the earth’s surface for the

mathematical model of the earth. Mathematical

approximation of the geoid.

• Geoid - estimates the earth’s surface using mean sea level

of the ocean with all continents removed.

April 2004 Ontario DLI training

Datum

• Geodetic reference system that specifies the size and shape of the earth.

• Base point from which the latitude and longitude of all other points on the earth's surface are referenced.

• Two types of datums: (1) Earth-centered (WGS84, NAD83), (2) Local (NAD27, ED50).

• The spatial data disseminated for the 2001 Census are based on the North American Datum of 1983 (NAD83).

http://www.geod.nrcan.gc.ca/index_e/geodesy_e/reference04_e.html

April 2004 Ontario DLI training

Map Projections

• Process of transforming and representing positions on the

earth's three-dimensional curved surface to a two-

dimensional (flat) surface.

• The process is accomplished by a direct geometric

projection or by a mathematically derived transformation.

For more information: http://mac.usgs.gov/mac/isb/pubs/MapProjections/projections.html

Use projected

spatial data to calculate

distance!!

April 2004 Ontario DLI training

Map Projections Examples

Lambert Conformal Conic Cylindrical Equal Area

Mollweide’s

Good for middle latitudes.

Good for directional and shape relations along large east-west mid-latitudes.

Preferred for world maps.

April 2004 Ontario DLI training

Different File Formats

Shapefile “.shp” is used in ArcView and ArcGIS and is accompanied by the following auxiliary files:

• “.dbf” the dBASE file that stores the attribute information of features. Required.

• “.shx” the file that stores the index of the feature geometry.

• “.sbn & .sbx” the files that store the spatial index of the features.

• “.prj” - the file that stores the coordinate system information.

• “.xml” - metadata for ArcInfo 8.0, for using shapefiles on the Internet.

Coverages are often published in a compacted form with the extension “.e00”:

• Proprietary file format used to distribute Arc/Info datasets. Topology and attributes are properly maintained in this format.

April 2004 Ontario DLI training

ArcView Project File

• The ArcView “.apr” file contains the project information.

• Features are stored:

• view properties

• theme information

• layout information

• other types of information are stored.

• Return to the project without having to re-load all the

associated files.

April 2004 Ontario DLI training

StatCan Spatial File Naming

Convention First Character: projection of file: “g” if projection is Geographic

Latitude/Longitude and “l” if projection is Lambert Conic Conformal.

Next three characters: primary geographic boundary of file, for

example “csd”.

For example:

gcsd035b02a_e.exe

April 2004 Ontario DLI training

Next three Numbers: geographic code of coverage, for example 035.

Next character: file type (based on 1996 codes). a if digital boundary file (for Dissemination Warehouse only) (DBF in 1996)

b if Cartographic Boundary File, detailed coverage for large-scale mapping

c if detailed interior lakes hydrographic coverage

e Ecumene

r Road Network Files (RNF and SRNF)

For example:

gcsd035b02a_e.exe

April 2004 Ontario DLI training

Following two numbers: dissemination year (date stamp for versioning)

– The choices are: 01 if disseminated in 2001, 02 if disseminated in 2002, 03 if disseminated in 2003 etc.

Next character: file format:

– “a” ARC/INFO® ArcGIS Export File (e00), “m” MapInfo® Export File (mid & mif)

Final two characters: language

– _e English

– _f français

For example:

gcsd035b02a_e.exe

April 2004 Ontario DLI training

Introduction to ArcView 3.x

Button bar

Project window

Menu bar Tool bar

Document windows

Status bar

ArcView Documents View – display, query & analyze themes Layout – integrate documents to create presentation-

quality maps

Table – display attribute data

Script – program written in Avenue used to

customize the interface, automate common

functions or create applications

April 2004 Ontario DLI training

ArcView Projects

Views

Tables

Charts

Layouts

Scripts

Project window

Displays the names of all

project documents & acts

as a gateway to all

documents in the project.

April 2004 Ontario DLI training

Views and Themes • Theme: A GIS links sets of features and their attributes and manages

them together in units called themes. Each theme has a title and a

legend in the view’s Table of Contents.

Themes

April 2004 Ontario DLI training

Theme Operations

When a theme is

turned on, ArcView

draws it in the map

display area.

Active themes are raised

To make more

than one theme

active, hold

down the Shift

key as you

click on each

theme.

To invoke the

Legend Editor

Double-click on

active theme.

You can control

visibility and

change display

order (by

dragging)

April 2004 Ontario DLI training

Symbol Window Fill Palette Pen Palette

Palette manager Color Palette Font Palette Marker Palette

Legend Editor

April 2004 Ontario DLI training

Let’s Map 2001 Census Data…

Italian Mother Tongue Normalized by Total Population0 - 0.0050.005 - 0.0140.014 - 0.0310.031 - 0.0750.075 - 0.146

Hydrography

Streets

N

20 0 20 40 Kilometers

Source: Statistics Canada 2001 Census data and

cartographic boundary files

Author: Nancy Lemay

Projection: Lambert Conformal Conic

Proportion of Italian Mother Tongue by Census Tracts

April 2004 Ontario DLI training

Saving the Beyond 20/20 table

• Open the B20/20 table « .ivt » for:

– Profile of Citizenship, Immigration, Birthplace, Generation Status,

Ethnic Origin, Visible Minorities and Aboriginal Peoples, for

Census Metropolitan Areas, Tracted Census Agglomerations and

Census Tracts, 2001 Census - Cat. No. 95F0489XCB01005

• After subsetting the B20/20 table to include only Ottawa Census

Tracts, save the table as a « .dbf » file.

April 2004 Ontario DLI training

Importing the CBF .e00 file

a) Under Start then Programs, you will find under Esri:

April 2004 Ontario DLI training

Importing the .e00 file (cont’d)

b) Click on Browse… to find your .e00 file on your hard drive.

c) Click on Browse… and select where you want to save the new data

files and type a new filename in Output Data Source.

April 2004 Ontario DLI training

Open ArcView

• Open ArcView and double-click on Views in the project

view.

April 2004 Ontario DLI training

Set working directory…

When starting a project in which new data needs to be created, the

working directory has to be set so that ArcView knows where to

store the files.

File -> Set Working Directory

After this has been selected a dialog will appear where

the working directory can be set.

April 2004 Ontario DLI training

Load cartographic boundary file

To add a

new theme

click on

April 2004 Ontario DLI training

Make the theme active

Add a check

to make the

theme active

April 2004 Ontario DLI training

Add table to your new project

• Open ArcView 3.x make Tables active in the project

window, click on Add.

(1)

(2)

(3)

April 2004 Ontario DLI training

Information on Table Joins

• A join function is provided in ArcView so that the census

data can be appended to the attribute table of the CBF.

• In order to join the two tables, a common field containing

the same values must be identified. Please note that the

name of the field does not have to be the same, but the

values in the field must be of the same type (string vs

number).

April 2004 Ontario DLI training

Prepare census table for a join

• To Edit the census table click under Table –> Start

Editing

• Under Edit click Add Field…

• Type « CTUID » for Name, select « String » as a Type

and « 10 » for Width.

• Click under Table –> Stop Editing

April 2004 Ontario DLI training

• We need to convert these census tract labels to recreate the common

field in our profile data.

• Click Calculate in the Field menu. The calculation is based on the

following instruction: CTUID=505.AsString+[Geography].Left(7),

which means that the CTUID string is created by adding the Ottawa

CMA code as a string to the left-most 7 characters in each of the

Geography labels.

April 2004 Ontario DLI training

Open CBF table

To open the

CBF table go

back to the

View and click

the table icon

on the button

bar

April 2004 Ontario DLI training

Identify common field Find the common field, it should be

left justified (string).

April 2004 Ontario DLI training

Join the census data with CBF

Source table

Destination table

April 2004 Ontario DLI training

• In the attribute table click on the field you will use to

join. You know the field is selected when it is sunken

and darker than the surrounding fields.

• In the shapefile table click on the same field. Click

Table in the menu and then Join or click on the

following button:

Source table Destination table

April 2004 Ontario DLI training

Calculate the ratio

Open the destination table

and under Table select Start

Editing

April 2004 Ontario DLI training

Add a new field to calculate ratio

Once the table is in edit

mode, select Add Field

under Edit.

April 2004 Ontario DLI training

Define the new field

• Give the new field a proper name.

• Select Number as Type.

• Type “4” for number of Decimal Places.

April 2004 Ontario DLI training

Calculate the new variable

• Under Field select Calculate…

• Let’s calculate the ratio of people who have Italian as a mother tongue

and the total population.

April 2004 Ontario DLI training

Map the new variable

• Go back to the View and double-click on the active theme.

• We will select Graduated Color as a Legend type.

April 2004 Ontario DLI training

Select a classification field

• Select your newly created variable called Ratio for the Classification Field.

Click Apply.

April 2004 Ontario DLI training

Choose a projection

• A projection is needed for publication purposes and for calculating

distances.

• Under View select Properties.

• Select kilometers as Map Units and Distance Units.

• Click on Custom and select Lambert Conformal Conic.

April 2004 Ontario DLI training

Optional: add hydrography

• Click on the to add the hydrography shapefile.

• Remember to make it active by adding a checkmark.

Double-click on the

active theme to

activate the Legend

Editor and double-

click on the the color

box below Symbol.

Click on the paint

brush to select a new

color. Click Apply.

April 2004 Ontario DLI training

Final results

April 2004 Ontario DLI training

Comparing ArcView 3.x and

ArcGIS 8.x

• Same basic functionality as 3.x

• Separate software modules for organizing files

(ArcCatalog), accessing tools (ArcToolbox) and working

with data (ArcMap).

• Projection-on-the-fly

• Direct read of more data formats

• Can import 3.x project files and legend files

April 2004 Ontario DLI training

Terminology

• Project files (*.apr) become map documents (*.mxd)

• Projects become maps

• Views become data frames

April 2004 Ontario DLI training

Interface

• No more project window

• Table of contents

– Display view

– Source view

• Map display

• Toolbars

April 2004 Ontario DLI training

Importing

• Simple to do, but it has been known to cause problems.

– Primarily, cannot import all 3.x views

• Import 3.x project files (*.apr)

• Import 3.x legend files (*.avl)

April 2004 Ontario DLI training

Project file problem…

• ArcMap allows the storing of relative path names.

• Use “Set Data Source” to find lost layers or simply remove

and re-add the lost layer.

April 2004 Ontario DLI training

New terminology

• http://www.esri.com/news/arcuser/0402/files/talking.pdf

April 2004 Ontario DLI training

References

• Robinson, A.H., et al., Elements of cartography. 6th ed. 1995, New York:

John Wiley. 674.

April 2004 Ontario DLI training

Partial Credits for Stolen Slides

• http://tdr.tug-libraries.on.ca/HELPS/gishelp.htm

• http://prod.library.utoronto.ca:8090/maplib/ArcMap_Guide.pdf

• http://www.ideal.forestry.ubc.ca/cons340/Lecture03.pdf

• http://maps.nrcan.gc.ca/maps101/scale.html

• http://www.uottawa.ca/academic/arts/geographie/lpcweb/web2320/

April 2004 Ontario DLI training

More info on making your projects portable:

• http://www.wlu.ca/~wwwgeog/special/geomatics/pdf/tra

nsportable.pdf

• http://www.esri.com/industries/k-

12/download/docs/transapr.pdf

Importing ArcView GIS Projects into ArcGIS

• http://www.esri.com/news/arcuser/0701/avconvert.html

top related