# Planetary Database WebUI User Guide

## 1. Sign in and database partitions

- Sign in with an account password or a valid token.
- A database user can open only authorized partitions and can view, plot, import, and export data.
- A guest account has view and plot access only.
- Password recovery, temporary access, and password reset require an administrator-issued token.

## 2. Plot data

1. Select a database, then choose the X and Y data sections and fields.
2. Select one or more Level 1, Level 2, and Level 3 tags. An empty level does not restrict that level.
3. Use append mode to keep the current chart and add data from the same or another database.
4. Absolute uncertainties stored as `err`, `Error`, `uncertainty`, `1Sigma`, or `2Sigma` are drawn as error bars.
5. Hover over a point to view the sample name, tags, values, and uncertainty information.
6. You can set X/Y limits, switch between linear and logarithmic axes, and add temporary manual comparison points.

## 3. Import data

- Supported formats are `.json`, `.xlsx`, and `.xls`.
- Every import requires an identity or batch stamp for provenance.
- Excel import reads the first worksheet only. The first three rows define the three-level field path.
- Level 1 examples: `Major`, `Trace`, `Isotope`, `Mineral`, `Age`, and `Location`.
- Level 2 contains an element, oxide, isotope system, age, mineral, or coordinate name, such as `MgO`, `La`, `d18O`, or `Latitude`.
- Level 3 contains `Value`, `Unit`, `err`, or `Reference`.
- `err` must contain an absolute uncertainty, not a relative percentage. For `7.257 +/- 0.042 wt%`, enter Value=`7.257`, Unit=`wt%`, and err=`0.042`.
- Common units: `wt%` for major oxides; `ppm` or `ppb` for trace elements; `per mil` or `ratio` for isotopes; `Ma` or `Ga` for ages; `degree` for coordinates; and `m` for elevation.
- Leave missing values blank. Do not enter `0`, `-`, `n/a`, or detection-limit text as numeric values.
- Use a DOI, public URL, or auditable citation in `Reference`.

## 4. Classification levels

Each Classification path uses one Excel column:

```text
Row 1: Classification
Row 2: Lunar basalt
Row 3: A11
Data : Type B crystalline rock
```

Copy that column and change rows 2 and 3 to add another classification path. Fill only the classification column that applies to each sample.

## 5. Convert Excel to JSON

1. Upload the Excel file in Data Import.
2. Select it under Excel to JSON.
3. Enter the identity or batch stamp and output file name.
4. Select Generate. The system adds `.json` when the suffix is omitted.

## 6. Filtered export

1. Select the database.
2. Select Level tags to define the sample subset.
3. Select the fields to export.
4. The export includes the selected values together with units, absolute uncertainties, and references.

## 7. Public example notes

- Apollo 10017 major-oxide data are from NASA SP-214, Table 5-III.
- BHVO-2 major and trace data are from the USGS BHVO-2 Information Sheet. Its tabulated uncertainties are stored as absolute errors.
- The BHVO-2 location uses the public Kilauea summit coordinates from the USGS volcano page. These are site coordinates, not a sample-level GPS measurement.
