Interactive 'shiny' GUI for the 'earth' Package
Overview
Provides a 'shiny'-based graphical user interface for the 'earth' package, enabling interactive building and exploration of Multivariate Adaptive Regression Splines (MARS) models. Features include data import from CSV and 'Excel' files, automatic detection of categorical variables, interactive control of interaction terms via an allowed matrix, comprehensive model diagnostics with variable importance and partial dependence plots, and publication-quality report generation via 'Quarto'.
Per-project settings: save / restore
- Model configuration is now keyed by **(project, purpose)** — the data file is no longer part of the key. A project's several input files (a small test extract, the full dataset) share one variable/parameter configuration, so switching files keeps the setup.
get_project_settings()andset_project_settings()lost theirfile_basenameargument accordingly. - **Button-only save.** The "Save current as default" buttons are the save mechanism: the **section 3** button saves the target, effective date, and predictor configuration; the **section 4** button saves the earth call parameters and the Allowed Interactions matrix. Each button updates only its own half (read-merge), so they never clobber each other. **Fit no longer auto-saves** — you can fit experimentally without overwriting your saved default. There is no on-change auto-save.
Show all changes in 0.8.0Hide the rest of the changes in 0.8.0
- Save and restore are **server-side and DB-authoritative**: configuration is written to / read from
projects.sqlitedirectly from the inputs at the render and click, with no localStorage round-trip. This removes a class of restore races and a JSON double-encoding bug that could corrupt a saved row on the next save. - The **Effective Date** field is shown in all purposes (general/CMA and market values have an effective date too, not just USPAP/IVS appraisals); it is still only used to compute
sale_agein appraisal/market modes.
Database durability
projects.sqliteopens in **WAL** journaling mode where supported, for crash-safe writes and non-blocking reads.- The settings-table schema **migration runs in a single transaction** with crash recovery: an interrupted upgrade rolls back to the original table (no orphaned
_old, no half-copied data), and a previously-stranded_oldtable is restored on the next connect. Legacy per-file rows are collapsed to one row per (project, purpose), keeping the most recent.
Bug fixes
- Predicting on raw data with a **Date column as a model predictor** no longer errors ("subscript out of bounds" / column-count mismatch). Newdata is now aligned to the trained frame (
align_to_training_): date columns are coerced to the model's numeric encoding and factor levels are matched. Affects the Intermediate Output and RCA exports. fit_earth()drops a non-zeronewvar.penalty(with a message) when case weights are present, since earth does not support that combination — previously it errored mid-fit (notably in market/appraisal mode where a skipped row is encoded as a zero weight).- Character date columns are parsed with the same multi-format set as
validate_types(), so any column that validates as a date also coerces (no more silent failures onMM/DD/YYYYand similar).
Project model (regProj)
- New first-class **project** concept replaces the old per-file workflow. A project is a stable, named entity at a fixed location in the regProj tree (
<root>/<purpose>/<flat_segment>/<os>_in/...and<os>_out_<method>/...), holding all input files, outputs, and settings together. Files within a project travel as a unit. - Top-of-sidebar Project picker with sort (Recent / A-Z) and a New Project wizard that captures purpose, country, and admin-level cascade with country-specific terminology.
- Path layout is **flat**:
<purpose>/<country>_<state>_<county>_<city>_<project>/<os>_in/<file>. All admin levels concatenated into one segment via_. Reduces depth from 13 to 8 directories under the regProj root. Encoded byregproj_flat_segment(), decoded byregproj_parse_flat(). - Cross-OS multi-leaf scaffold: every project gets
mac_in,mac_out_*,ubuntu_in,ubuntu_out_*,win11_in,win11_out_*siblings. - Active-project model drives output paths automatically. The legacy Output Folder field and Project Location cascade are gone — output folder is set from the active project at session time.
- Section "Import Data" reads from the active project's
<os>_in/; files added manually are picked up via Refresh.
Geo data + variable-depth admin schema
- New
geo.sqlite(in regProj root) replaces the old.regproj-index.json. Two tables:countriesandadmin_entrieswith variable depth via(country, level, parent_codes)index. Supports any number of admin levels per country. - Comprehensive shipped data:
- **US**: 51 states, 3,076 counties, ~21,000 incorporated places (Census).
- **GB / DE / IT / FR / SE**: full GeoNames-derived state / county / city data (~45,000 entries combined).
- **SG**: 1-level (planning area) data for Singapore.
- Total ~70,000 admin entries shipped; users can add more via the cascade's "create new" path.
regproj_index_get/putAPI unchanged for callers, just SQLite-backed now. - DE specifically uses
admin3_code(Kreis) instead of GeoNames'admin2_code(Regierungsbezirk), matching how German appraisers think about administrative geography.
Per-project settings (projects.sqlite)
- New
projects.sqlitein regProj root replaces the user-levelsettings.sqlitefor project model settings. Keyed by(flat_segment, file_basename), separate JSON columns for earth, glmnet, and mgcv settings/variables/interactions. - Public API:
get_project_settings()andset_project_settings()— read/write project settings programmatically without launching the Shiny UI. Designed for ValEngr integration and batch automation. - Settings now travel with the regProj tree (sync, backup, share with colleagues — all settings come too). User-level
settings.sqliteretained only for locale defaults.
Quarto report split: Generate + Convert
- **Section 9 — "Generate Quarto Report"**: writes a self-contained
.qmdbundle (source + plot assets + reference.docx) under<project>/mac_out_earth/<base>_qmd/. No Quarto rendering happens at this step. - **Section 10 — "Convert Quarto Report"**: file picker + format checkboxes (HTML / Word / PDF). Renders any
.qmdfile (not just earthUI-generated) to selected formats. Useful for combining reports across projects via Quarto's{{< include >}}. - New exports:
generate_quarto_report(),convert_quarto_file(). report_data.rdsis now a lean ~hundreds-of-KB asset (down from hundreds of MB) — the bulky earth model object is no longer saved since the qmd reads pre-generated plots from disk.- Quarto
.qmdtemplate now self-renders against a siblingreport_data.rdswhen noparamsare passed, soquarto preview Appraisal_1.qmdworks standalone.
Settings tab
- New "regProj Root Folder" config in the Settings dropdown — set the location of the regProj tree per machine. Persisted in the per-OS prefs file at
R_user_dir("earthUI", "config")/prefs.json. - Resolution order:
REGPROJ_ROOTenv var → prefs file → per-OS default (~/regProjMac/Linux,C:/regProjWin).
Other
- Server startup extends
PATHwith/usr/local/bin,/opt/homebrew/bin, and TinyTeX bin paths so Quarto / pandoc / latex are findable from the Shiny session even when launched from a stripped-PATH context. - Per-session DB connections (one geo, one projects) — eliminates per-render connection overhead.
- Sales Comparison Grid now exported as
build_sales_grid()from the package (extracted from the old inst/app/sales_grid.R). Available to batch scripts and ValEngr.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK7 OK2026-03-12
Documentation
- Help pages
- 65 (2 internal)includes a package overview page
- Examples that run
- 44%12 run in a plain check (1 of them under a condition) · 14 only when donttest examples are enabled (R CMD check --as-cran) · 1 never run
- Exported functions with examples
- 43%
- Documented parameters
- 99%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 0%
- Median days to close, 50 most recently updated closed issues
- not measured
- Median days to close, 50 most recently updated closed PRs
- 7
Forks over time
Releases over time
PRs over time
Commits over time
5 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/wcraytor/earthui on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-02-26Seen in the repository: CLAUDE.mdCommits: at least 66 crediting it in the message
- Claude Opus 4.666 commits · Feb to Apr 2026
Dependencies
Installing earthUI adds 87 packages (45 with compiled code, 81 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.8.0Latest2026-06-02 · current release · diff ↗ ·
added 41 exports
auto_export_for_mgcv, build_sales_grid, city_abbreviation, compute_intermediate_output, compute_rca_adjustments, compute_sale_age, convert_quarto_file, country_choices, country_schema, default_regproj_root, earthui_prefs_path, earthui_prefs_read, earthui_prefs_write, export_settings, generate_quarto_report, get_project_settings, is_project_dir, os_detect, prepare_report_assets, regproj_flat_segment, regproj_geo_db_connect, regproj_geo_db_path, regproj_in_files, regproj_index_get, regproj_index_path, regproj_index_put, regproj_index_read, regproj_index_write, regproj_last_file_get, regproj_last_file_path and 11 more - RR 4.6.0 released · 2026-04-24
- 0.1.32026-03-18 · diff ↗
- 0.1.1first seen 2026-03-11
- RR 4.5.0 released · 2025-04-11
Package metadata
- First seen
- 2026-03-11
- Total releases
- 3 / 1 yrs
- License
- AGPL (>= 3) OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 1.5 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("earthUI")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
The repository also keeps a CITATION.cff.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.