EcoMetriQReference Book

2. Installation, launch and interface

Code: metadata.txt (version, minimum QGIS), ecometriq_plugin.py (menu, toolbar, window), ui/main_dialog.py:145-195 (main window)

2.1 Requirements

Component Requirement Note
QGIS 4.0 or later metadata.txt: qgisMinimumVersion=4.0. The interface uses Qt 6 / PyQt6.
Python Python 3 shipped with QGIS No separate installation needed.
NumPy Optional If present, the KDE grid is computed by the fast path; otherwise a pure Python path is used, and the result is the same (modules/spatial_analysis.py:595).
SciPy Optional If present, the Delaunay triangulation for the alpha shape is done with SciPy; otherwise the plugin's own triangulation is used (modules/spatial_analysis.py:1330-1381).
Matplotlib Required for plots Rarefaction, accumulation and heat map plots are drawn with it; if it is missing, a "matplotlib Error" message is shown.
GDAL For writing KDE as GeoTIFF Ships with QGIS.

All of these libraries are present in standard QGIS 4 installations on Windows, macOS and Linux.

2.2 Installation

  1. In QGIS, open the Plugins › Manage and Install Plugins… window.
  2. In the Install from ZIP tab, select the EcoMetriQ ZIP file and press the Install Plugin button.
  3. In the Installed tab, check that EcoMetriQ is ticked.

For manual installation, copy the EcoMetriQ folder into the python/plugins/ folder of your QGIS user profile. The profile folder is opened with Settings › User Profiles › Open Active Profile Folder. The folder must be named EcoMetriQ and metadata.txt must be directly inside this folder; if there is an extra subfolder, QGIS does not see the plugin.

2.3 Launch

After installation the plugin can be opened from two places (ecometriq_plugin.py:26-49):

The window opens as non-modal: while it is open, the map canvas, the layers panel and the attribute table can be used (ecometriq_plugin.py:54-66). If the window is already open, a second window is not opened; the existing one is brought to the front. When the window is closed and reopened, the same window comes back: the loaded CSV, the parameters entered and the result texts are kept for the duration of the QGIS session. The window is deleted when the plugin is disabled or QGIS is closed; therefore, still save the results by exporting them.

The toolbar button shows the resources/icon.svg icon, a turquoise Q with a leaf (ecometriq_plugin.py:29).

When the plugin is enabled, the Processing algorithms appear in Processing › Toolbox under the provider EcoMetriQ - Biodiversity Metrics & Spatial Analysis (provider ID ecometriq; processing_provider.py:16-31). Details are in Chapter 10.

2.4 Layout of the main window

Figure 2.1. EcoMetriQ main window with the Data Input tab open. At the top, the title and the progress bar (visible while a computation runs); in the middle, eight tabs; at the bottom, the Close button.
Figure 2.1. EcoMetriQ main window with the Data Input tab open. At the top, the title and the progress bar (visible while a computation runs); in the middle, eight tabs; at the bottom, the Close button.

The window opens at a minimum of 1000 × 750 pixels and can be enlarged (ui/main_dialog.py:159). Regions:

Region Content
Title "🌿 EcoMetriQ - Biodiversity Metrics & Spatial Analysis"
Progress bar Appears during long computations (KDE, Gi*, gamma, validation); hidden when the computation finishes (ui/main_dialog.py:2782).
Tabs 📂 Data Input, 📊 Alpha Indices, 📈 Rarefaction, 🔀 Beta Diversity, 🌍 Gamma Diversity, 🗺️ Spatial Analysis, ✅ Validation, 📋 Report (ui/main_dialog.py:179-186)
Close Hides the window. When it is reopened, the data and results are still in place (§2.3).

Most tabs are a scroll area: fields and the result box that do not fit in the window are reached by scrolling down. Some screenshots in this book were taken so as to show the whole tab (the entire scroll area).

2.5 Common behaviors