Data Miner User's Manual
RAIMI Tools-Data Miner User's Manual
I
55
\
\ U.S Environmental Protection Agency, Region 6
| Multimedia Planning and Permitting Division
^ 1445 Ross Avenue - Suite 1200, Dallas, TX 75202
-------
Data Miner User's Manual
Date Revised Manual Version Software Version
September 2003 First Edition Data Miner Version 1.0
Copyright ©2003 U.S. Environmental Protection Agency (U.S. EPA)
This is an unpublished work created in the year stated above. U.S. EPA owns all rights in and to
this work and intends to maintain and protect it as an unpublished work. In the event of
inadvertent publication, the above stated date shall be treated as the year of first publication. In
the event of such publication, U.S. EPA intends to enforce its rights in the work under the
copyright law as a published work. All rights reserved.
These commodities are under U.S. Government distribution license control. As such, they are
not to be re-exported without prior approval of the U.S. Department of Commerce.
Trademarks
Microsoft Excel, Microsoft Access, Windows, Windows 95, Windows 98, Windows Me, Windows
NT, Windows 2000, and WordPad are trademarks of Microsoft Corporation in the USA and other
countries. AutoCAD is a registered trademark of Autodesk, Inc. Other company, product and
service names may be trademarks or service marks of others.
Rights and Disclaimer
The document is for informational and instructional purposes. U.S. EPA reserves the right to
make changes in specifications and other information contained in this publication without prior
notice, and the reader should, in all cases, consult U.S. EPA to determine whether any changes
have been made.
U.S. EPA MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OR MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE.
U.S. EPA SHALL NOT BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL, OR
CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST
PROFITS) ARISING OUT OF OR RELATED TO THIS PUBLICATION OR THE INFORMATION
CONTAINED IN IT, EVEN IF U.S. EPA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure by the Government is subject to
restrictions as set forth in the subdivision (c)(1)(ii) of the Rights in Technical Data and Computer
Software clause at DFARS 252.227-7013.
The work presented in this document has been funded by the U.S. EPA. Mention of trade names
or commercial products does not constitute endorsement or recommendation for use by the
Agency. This document has not been subject to the agency's peer and administrative review and
has not as yet been approved as an EPA document.
-------
Table of Contents
Data Miner User's Manual
1 Introduction 1-1
Understanding Data Miner 1-1
Supported Database Structures 1-2
Table Linkage Considerations 1-2
Query and Extraction Considerations 1-3
How to Use This Manual 1-3
2 Installing Data Miner 2-1
Installing Data Miner 2-1
Installing the InterBase Server 2-5
3 Starting Data Miner 3-1
Starting Data Miner 3-1
Opening a Dataset 3-3
Navigating Data Miner 3-4
The Main Window 3-4
The Menu Bar 3-6
Toolbar Buttons 3-7
4 Using the Data Organizer Editor 4-1
Starting the Data Organizer Editor 4-1
The Tables Tab 4-2
The Views Tab 4-3
Using the List of Views 4-4
Table of Contents
-------
Data Miner User's Manual
Importing a View 4-5
Creating a New View 4-6
Exporting a View 4-7
Adding Tables to a View 4-8
Working with the Join and Fields Subtabs 4-9
Join Subtab 4-10
Field Subtab 4-12
5 Running a Query 5-1
Selecting Tables and Views 5-1
Composing a Query 5-3
Query ForSO-Source Example 5-3
Working with Sample Queries 5-4
Dallas County Emissions Greater Than Zero Tons Per Year 5-5
Statewide Query For Benzene Emissions Greater Than 5 Tons
Per Year 5-5
All Emissions From An Individual Source 5-5
Working with the .cfg File 5-5
6 The Report Window 6-1
Navigating the Query Report Window 6-2
Sorting Query Results 6-3
Resizing the Lower Frame 6-3
Saving a Query Report 6-3
7 References.. ..7-1
Table of Contents
-------
Introduction 1
This chapter gives you a brief overview of the Data Miner program and shows you how to
navigate through Data Miner, giving you a quick start in analyzing the data you need.
In this chapter, you will learn to:
Understand Data Miner
Understand supported database structures
Understand table linkage considerations
Understand query and extraction considerations
Use this manual
Understanding Data Miner
Data Miner is a large client-server database processing system that facilitates the assembly of
multi-source emissions inventories for air and risk modeling.
U.S. EPA developed Data Miner under the Regional Air Impact Modeling Initiative (RAIMI) to
meet the functional need of accessing large regulatory air emissions databases, such as the
Texas Point Source Database (PSDB), to extract information to support air and risk modeling,
risk attribution analysis, and solutions tracking.
Modeling and risk-assessment projects require inspection and analysis of large databases.
Because there are numerous relational databases, each having many fields, it can take
significant time to track down particular details embedded in this mass of information. In addition
to the complexity of the information, many applications are unable to handle the massive
volumes of data. For example, common desktop software such as Microsoft Excel cannot handle
more than 65,600 rows, and Microsoft Access is limited to data sizes smaller than 26 letters.
To overcome these limitations, you can use a client-server application such as Data Miner. The
server consists of a Relational DataBase Management System (RDBMS) to prepare datasets
linked to your existing databases from which information must be extracted. The client
application queries and modifies the datasets.
Introduction
1 - 1
-------
Data Miner User's Manual
With Data Miner, you can:
Create and edit database table relationships and views for complete access to all
emissions attributes maintained in the database
Link source-specific parameters necessary for air and risk modeling from multiple
database tables through the Data Organizer component
Extract the source-specific data sets by constructing and executing simple or complex
data queries in the Query Builder component
Generate database/spreadsheet tables as a comma-delimited text file (*.csv) or
Microsoft Access file for input into air and risk modeling components. (Note that Data
Miner output may require pre-processing before being used as input for particular
models.)
Supported Database Structures
You can use any database that is in the Interbase format. To use Data Miner with your existing
databases, you will need access to an InterBase RDBMS (*.gdb).
The following databases have been successfully converted to .gdb format and accessed with
Data Miner:
Louisiana Toxic Emissions Data Inventory (TEDI)
Texas Point Source Database (PSDB)
Federal Toxic Release Inventory (TRI)
Note: The examples in this manual refer to the PSDB.
Table Linkage Considerations
The PSDB contains 63 tables. Typically only a small number of these tables must be joined to
provide adequate information to conduct air and risk modeling. Other tables may be of interest to
support other project objectives, such as attribution analysis or permitting support. The ability to
reliably and accurately combine relational data tables is essential to emissions characterization,
air modeling, and risk modeling.
Introduction 1 - 2
-------
Data Miner User's Manual
Query and Extraction Considerations
Many databases, including the PSDB, contain large information that is not directly or immediately
usable to achieve project objectives. Therefore, the capability to select certain data sets over
others is necessary. For example, the PSDB contains emissions for the entire state of Texas, but
a project may focus on only a single county. The ability to reliably and accurately extract datasets
of interest is essential to efficient project and data management.
How to Use This Manual
This manual uses a sample emissions characterization scenario to better illustrate how to use
Data Miner.
The example uses a hypothetical 30-source test subset, not the entire PSDB. The 30-source test
subset includes multiple facilities, sources, source types, contaminants, and emission rates. It is
representative of the PSDB and the information needs that Data Miner users typically demand.
The following table presents the 30-source test set.
No.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
UPN
JEOF01W
JEOF011
JEOFOOU
JEOFOOO
JEOF01K
JEOF01X
JE4D028
JE4D021
JE4D025
JE4D001
JE4D01H
JE4D01P
JE1500S
JE15015
JE15017
Type
FLARE
FUGITIVE
FUGITIVE
STACK
STACK
STACK
FUGITIVE
FUGITIVE
FUGITIVE
STACK
STACK
STACK
FLARE
FUGITIVE
FUGITIVE
Introduction
1 -3
-------
Data Miner User's Manual
No.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
UPN
JE15014
JE1504P
JE15036
JE110D3
JE1104E
JE110ED
JE11027
JE1105
JE11004
JEOSOOS
JEOS009
JEOSOOJ
JEOS001
JEOS002
JEOSOOS
Type
STACK
STACK
STACK
FLARE
FUGITIVE
FUGITIVE
STACK
STACK
STACK
FLARE
FUGITIVE
FUGITIVE
STACK
STACK
STACK
This manual uses the Data Miner Data Organizer Editor to construct a view linking the following
seven tables to produce an emissions inventory containing the data elements necessary to
support modeling, attribution analysis, and solutions tracking.
AC_ACCOUNT
CCD_COUNTYCODE
CE_CURR_EMISS
CN_CONTAM_NAM
FC_FACILITY
FB_PT_FC_INDX
PN_POIN_NAME
PT POIN
Introduction
1 -4
-------
Installing Data Miner
2
This chapter guides you through the basic steps for installing Data Miner. In this chapter, you will
learn to:
Install Data Miner
Install the InterBase Server
Installing Data Miner
Perform the following steps to install Data Miner.
Step 1 Unzip the DataMiner.zip file.
Step 2 Double-click on the setup.exe file. The installation program sets up the Windows
Installer on your system.
InstallShield Wizard
RAl MI T ools-D ataM iner S etup is preparing the I nstallS hield Wizard
which will guide you through the program setup process. Please
wait.
Checking Windows(R) Installer Version
I
Cancel
Installing Data Miner
2- 1
-------
Data Miner User's Manual
Step 3 Once the Install Shield Wizard completes its configuration, it displays a window similar
to the following.
InstallShield
| 11 Setup has completed configuring the Windows
Installer on your system. The system needs to be
restarted in order to continue with the installation.
Please click Restart to reboot the system.
Restart
Step 4 If prompted, restart your computer to continue the installation.
Step 5 The RAIMI Tools-DataMiner InstallShield Wizard starts. Click Next to continue the
installation.
IJc RAIMI Tools-DataMiner - InstallShield Wizard
Welcome to the InstallShield Wizard for RAIMI
Tools-DataMiner
The InstallShield(R) Wizard will install RAIMI Tools-DataMiner
on your computer. To continue; click Next.
WARNING: This program is protected by copyright law and
international treaties.
Next >
Cancel
Installing Data Miner
2-2
-------
Data Miner User's Manual
Step 6 Enter your user name and organization and click Next.
Customer Information
Please enter your information
< Back | Next > \
Cancel
Step 7 The Data Miner installation defaults to the RAIMI Tools-DataMiner folder. Click Change
to change to a different folder. Once you select the correct folder, click Next.
j^ RAIMI Tools-DataMiner - InslallShield Wizard
Destination Folder
Click Next to install to this folder, or click Change to install to a different folder,
Install RAIMI Tools-DataMiner to:
C:\RAIMI Tools-DataMiner\
Installing Data Miner
2-3
-------
Data Miner User's Manual
Step 8 Confirm the summary information is correct and click Install. If any information is not
correct, click Back to correct the information and continue the installation.
if? RAIMI Tools-DataMiner - InstallShield Wizard
||
*.*.
Ready to Install the Program
The wizard is ready to begin installation.
If you want to review or change any of your installation settings, click Back. Click Cancel to
exit the wizard.
Current Settings:
Setup Type:
Destination Folder:
C:\RAIMI Tools-DataMiner\
User Information:
Name: J. Butler
Company: U.S. EPA
-------
Data Miner User's Manual
Step 10 Once the InstallShield Wizard copies all the files to your computer, click Finish to
complete the installation.
|f RAIMI Tools DalaMiner - InstallShield Wizard
InstallShield Wizard Completed
The InstallShield Wizard has successfully installed RAIMI
Tools-DataMiner. Click Finish to exit the wizard.
Finish
Cancel
Installing the InterBase Server
Before you can use Data Miner, you must install the InterBase server on your computer. The
InterBase Server installation is part of the Data Miner installation.
Note: For more information on installing and working with the Interbase server, see the
InterBase documentation.
To install InterBase, perform the following steps.
Step 1 Once you install Data Miner, the installation process prompts you to install InterBase.
Click Yes to continue the installation.
InstallShield Self-extracting EXE
Fhis will install Interbase Server. Do you wish to continue?
f Yes l| No
Installing Data Miner
2-5
-------
Data Miner User's Manual
Step 2 Ensure you have no other programs running and click Next.
Interbase Server - InstallShield Wizard
InstallShield
Welcome to the Interbase Server Setup program. This program
will install Interbase Server on your computer.
It is strongly recommended that you exit all Windows programs
before running this Setup program.
Click Cancel to quit Setup and then close any programs you have
running. Click Next to continue with the Setup program.
WARNING: This program is protected by copyright law and
international treaties.
Unauthorized reproduction or distribution of this program, or any
portion of it, may result in severe civil and criminal penalties, and
will be prosecuted to the maximum extent possible under law.
< Back
Next>
Cancel
Step 3 The InterBase installation defaults to the Interbase folder. Click Change to change to a
different folder. Once you select the correct folder, click Next.
Interbase Server - InstallShield Wizard
InstallShield
Setup will install Interbase Server in the following directory.
To install to this directory, click Next.
To install to a different directory, click Browse and select another
directory.
You can choose not to install Interbase Server by clicking Cancel
to exit Setup.
Destination Directory
c:\lnterbaseServer
Browse...
< Back |[ Hext">""n| Cancel
Installing Data Miner
2-6
-------
Data Miner User's Manual
Step 4 Confirm the summary information is correct and click Install. If any information is not
correct, click Back to correct the information and continue the installation.
Interbase Server - InstallShield Wizard
Setup has enough information to start copying the program files.
If you want to review or change any settings, click Back. If you
are satisfied with the settings, click Next to begin copying files.
Current Settings:
Setup Type:
Complete
Target Folder
c:\lnterbaseServer
User Information
Name: Janet Butler
Company:
J
LiJ
< Back
Next>
Cancel
Step 5 Click Finish to complete the InterBase installation.
Interbase Server - InstallShield Wizard
Setup has finished installing the application on your computer.
You may launch the application by selecting the icons installed.
Click Finish to complete Setup.
InstallShield
11 Finish jj
Installing Data Miner
2-7
-------
Data Miner User's Manual
Installing Data Miner
2-8
-------
Starting Data Miner 3
This chapter guides you through the basic steps for starting Data Miner. In this chapter, you will
learn to:
Start Data Miner
Open a dataset
Navigating Data Miner
Starting Data Miner
Perform the following steps to start Data Miner.
Step 1 Double-click on the Data Miner icon, if you have created a shortcut on the desktop, or,
from the Windows Start menu, choose:
Programs > Data Miner
Starting Data Miner
3- 1
-------
Data Miner User's Manual
The About dialog box appears.
Data Miner
Data Miner Interface
EPA Region 6
Multimedia Planning and Permitting Division
Center for Combustion Science and Engineering
\About ^Team ii Technical Support JlWeb ii Register /
Step 2 Click OK. The Data Miner interface main window appears.
f Data Miner
File Help
Open
Help
Starting Data Miner
3-2
-------
Data Miner User's Manual
Opening a Dataset
Once you start Data Miner, you must open a dataset. Perform the following steps to open a
dataset.
Step 1 Select File I New or click on the Open button to display the Open dialog box.
TTx"
Look in: _j| RAIMI Tools-DataMiner
File name: |PSDB.gdb
Files of type: IB D atabase Files (". gdb)
Step 2 Specify the name and location of the dataset (*.gdb file) you wish to use. Use the Open
menu to locate the file PSDB.gdb, highlight it and click the Open button.
Data Miner returns you to the main window. The remaining toolbar buttons, which were
shaded out before, are now active.
f Data Miner - [PSDB.gdb]
File Help
Open Tables Links
Help
Starting Data Miner
3-3
-------
Data Miner User's Manual
Navigating Data Miner
Data Miner has three principal components:
The main window that provides access to the principal tools
w
The Data Organizer Editor ( Lints ), a tool that allows you to:
Create or delete Views of the Tables contained in the database
Add and remove Tables from the Views
Add and remove Fields to be displayed under the Tables
The Query Builder ( Tjt'''), a tool that allows you to compose SQL Queries with a
few mouse clicks
In this section, you will learn how to navigate Data Miner's main components:
The main window
The menu bar
The toolbar buttons
The Main Window
Data Miner's window components follow the standard Windows features. For more information
on standard Windows commands, see your Microsoft Windows documentation.
Starting Data Miner
3-4
-------
Data Miner User's Manual
The following figure highlights the components of the Data Miner main window.
Cantnol Menu box
and Title bar
Menu bar
Data Miner - [PSDB.gdb
File Help
Toolbar
Close
Maximize
Minimize
Open Tables Links
Help
The following table lists the components of the Data Miner window.
Window Component
Control Menu box
Title Bar
Minimize button
Maximize/Restore button
Close button
Menu bar
Toolbar buttons
Description
Displays the options: Move, Size, Minimize, Maximize,
and Close
Displays the program name (Data Miner) and the full path
and name of the project file currently in use.
Minimizes the Data Miner window.
Maximizes the Data Miner window to occupy the entire
screen or restores its pre-maximized size and position.
Closes Data Miner.
Displays menu names. To open a menu, move the
mouse over the menu name and press the left mouse
button. A drop-down menu appears displaying a list of
related commands.
Series of shortcut buttons that provides fast selection of
some of the menu commands.
Starting Data Miner
3-5
-------
Data Miner User's Manual
The Menu Bar
To access the menu bar, click on the File menu, or press Alt-F.
' Data Miner
File Help
Open...
Close
Options...
Exit
.inks
Help
The following table lists descriptions of each menu bar command option.
Menu Bar Component
Open
Close
Open Tables
Set Links
List of Files
Exit
Description
Displays the dialog box in which you specify the name
and location of the *.gdb file you wish to access for
information.
Closes a *.gdb file that is already open.
Opens the list of Tables and Views available for query.
Select one and click OK to launch the Query Builder.
Opens the dialog box in which you can:
Add or remove links between the Tables and
Views, Master Fields and Lookup Fields
Create or remove Views
Edit the name of the currently selected Table
Contains a list of up to four of the most recently used
*.gdp files.
Closes the Data Miner program.
Starting Data Miner
3-6
-------
Data Miner User's Manual
Toolbar Buttons
The toolbar buttons are shortcuts to some of the menu items in the drop-down menus. The
following table explains the function of each toolbar button, as well as the equivalent menu
command.
Button
Menu Command
Description
File I Open
Open
Displays the dialog box in which you specify the
name and location of the *.gdb file you wish to
access for information.
File I Open Tables
Tables
Opens the list of Tables and Views available for
query. Select one and click OK to launch the
Query Builder.
File I Set Links
Links
Launches the Data Organizer Editor in which you
can:
Add or remove links between the
Tables and Views, Master Fields and
Lookup Fields
Create or remove Views
Edit the name of the currently
selected Table
Starting Data Miner
3-7
-------
Data Miner User's Manual
Starting Data Miner
3-8
-------
Using the Data Organizer Editor 4
The Data Organizer Editor allows you to view and modify the structure of your dataset. In this
chapter, you will learn to:
Start the Data Organizer Editor
Use the Tables Tab
Use the List of Views
Create or Change a View
Work with the Join and Fields Subtabs
Set Links
Starting the Data Organizer Editor
Perform the following step to start the Data Organizer Editor.
Step 1 Select the menu command File I Set Links or click on the Links toolbar button to start
the Data Organizer Editor.
Using the Data Organizer Editor
4- 1
-------
Data Miner User's Manual
The Data Organizer Editor appears with the Tables tab selected.
F Data Organizer Editor
Tables Views
AC_ACOUNT
ACD_ABATECODE
API AB FC INDX
AFS AIR PGM
AFT_ACCT_FUEL
API AB PT INDX
CA_CDS_ACCOUNTS
CC COMPL CODE _
CCD_COUNTYCODE
CF CDS FACILITIES
CN CONTAM NAM
CP_CMPLAINT
FA FORMAL ACT
FC_FACILITY
FF FLARE FD
FP_PT_FC_INDX
FU FC FUEL
HAP PCLS VALUES
ISI_IV_SI_INDX T 1
Table Alias: |
|l Apply i|
Field Name
bm^
AB_CIN
AB_MAKE
AB_MODEL
AB_ABATE_CODE
AB_ABATE_ID
AB_NO_OF_UNITS
AB_VOC_EFF
AB_NOX_EFF
AB_CO_EFF
AB_S02_EFF
AB_TSP_EFF
AB_PM10_EFF
AB_PCNT_TMOFF
AB_TUT_HUUFIS
AB_IM_SCHED
AB_CREATE
AB_UPDATE
Lookup Field
Master Field
Visibility
W
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
r Sort Fie
Cancel
Alias
ds
OK
The Tables Tab
The Tables Tab appears when you open the Data Organizer Editor. The Tables tab enables you
to establish certain conventions for viewing and accessing the information in a table. These
conventions, which include field aliases, lookup fields, and visible fields, will apply whenever the
data table is accessed.
Using the Data Organizer Editor
4-2
-------
Data Miner User's Manual
When you select the Tables tab, Data Miner displays a two-frame window that displays all of the
Tables in the database.
Data Organizer Editor
Tables Views
AC_ACOUNT
4CC AC COMMENT
ACD_ABATECODE
^Fl AB FC INDX
AFS AIR PGM
AFT_ACCT_FUEL
API AB PT INDX
CA_CDS_ACCOUNTS
CC COMPL CODE _
CCD_COUNTYCODE
CF CDS FACILITIES
CN CONTAM NAM
CP_CMPLAINT
FA FORMAL ACT
FC_FACILITY
FF FLARE FD
FP_PT_FC_INDX
FU FC FUEL
HAP PCLS VALUES
ISI_IV_SI_INDX T I
Table Alias: \
lo^ol
Field Name
EEEM^
AB_CIN
AB_MAKE
AB_MODEL
AB_ABATE_CODE
AB_ABATE_ID
AB_NO_OF_UNITS
AB_VOC_EFF
AB_NOX_EFF
AB_CO_EFF
AB_S02_EFF
AB_TSP_EFF
AB_PM10_EFF
AB_PCNT_TMOFF
AB_TOT_HOURS
AB_IM_SCHED
AB_CREATE
ABJJPDATE
Lookup Field
Master Field
Visibility
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
F
|~~ Sort Fie
Cancel
Alias
:is
OK
To modify information in the Tables tab, perform the following steps.
Step 1 To edit an Alias, select the Table in the list and enter the changes in the text window of
the lower toolbar.
Table Alias: |
Step 2 Use the Sort Fields checkbox to alphabetize the Fields list.
Step 3 To assign a lookup field to a field in the active table, highlight the column, click on the
ellipse (...), and select the table and field from the pull down list.
Step 4 To assign a master field to a field in the active table, highlight the column, click on the
ellipse (...), and select the table and field from the pull down list.
The Views Tab
The Views tab lists the views for the data base. A View is a group of linked data tables within the
data base being operated on. The view should contain all the data fields that you want to query
on.
Using the Data Organizer Editor
4-3
-------
Data Miner User's Manual
To work with the Views tab, perform the following steps.
Step 1 Click on the Views tab to switch to the Views for the emissions characterization dataset.
r Data Organizer Editor
Tables Views |
The toolbar at the bottom of the Data Organizer Editor window, which appears under both tabs,
contains three buttons with the following functions:
Button
Save
Cancel
OK
Function
Saves changes made using the Data Organizer Editor.
Closes the Data Organizer Editor and returns you to the
main window without affecting any changes.
Closes the Data Organizer Editor and returns you to the
main window with changes.
Using the List of Views
The Views window consists of two sections: the List of Views on the left and the Join/Fields
subtabs on the right. The List of Views section is where you add, delete, rename, import, or
export Views. To import, export, or rename, right click in this area.
Using the Data Organizer Editor
4-4
-------
Data Miner User's Manual
Importing a View
Perform the following steps to import a view file (.vef) into Data Miner.
Step 1 Right click in the List of Views section and select Import View.
f Data Organizer Edit
Tables Views
Step 2 Data Miner 1.0 includes one sample view, "PSDB Standard Query.vef". This view links
the PSDB tables that provide the necessary information for air dispersion and risk
modeling, in addition to supporting source and emissions information. Select the .vef
file name and click Open.
Import a View from File
Files of type: |View Export Files (x.vef)
Using the Data Organizer Editor
4-5
-------
Data Miner User's Manual
Step 3 The new view appears highlighted in the List of Views window.
Tables Views
List of Views:
AC_ACOUNT
CCD_COUNTYCODE
CE_CURR_EMISS
CN_CONTAM_NAM
FC_FACILITY
FP_PT_FC_INDX
PN_POIN_NAME
PT POIN
ACOUNT .AC_ACCOUNT
ACOUNT .AC_EPA_COUNTY
CURR_EMISS .CE_CONTAMCODE
FACILITY .FC FAC ID
FC_FACII_ITY .FC_ACCOUNT
FP PT FC INDX.FP ACCOUNT
FP PT FC NDX.FP PONT D
FP FT FC NDX.FP ACCOUNT
FP PT FC NDX.FP PONT D
FP PT FC NDX.FP FAC D
AC_ACOUNT.AC_ACCOUNT
PT_POIN.PT_POINT_ID
PT POIN.PT ACCOUNT
The List of Views frame contains the following buttons:
Button
Add
Delete
Create
Function
Creates a new View.
Removes Views that you
Appears only in case of a
no longer need.
special-structure file.
Creating a New View
To create a new view, perform the following steps.
Note: To create or modify a View, you must be very familiar with the data dictionary to know
which data fields are in each table and how to link the tables together. If you are
modifying a view for the PSDB, refer to the PSDB data dictionary.pdf on the Data Miner
distribution CD.
Using the Data Organizer Editor
4-6
-------
Data Miner User's Manual
Step 1 Click the Add button in the List of Views. The New View window appears.
New View.
Enter view name:
OK
Cancel
Step 2 Enter the name of the new view and click OK.
Step 3 After saving the names of the view, you must select tables and create join conditions to
actually create the view.
Exporting a View
It is recommended that you make a copy of a View before changing it. To make a copy, perform
the following steps.
Note: Data Miner saves the open view when you close the Data Organizer Editor using the
OK button on the bottom right corner of the window. Once you close the view in this
manner, it is not possible to restore the original view. To modify a view but keep the
original without changes, you must export the view and save it with a new file name,
then import the view back into Data Miner.
Step 1 Right click in the List of Views section.
|- Data Organizer Editor
| Fields |
Table List:
AC.ACOUNT
CCD.COUNTYCODE
CE_CURR_EMISS
CN_CONTAM_NAM
FC.FACILITY
FP_PT_FC_INDX
PN_POIN_NAME
PT_POIN
Join jjriclitiun-:
AC_ACOUNT.AC_ACCOUNT
AC_ACOUNT.AC_EPA_COUNTY
CE_CURR_EMISS.CE_CONTAMCODE
FC_FACILITY.FC_FACJD
FC_FACILITY.FC_ACCOUNT
FP_PT_FC_INDX.FP_ACCOUNT
FP_PT_FC_INDX.FP_POINT_ID
FP_PT_FC_INDX.FP_ACCOUNT
FP_PT_FC_INDX.FP_POINT_ID
FP_PT_FC_INDX .FP_FAC_ID
AC_ACOUNT.AC_ACCOUNT
PT_POIN.PT_POINT_ID
PT_POIN.PT_ACCOUNT
Apply
Cancel
OK
Using the Data Organizer Editor
4-7
-------
Data Miner User's Manual
Step 2 Select Export View.
Step 3 Specify the file name and click Save.
Export selected View to File..
Save jn: | _j| RAIMI Tools-DataMiner T]
_|PSDB Standard Query.vef
File name: |PSDB Standard Query Backup!
Saveastype: |View Export Files (".vef)
Adding Tables to a View
When you add tables, you must link them to similar data fields in other tables to ensure the View
works properly. To add tables to a View, perform the following steps.
Step 1 Open or create the view you want to work with.
Step 2 Click the Add button at the bottom of the Table List in the Join tab. The Select Table for
the View window appears.
'- Select Table for the View.
>
Table Name ^
AB ABATEMENT
AC_ACOUNT
ACC_AC_COMMENT
ACD_ABATECODE
ACH_ACTUAL_HST
AFI_AB_FC_INDX
AFS_AIR_PGM
AFT_ACCT_FUEL
ALH_ALLCW_HST
API_AB_PT_INDX
CA_CDS_ACCOUNTS
CAC_COMPL_CHRON
CC_COMPL_CODE
CCD_COUNTYCODE
CE_CURR_EMISS
CF_CDS_FACILITIES
+.
Dictionary
z\
Cancel
Using the Data Organizer Editor
4-8
-------
Data Miner User's Manual
Step 3 Select a table for the view and click OK.
Step 4 Create the links in the Join Conditions tab by selecting a field from one table and
selecting a similar field from another table. For more information, see the Join Subtab
section.
Note: For the sample scenario, the PSDB data dictionary specifies the required links.
Erroneous data will result from queries made with improperly linked tables in a View.
Step 5 Select the Fields tab. This tab displays all the data fields available from the linked
tables in a View.
F Data Organizer Editor
Tables Views ]
Add... Delete
join Fields |
Field Name
^B^^^BBBBB
AC_ACOUNT.AC_REGION
AC_ACOUNT.AC_CONTROL_PRG
AC_ACOUNT.AC_FIRSTJ2
AC_ACOUNT.AC_LAST_24
AC_ACOUNT.AC_SITENAME
AC_ACOUNT.AC_CLAS
AC_ACOUNT.AC_PRNCPL_BSNSS
AC_ACOUNT.AC_OWNERSHIP_TYPE
AC_ACOUNT.AC_CONTACT_NAME
AC_ACOUNT.AC_CONTACT_TITLE
AC_ACOUNT.AC_MAIL1
AC_ACOUNT.AC_MAIL2
AC_ACOUNT.AC_MAILZIP
AC_ACOUNT.AC_PHONE
AC_ACOUNT.AC_EPA_ACCOUNT
AC ACOUNT.AC SIC CODE1
±LJ
Lookup Field
Apply Cance
Master Field ~~-
£
n «
Step 6 Include or exclude specific data fields by checking or unchecking the Visibility
checkbox.
Step 7 To rename a field, enter the new name in the Alias column.
Step 8 Click OK to save your changes.
Working with the Join and Fields Subtabs
The Views window contains two subtabs: Join and Fields.
Using the Data Organizer Editor
4-9
-------
Data Miner User's Manual
Join Subtab
The Join Subtab allows the user to add or change tables to a view and to change the join
conditions that define the data relationships between tables. When you select this tab, the Table
List appears in the center frame. Use the Add button to add a Table to the selected View and the
Remove button to remove a selected Table from the selected View.
To the right is a frame labeled Join Conditions, which has two columns, "Field 1" and "Field 2."
Join Conditions establish the relationships between the tables that appear in the "Table List." To
access information in a table, that table must be linked to other tables in the list through the Join
Conditions. For the PSDB, the file "PSDB Data Dictionary.pdf" describes the tables, fields, and
relationships for this database. You may change the fields associated with the Tables listed in the
center frame.
Join
Fields
Table List:
|AC_ACOUNT
CCD_COUNTYCODE
CE CURR EMISS
CN_CONTAM_NAM
FC_F AGILITY
FP PT FC INDX
PN POIN NAME
PT_POIN
I
Add...
4
4
I
Join conditions:
Field 1
AC_ACOUNT . AC_ACCOUNT
AC_ACOUNT.AC_ACCOUNT
AC_ACOUNT.AC_EPA_COUNTY
CE_CURR_EMISS .CE_CONT AMCODE
FC_FACILITY.FC_FAC_ID
FC_FACILIT Y .FC_ACCOUNT
FP_PT_FC_INDX .FP_ACCOUNT
FP_PT_FC_INDX.FP_POINT_ID
FP_PT_FC_INDX .FP_ACCOUNT
FP_PT_FC_INDX.FP_POINT_ID
FP_PT_FC_INDX .FP_F ACJD
AC_ACOUNT.AC_ACCOUNT
PT_POIN.PT_POINT_ID
PT POIN.PT ACCOUNT
-------
Data Miner User's Manual
Step 2 Click on the ellipse (...) The Choose a Field for Join Field window appears.
' Choose a Field for Join Field..
Step 3 Double-click on the table you want to select, or click on the "+" expand button.
g ' Choose a Field for Join Field..
I g-|p AC.
AC_REGION
AC_CONTROL_PRG
AC_FIRST_12
AC_LAST_24
AC_SITENAME
n AC_CLAS
AC_PRNCPL_BSNSS
AC_OWNERSHIP_TYPE
AC_CONTACT_NAME
AC_CONTACT_TITLE
Ol AC_MAIL1
n AC_MAIL2
AC_MAILIIP
AC_PHONE
AC_EPA_ACCOUNT
AC_SIC_CODE1
AC_SIC_CODE2
CD AC EPA CITY CODE
Step 4
Steps
Step 6
Step?
Double-click on the field you want to select, or highlight it and click OK.
Join the selected field in the Field 1 column to a table and field in the same row of the
Field 2 column by repeating steps 2 through 4, selecting the appropriate table name
and field name.
Continue this series of steps for the joined tables and fields.
Click OK.
Using the Data Organizer Editor
4- 11
-------
Data Miner User's Manual
Step 8 When you finish with the Data Organizer Editor, select one of the following:
Click Save to keep changes that you made to the links between Views, Tables and
Fields.
Click Cancel to return values to their original state when you started.
Click OK to keep your changes in effect until you shut down the Data Organizer
Editor.
Step 9 Data Miner returns you to the main window.
Field Subtab
When you select the Field tab, Data Miner replaces the center and right frames with a single
frame containing five columns that list the fields and the Views in which they are included
Join Fields |
The following table describes each column in the Field tab.
Field Name
AI:_AI::IJ u N T AL_R E G i o N
AC_ACO U N T .AC_CO N T R 0 L_PR G
AC_ACOUNT.AC_FIRSTJ2
AC_ACOUNT.AC_LAST_24
AC_ACOUNT.AC_SITENAME
AC_ACOUNT.AC_CLAS
AC_ACOUNT.AC_PRNCPL_BSNSS
AC_ACOUNT.AC_OWNERSHIP_TYPE
AC_ACOUNT.AC_CONTACT_NAME
AC_ACOUNT.AC_CONTACT_TITLE
AC_ACOUNT.AC_MAIL1
AC_ACOUNT.AC_MAIL2
AC_ACOUNT.AC_MAILZIP
AC_ACOUNT.AC_PHONE
AC.ACO U N T .AC_E PA.ACCO U N T
AC_ACOUNT.AC_SIC_CODE1
AC_ACOUNT.AC_SIC_CODE2
AC.ACO U N T .AC_E PA_CI TY_CO D E
AC.ACO U N T .AC_E PA_CO U N TV
AC.ACO UNT.ACJ.OCZIP
AC_ACOUNT.AC_NEARCITY
Lookup Field
Mattel Field
Visibility
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
r
Alias
Column
Field Name
Lookup Field
Master Field
Description
Lists field names
selected View.
associated with the Tables in the
Not used.
Not used.
Using the Data Organizer Editor
4- 12
-------
Data Miner User's Manual
Column
Visibility
Alias
Description
A check in the "Visibility" field indicates that data from this
field will be visible when you run a query, and that Data
Miner will extract this data when saving a queried
dataset.
Allows you to specify a more meaningful name for the
Field Name. Data Miner will export the Alias as a column
header.
Using the Data Organizer Editor
4- 13
-------
Data Miner User's Manual
Using the Data Organizer Editor
4- 14
-------
Running a Query 5
You can run sophisticated queries using Data Miner. In this chapter, you will learn to:
Select Tables and Views to include in your query
Compose a Query
Work with the .cfg File
Selecting Tables and Views
Perform the following steps to select Tables and Views to include in your query.
Step 1 In the Data Miner main window, select the File I Open Tables menu command or click on
the Tables toolbar button.
Running a Query
5- 1
-------
Data Miner User's Manual
The Select Tables and Views to open dialog box appears. The names appearing in the
list include both the names of created Views and any Aliases assigned to Tables.
Select Tables and Views to open.,
Table List:
AB_ABATEMENT
AC_ACOUNT
ACC_AC_COMMENT
ACD_ABATECODE
ACH_ACTUAL_HST
AFI_AB_FC_INDX
AFS_AIR_PGM
AFT_ACCT_FUEL
ALH_ALLOW_HST
API_AB_PT_INDX
CA_CDS_ACCOUNTS
CAC_COMPL_CHRON
CC_COMPL_CODE
CCD_COUNTYCODE
CE CURR EMISS
Cancel
OK
Step 2 Select a View or Table and click OK. The Query Builder dialog box appears.
f Query Builder -[AC.ACOUNT]
Fields
IjAcJicCOUNT
AC REGION 1
AC CONTROL PRO
AC_FIRST_1 2
AC LAST 24
AC_SITENAME t
AC CLAS _rj
Values
OR
NOT
O
^
AC_ACCOUNT L±l
900029G I
900034N
900094S
9001 09H
9001 21 R
9001 28D _rj
jj Apply |
T| Close
The Query Builder window contains all the selected fields on the left, the operating
symbols in the center, and all the data values for the selected field on the right. The
actual query is in the field at the lower left of the window.
Running a Query
5-2
-------
Data Miner User's Manual
Composing a Query
Queries take the form:
[field_name] operation_sign ['value']
Multiple strings have 'AND', 'OR', or 'NOT' between them.
Note: Aliases appear as field names if you assigned aliases earlier.
Perform the following steps to compose a query.
Note: If you have used the Query Builder before, the previous query statement will appear in
the text box. You can delete the existing Query statement in the text box (the lower
frame) by highlighting + CTRL-X or by using the Delete or Backspace keys.
Step 1 Select a Field in the upper left frame by double-clicking. The Field name appears in the
text box below.
Note: You can type the query directly into the box rather than clicking on field names,
operators and ranges.
Step 2 Select an operator with a single click on the "equals" button (=) in the center frame. The
"equals" sign appears in the text box after the Field name.
Step 3 Select the desired information by double-clicking on a Values entry in the right frame.
This text appears in the text box after the "equals" sign.
Note: When you launch Query Builder, the Report window opens at the same time, but the
Query Builder dialog box is in front of it. When you run a Query, the requested data
appears in the Report window. However, you must close the Query Builder dialog box
before you can work with the Report window.
Step 4 Once you build the query, click Apply.
Step 5 To cancel the query, click Close while the query is running.
Step 6 When Data Miner completes the query, click Close.
Query For 30-Source Example
Specify a query that selects all of the following:
the 30-source test set
stack or flare sources
emission rate records greater than 1 ton per year (tpy)
emission rate records less than 5 tpy
Running a Query 5 - 3
-------
Data Miner User's Manual
This query would look like the following:
((Unique_point_name = 'JEOF01W) OR
(Unique_point_name = 'JEOF011') OR
(Unique_point_name = 'JEOFOOU') OR
(Unique_point_name = 'JEOFOOO') OR
(Unique_point_name = 'JEOF01K') OR
(Unique_point_name = 'JEOF01X') OR
(Unique_point_name = 'JE4D028') OR
(Unique_point_name = 'JE4D021') OR
(Unique_point_name = 'JE4D025') OR
(Unique_point_name = 'JE4D001') OR
(Unique_point_name = 'JE4D01H') OR
(Unique_point_name = 'JE4D01P') OR
(Unique_point_name = 'JE1500S') OR
(Unique_point_name = 'JE15015') OR
(Unique_point_name = 'JE15017') OR
(Unique_point_name = 'JE15014') OR
(Unique_point_name = 'JE1504P') OR
(Unique_point_name = 'JE15036') OR
(Unique_point_name = 'JE110D3') OR
(Unique_point_name = 'JE1104E') OR
(Unique_point_name = 'JE110ED') OR
(Unique_point_name = 'JE11027') OR
(Unique_point_name = 'JE11005') OR
(Unique_point_name = 'JE11004') OR
(Unique_point_name = 'JEOSOOS') OR
(Unique_point_name = 'JEOS009') OR
(Unique_point_name = 'JEOSOOJ') OR
(Unique_point_name = 'JEOS001') OR
(Unique_point_name = 'JEOS002') OR
(Unique_point_name = 'JEOS003'))
AND
((Pnt_Type = 'ST') OR (Pnt_Type = 'FL'))
AND
(Actual_Annual > '1')
And
(Actual_Annual < '5')
Working with Sample Queries
The following queries are additional example queries you can use with Data Miner.
Note: These queries will work with the sample view provided on the Data Miner Version 1.0
CD.
Running a Query 5 - 4
-------
Data Miner User's Manual
Dallas County Emissions Greater Than Zero Tons Per Year
(CCD_COUNTY_NAME = 'DALLAS') AND (Actual_Annual > '0')
Note: Queries are not case specific, except for the data strings, such as 'DALLAS'. Also, the
CCD_COUNTY_NAME field was not made visible in the view, but the field can still be
used in a query.
Statewide Query For Benzene Emissions Greater Than 5 Tons Per Year
(Contam_Name = 'BENZENE') AND (Actual_Annual > '5')
Note: 'Contam_Name' is an alias for "CN_CONTAM_NAME". This alias was defined in the
data organizer editor. Also, there may exist various spellings or multiple names for
individual chemicals. For the PSDB, it may be better to query based on Chemical
Abstract Service Number or the contaminant code assigned by the State of Texas.
These values are related in the table CN CONTAM NAM.
All Emissions From An Individual Source
Unique_Point_Name = 'JEOF01W
Working with the .cfg File
Data Miner remembers the last query run for each view by storing the query as a text string in a
configuration (.cfg) file for the database (for example, PSDB.cfg). Data Miner limits the size of the
CFG to approximately 1800 lines of text, or approximately 64KB. If the .cfg file size is exceeded,
Data Miner may not access that view. In this event, you can edit the .cfg file with a text editor to
remove unnecessary lines of text containing either unused views or old queries.
Running a Query
5-5
-------
Data Miner User's Manual
Running a Query
5-6
-------
The Report Window 6
Once you compose a query, you can generate a report for that query. In this chapter, you will
learn to:
Navigate the Query Report window
Save a Query Report
The Report Window
6- 1
-------
Data Miner User's Manual
Navigating the Query Report Window
The Query Report window is divided into an upper and a lower frame. The lower frame shows the
Query that Data Miner executed to extract the data shown in the upper frame.
p Data Miner - [Actual History - Statewide]
Query Builder Legend
Save Data
Search by:
[AC ACCOUNT
M for
AC FIRST 12
AC LAST 24
SOUTHERN MA UFACTURINO CO
SOUTHERN MA UFACTURIN'
SOUTHERN MA UFACTURINO CO
SOUTHERN MA UFACTURII
SOUTHERN MA UFACTURINO CO
SOUTHERN MA UFACTURING C
SOUTHERN MA UFACTURING CO
(AC_ACCOUNT = 'JE0168B1)
AND
(ACH_ACTUAL >= '1')
AND
(CN_CONTAM_NAME = 'STYRENE')
FC FIN
STK1
FC SCC CODE
PT
30501299
1501299
30501299
30501299
30501299
1501299
30501299
STK1
STK2
STK1
STK2
STK1
STK2
STK1
Apply
Close
The following table lists the components of the Report window.
Component
Control Menu box
Title bar
Minimize button
Maximize/Restore button
Description
Displays the options: Move, Size, Minimize, Maximize and
Close.
Displays the program name (Data Miner Report) and
between brackets, the full path and name of the project
file currently in use.
Minimizes the Data Miner window.
Maximizes the Data Miner window to occupy the entire
screen or restores its pre-maximized size and position.
The Report Window
6-2
-------
Data Miner User's Manual
Component
Close button
Data window
Query Statement field
n
Query Builder
Query Builder button
1 i 1
Legend
Legend button
Save Data
Save Data button
Description
Closes Data Miner.
Displays the records you extracted from the database
with your Query statement.
Displays your Query statement.
Launches the Query Builder.
Opens a box that displays the name of the View or Table
that is the subject of the Query Report. Use this button if
another window should happen to overlap the title bar
and cover this information.
Allows you to save the data in the Report as a comma-
separated text file (*.csv) or a Microsoft Access database
file (*.mdb) for further use.
Sorting Query Results
You can sort query results in the Report window. Click on the appropriate column header to sort
query results based on a specific field (column).
Resizing the Lower Frame
Since the lower frame requires only a single line for the Query, you may wish to reduce its size to
make more room for the data display. To do this, position the cursor on the frame border so that a
vertical arrow with a point on either end appears. Click and drag the frame to the desired height.
Saving a Query Report
To save the data, perform the following steps.
The Report Window
6-3
-------
Data Miner User's Manual
Step 1 Click the Save Data button. The Save data in external file window appears.
Save Data in external File
Save in: | HO DataMiner
Ji I mages!
File name:
S ave as type: CSV Files (K. csv
Save
Cancel
Step 2 Navigate to the directory where you want to save the data.
Step 3 Select the type of file (.csv or .mdb) in the Save as type field.
Step 4 Type in the appropriate file name and click save.
Save Data in external File.
Save in:
DataMiner
\ Image
File name: |state_history
Save
Saveastype: AccessDBFile(K.mdb)
Cancel
The Report Window
6-4
-------
References 7
U.S. Environmental Protection Agency Solid Waste and Emergency Response, Human Health
Risk Assessment Protocol for Hazardous Waste Combustion Facilities. EPA530-D-98-001A.
U.S. Environmental Protection Agency. Research Triangle Park, NC, July 1998.
References
7- 1
-------
Data Miner User's Manual
References
7-2
------- |