17
Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Embed Size (px)

Citation preview

Page 1: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Introduction to GRCP

Boualem RABTA

Center for World Food Studies (SOW-VU)Vrije Universiteit - Amsterdam

Page 2: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Requirements

Install GRCP (to work comfortably with large maps, a minimum amount of RAM and disk space required)

Install and configure GAMS :

Settings (control panel/Regional settings) : Ajust the value for decimal separator (.) and list separator (,)

Page 3: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

About GRCP• GRCP is a software for joint processing of

surveys (and censuses) and maps.

• Data from different sources can be put together and represented on the map and geographical information (from maps) can be appended to the survey.

• Statistical procedures are available to address issues such as prediction (regression, classification), association (Polling) and causality (matching).

• Results are produced in tables, extensively commented listing files and may also be plotted on the map.

Page 4: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Data input/output for GRCP

Raw data : •Country map (lowest adm. Level, ASC format)•Administrative data (CSV format)•Survey data (geolocalised, CSV format)

Input files (GRCP) :• Locatm.grd (map)•Administrative data (gams tables)•Locat.grd (survey points)•Variables (*.grd, *.gcd)

Output files (GRCP) :• *.grd, *gcd• *grdm, *gcdm (maps)• *.csv, *.txt

Preparation(GRCP-WS)

Run GRCP

GAMS scriptZondat.gms (compile)

1

3Compile

2

Maps (Images) :• *.gif, *.jpg, *.png, *.bmp

Plotting (GRCP-WS)

4

Page 5: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Importing GIS data to GRCPRaw data:• Map at the lowest administrative level in

ArcView ASCII fromat (e.g. GIS_CN.asc)• Codes and names for administrative levels (ML,

R, PV, CN) in CSV format (ML_name.csv, R_name.csv, PV_name.csv, CN_name.csv)

• Association CN->PV->R in CSV format (CN_PV.csv)

Use function ‘’Maps->Create locatm from ASC’’ in the interface (indicate the location of the map and the administrative data). The map will be converted to GRCP Format (locatm.grd, *.gms)

At this level, the map can be plotted at any administrative level and boundaries can be shown as well.

Page 6: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Importing Survey dataRaw data:• Survey table in CSV format (e.g. survey.csv)Identify georeference of every observation a) Georeference is already available (GPS coordinates)b) Georeference needs to be constructed• From information on settlement (village, town)• From information on administrative subdivisions,

rural/urban1- Create the survey frame (locat.grd): Open the data

file in GRCP (Survey->Load survey data) and then use function ‘’Survey->generate variable files’’

2- Extract the variables from the dataset (Survey->generate variable files) distinguish between categorical and real variables.

At this stage, the survey points can be shown on the map and some data might be plotted as well (!)

Page 7: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Projection from maps to surveyIt is also possible to extract

information from maps in Arcview ASCII fromat (e.g. population density, climate, rainfall, soil…) and to append it to the survey so it can be used for analysis.

Use function “Maps-> ASC to variable”

Example: Population density

Page 8: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Projection of data given at administrative level on the map

Data aggregated at any administrative level can easily be projected on the map.

1.Load data2.Projection/From adm.

To map

Page 9: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

File structure (on disk)

The software shows a simplified view of the files tree. The disk structure of a GRCP folder looks like the following:

Folder for real-valued files (*.grd)

Folder for all for categorical files (*.gcd) with corresponding header file (*.hdr)

Folder for all for categorical files (*.gcd) without corresponding header file (*.hdr).Real-valued files can also be put here.

Folder for GAMS scripts

Page 10: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Files formatThe map frame (locatm.grd) and the survey frame (locat.grd)

X

X

X

X

Geographic location of the observations in the survey

The locat.grd file

The locatm.grd file

Page 11: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Files formatGeneral rules:1) All variables that correspond to the survey

frame have extensions with three characters.•

Examples: *.gcd, *.grd

2) All variables that correspond to the map frame have extensions with four characters , where an “m” is added to indicate that this is a “map” file.

Examples: *.gcdm, *.grdm

(The only exception is the map frame itself (locatm.grd))

Input files for Polling:The main statistical tool of Polling is the

computation of conditional frequencies, which works purely on categorical data.

-> The main file format is *.gcd

-> All real-valued files (*.grd) will have to be categorized

-> Every *.gcd file needs a header file, with extension *.hdr

Output filesOutput files have a multitude of different

extensions (explained later)Examples: *.gcd, *.grd, *.hdr, *.gcdm, *.grdm,

*.hdrm, *.txt, *.csv, *.hrr, *.sas

Page 12: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

GAMS program

To perform statistical operation on the data in GRCP, the user has to write and execute a GAMS program.

Page 13: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Available functions in polling include :

Input: *.gcd

Output: *.hdr (header file for categories)*.hrr (header file for weights)*.gcdm (projection of categories on the map)*.grdm (projection of weights on the map)*.hdrm (header file for categories on the map)

CROSS

SLICEInput: *.grd

Output: *.gcd (categories)*.hdr (header file for categories)*.hrr (header file for weights)*.gcdm (projection of categories on the map)*.grdm (projection of weights on the map)

ZONDIRInput: All activated files

Output (data): *.gcd (categories)*.hdr (header file for categories)*.grd (weight file)*.hrr (header file for weights)*.gcdm (projection of categories on the map)*.grdm (projection of weights on the map)

Output (results): *.txt (main results)*.csv (excerpts from main results file)*.sas (SAS program for mapping in SAS)

KERNMInterpolation

Page 14: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Projection from map to surveyFor each survey observation, values of the map at that location (eg, population,

elevation, soil quality, climate,…) is appended as attribute.

$BATINCLUDE ..\LIBRARY\MAPTOSUR.gms VAR1

Takes a gcdm (map) file (VAR1) and generates gcd (survey) file.Takes a grdm (map) file (VAR1) and generates grd (survey) file.

Page 15: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Interpolation

data collected within specific sites in an area of interest can be extended spatially to sites where no sample collection has taken place.

Surface interpolation functions create a continuous surface from discrete set of measured points through the input of data collected at a number of sample points.

Page 16: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

On classified data mollifier/nearest neighbor interpolation is applied.KERNM specifies the interpolation parameters to be used by CROSS, SLICE and

ZONDIR commands.

SET ZVARM ' File names and description real valued variables' / LATM 'Latitude ' LONM 'Longitude ' VOIDM1 VOIDM2 /;* Specify rule and kernel window size for mapping on grid SCALAR RULEM,THETAM; THETAM = 0.6; * kernel window size RULEM = 0 ; * {0=no projection 1=mollifier 2=nearest neighbor 3=fast nearest neighbor(define thetam as pixels)}$BATINCLUDE ..\LIBRARY\KERNM.gms ZVARM RULEM THETAM

Then, we may use CROSS, SLICE and ZONDIR

Page 17: Introduction to GRCP Boualem RABTA Center for World Food Studies (SOW-VU) Vrije Universiteit - Amsterdam

Plotting optionsColors: GRCP uses 10 colors for the data, 4

colors for administrative boundaries, 1 color for nodata values and 1 color for ML area. Color schemes can be loaded and modified.

Legend/Title : Position as well as font size for legends and titles can be adjusted.

Survey points : can be plotted as layer on top of other maps.

They can also plotted as maps with administrative boundaries and ML background. The size and shape can be modified.

Maps : the pixel size can be adjusted (small maps)