20_startingWithBMEGUI - The University of North Carolina at

advertisement
Starting with BMEGUI
Prahlad Jat(1) and Marc Serre(1)
(1) University of North Carolina at Chapel Hill
Agenda
► Installation
and Software Structure
► Temporal GIS Analysis
► Data Preparation
► Basic Operation
Installation and
software structure
Installation
► Requirement
Python 2.5
GTK 2.10.11
FreeType
Python Libraries (PyCairo, PyGObject, PyGTK,
NumPy, SciPy, Matplotlib)
 MATLAB Component Runtime (MCR)




Software Structure
MCR
FreeFont
Matlab .exe file
BMElib
BMEGUI
GTK+
PyGObject
PyCairo
PyGtk
Matplotlib
NumPy
SciPy
Python
Libraries
Features of Python
► Cross-platform
language
► Very simple syntax rules
► Open source software… Free!
► Support Object Oriented Programming
► Scripting language widely used in ArcGIS
► A number of additional modules
 Math and science modules
 Graphical user interface modules
Sample Code
u = 0
v = 0
x = 100
y = 30
while x > y:
u = u + y
x = x – y
if x < y+2:
v = v + x
x = 0
else:
v = v + y + 2
x = x – y – 2
print u, v
if-statement
block
while-statement
block
From The Quick Python Book (Manning)
Temporal GIS Analysis
Temporal GIS analysis process
Read Data File
Check Data Distribution
Data Field Screen
Data Distribution Screen
Exploratory Data Analysis
Exploratory Data
Analysis Screen
Mean Trend Analysis
Mean Trend
Analysis Screen
Covariance Analysis
Space/Time Covariance
Analysis Screen
BME Analysis
BME Estimation Screen
Working Directory and Data File
► Working
► Data
file
Directory
Working Directory and Data File
► Working
► Data
file
Directory
Data Field Screen
► Column
Matching
► Input units and name of compound
Data Field Screen
► Column
Matching
► Input units and name of compound
Data Distribution Screen
► Basic
statistics
► Histogram (Raw data and log-transformed
data)
Exploratory Data Analysis Screen
► Time
series at monitoring station
► Spatial distribution
► Data aggregation
Mean Trend Analysis Screen
► Display
temporal mean trend
► Display spatial mean trend (Raw & Smooth)
► Model Parameter (Exponential Smoothing)
Space/Time Covariance Analysis Screen
► Display
spatial & temporal covariance
► Plot covariance models
BME Estimation Screen
► BME
estimation parameters
BME Estimation Screen
► Time
series of BME mean estimation
► Map of BME mean estimation
► Map of BME error variance
Data Preparation
Workspace and Data File
► Workspace
 System files containing estimation parameters
and results
 Initial parameter file
► Data
File (currently supports two formats)
 GeoEAS format
 CSV with header
Workspace
► All
estimation parameters and results are
stored
 Automatically reproduce the same estimation
result
► Example
 Data File: datafile1.csv
►Work01
 Data File: datafile2.txt
►Work02
– Estimation with covariance model 1
►Work03 – Estimation with covariance model 2
Data File
► Two
data file format (CSV and GeoEAS)
► CSV format
 First line must be column names
 File extension: .csv
► GeoEAS
format
 Standard format in BMElib (Matlab)
► 1st
line: File description
► 2nd line: Number of data column
► 3rd ~ (3+# in 2nd line) line: Name of data column
► Tab separated data
 File extension: .txt
Example
CSV format
LONGITUDE, LATITUDE,NUMDAYS, YEAR,DATATYPE,VAL1,VAL2
-74.5278,40.5594,880,2001,0,0.01,0.01
-74.7781,40.2217,376,2000,0,0.01,0.01
GeoEAS format
Tetrachloroethene (micrograms per liter) in New Jersey
7
LONGITUDE
LATITUDE
NUMDAYS
YEAR
DATATYPE
VAL1
VAL2
-74.5278 40.5594 880 2001 0 0.01 0.01
-74.7781 40.2217 376 2000 0 0.01 0.01
Data Columns
► Data
file must have at least 4 columns
 X Field, Y Field: Spatial Coordinates
►Ex.)
Longitude/Latitude etc
►3-D space is not supported
 T Field: Time events
►Ex.)
Days/Year/Hour etc
 Data Value: Measurement Values
► Station
ID: Unique ID assigned to each
measurement location
Station ID and System ID
► Station




ID
User-defined ID
Alphanumeric value
Used in label of the plot
System automatically create Station ID, if data
does not contain Station ID column
► System
ID
 System assigns sequential number to each
station
Basic Operation
Launch BMEGUI tool
► Go
to ‘’
► Double-click “Create_DeskTop_Sortcut”
► Desktop shortcut appears (red circle)
Data Field Screen
► Select
data columns used for X Field, Y
Field, Time Field, and Data Value
► Input Space Unit, Time Unit, Data Unit and
Name of Data
Select
Column Name
Input Units and
Name of Data
Data Distribution Screen
► Basic
statistics
 Mean, Standard deviation, Skewness, Kurtosis
► Histogram
– Raw data, Log-transformed data
Data Log-transformation
► If
you want to use log-transformed data in the
following analysis, check “Use Log-transformed
Data”
► Tab automatically switch to “Log Data”
Exploratory Data Analysis Screen
► Time
series at monitoring station
► Spatial map at specific time
► Data aggregation
Time series at monitoring station
► Select
Station ID from the list
► Input System ID in the entry
► Click “Next” or “Back” button
Select Monitoring Station
Spatial coordinate of
monitoring station
Location of monitoring
station
Zoom in/out
Spatial map at specific time
► Select
time from the list
► Click “Next” or “Back” button
Select time
Zoom in/out
Data aggregation
► Check
“Aggregation Period” box
► Enter aggregation period and click
“Aggregate Data” button
Quit BMEGUI
► Click
“Quit” button
► Dialog shows up, then click “OK”
Recovery from error
► You
will get an error message
► Check error message and correct the
problem (Data file, Parameters, etc)
► Check a error message file
“err(yymmdd).txt” in your work space
► Contact Info.
 BMElab: MH0014
 Email: jat [at] live.unc.edu
Download