Abstract
Introduction earthUI is a graphical user interface for the R earth package, whichimplements Multivariate Adaptive Regression Splines (MARS). It runs as alocal Shiny application — no login, no server, no accounts. You launch itfrom R, import a dataset (CSV or Excel), configure your model, and fit itinteractively. Three Purpose Modes When you launch earthUI, a Purpose radio button at the top of the sidebarlets you choose one of three modes: General — Earth regression for any dataset. The default mode. For Appraisal — Tailored for real estate appraisal with subjectproperty handling, special column designations, RCA adjustments, and SalesComparison Grid generation. Market Area Analysis — For analyzing groups of properties with optionalsubject row exclusion. Getting Started library(earthUI) launch() This opens the Shiny app at http://localhost:7878. Locale & Regional Settings earthUI supports international number, date, and CSV formatting conventionsthrough a country-based locale system. The Country dropdown in Section 1of the sidebar (below the file upload) selects a preset for 31 supportedcountries. Each preset configures: CSV separator — comma (,) for US/UK/Japan or semicolon (;) formost of Europe, where the comma is used as a decimal mark. Decimal mark — period (.) or comma (,). Thousands separator — comma (US/UK/Japan), period (Germany/Italy/Spain),space (Finland/France/Poland/Baltics/Ukraine/Russia), or apostrophe(Switzerland). Date format — MM/DD/YYYY (US), DD/MM/YYYY (most of Europe), orYYYY-MM-DD (Sweden/Lithuania/Japan/Canada). Paper size — Letter (US/Canada/Mexico) or A4 (everywhere else). Override Dropdowns Below the country selector, four override dropdowns let you change individualsettings without switching countries: Paper — Letter or A4 (affects PDF report page size) CSV sep — comma or semicolon (used when importing CSV files) Decimal — period or comma (used in number display on plots and axes) Date — MDY, DMY, or YMD (controls the order in which date formatsare tried when parsing date columns) When you change the country, all overrides reset to that country’s defaults.Changing an override only affects that one setting. Saving Defaults Click Save as my default to store your locale preferences globally. Thesedefaults apply to all future sessions regardless of which data file you load.Per-file settings (target, predictors, parameters) are saved separately inthe browser’s local storage, but locale defaults persist across all files viaan SQLite database. MLS Input Data Requirements For real estate workflows, your input data typically comes from an MLS export.earthUI accepts CSV and Excel files. On import, column names are automaticallyconverted to snake_case, e.g. “Area ID” gets converted to “area_id”. The CSVseparator and decimal mark used during import are determined by the localesettings (see “Locale & Regional Settings” above). Required Columns for Appraisal Mode The full appraisal workflow (RCA + Sales Grid) benefits from these columns: Column Special Type Purpose Sale Price (or equivalent wording) (target) Response variable Contract Date contract_date Computes sale_age from effective date Listing Date listing_date Fallback DOM = contract date - listing date Days on Market dom Displayed in Sales Grid Concessions concessions Net SP = Sale Price - Concessions Living Area (SF) living_area Per-SF residuals (residual_sf, cqa_sf) Lot Size lot_size Grouped in “Site Size” row Site Dimensions site_dimensions Grouped with lot size Latitude latitude Rounded to 3 dp; proximity calc; Location group Longitude longitude Rounded to 3 dp; proximity calc; Location group Area ID area Grouped in “Location” row Actual Age actual_age Grouped in “Age” row Effective Age effective_age Grouped with actual age Address display_only Shown in grid; excluded from model Spreadsheet column names can be in a foreign language, the “special” names arein English so that the R program can give them special treatment. Otherwise,the given column names show up in the regression models, graphs and, if doingappraisals, the Intermediate Sales Grid. Not all columns are required. earthUI adapts — if a column is missing, thecorresponding feature is simply omitted. However, that being said, for realestate pricing models certain columns are highly recommended to achieve acceptablefit: “Sale Age,” which is the number of days between the contract sale date andthe effective date of the appraisal or analysis. If multi-year sales history isbeing used, especially for periods over 5 years, sale_age often plays a centralrole in estimating the sale price. In fact it is often so important thatwithout it, earthUI fails to provide any model at all. “Living Area” which also goes by names such as “Living Sqft,” “GLA” (grossliving area) and so on. This is also another leading determinant of sale price. “Total Bath Count” is the total number of full, quarter, half and 3/4bathrooms. For example, two full baths and one half-bath would be a value of 2.5. “Garage Bays” or “Garage Area” — the number of garage spaces or thegarage square footage. “Lot Size” — the land area of the property, typically in square feet oracres. “Longitude,” “Latitude,” and if available “Area ID.” Adjustments for thesewill be combined under a single Location adjustment in the Sales Grid. Data Quality Missing values: Rows with NAs in predictors or target are removed beforefitting. Date columns: Should be in a format R can parse (e.g., 2025-06-15). Numeric columns: Sale price, living area, etc. must be numeric (nodollar signs or commas). Subject Row Placement In Appraisal mode, row 1 must be the subject property. In Marketmode, placing the subject in row 1 is optional (use the “Skip first row”checkbox). In General mode, all rows are treated equally. The Sidebar Workflow The sidebar is organized into numbered sections: Import Data — CSV or Excel file upload Project Output Folder — where downloads are saved Variable Configuration — target, predictors, data types, special columns Earth Call Parameters — degree, penalty, pruning, CV, subset filters Fit Earth Model — green button to run the model Download Output — Excel file with predictions and diagnostics Calculate RCA Adjustments (appraisal only) Generate Sales Grid (appraisal only) Download Report — HTML, Word, or PDF via Quarto Variable Selection The Predictor Table Each column is listed with: Type — data type dropdown (numeric, integer, character, factor, Date, etc.) Inc? — include as predictor Special — special column designation (appraisal/market only) Factor — treat as categorical Linear — force linear entry (no hinges) NAs — missing value count Special Column Types In appraisal and market modes, each predictor can be assigned a special type: Date & Time: contract_date — triggers sale_age computation listing_date — fallback for DOM calculation dom — Days on Market column Monetary: concessions — used in Net SP formula (Sale Price - Concessions) Size & Location: latitude / longitude — rounded to 3 dp; proximity and Location group area — grouped with lat/lon in Location row living_area — enables per-SF residuals lot_size / site_dimensions — grouped in Site Size row Age: actual_age / effective_age — grouped in Age row Display: display_only — in exports but excluded from model (multiple allowed) Only one column per special type (except display_only). A blue badge showsthe assigned type next to each variable name. Allowed Interactions (Degree 2+) When degree >= 2, the Allowed Interactions matrix appears underEarth Call Parameters. This upper-triangular matrix controls whichvariable pairs can form interaction terms (hinge products). Check a cell to allow the interaction h(x1) * h(x2) Left-click a variable name (row or column) to toggle all itsinteractions at once Allow All / Clear All buttons toggle the entire matrix Selections persist via localStorage per input file Block from Degree 1 (Interaction Only) Right-click a variable name in the Allowed Interactions matrix toblock it from entering the model as a main effect (degree-1 hinge).A bold “ 1” indicator appears after the variable name. When blocked: The variable cannot enter as h(variable - knot) (main effect) The variable can enter through interactions likeh(variable - k1) * h(other_var - k2) (degree 2+) Right-click again to unblock Use case: When modeling time adjustments that should scale withproperty size, block sale_age from degree 1 and allow it only in aninteraction with living_area. This forces earth to discoverh(sale_age - k1) * h(living_area - k2) – a time appreciation ratethat varies by house size – rather than a flat $/day rate that appliesequally to all properties. # Programmatic equivalent using the allowed function: mat