- Sector
- Data platform
- Client
- Cirro monitoring platform · Geotechnics
- Year
- 2026
- Role
- R&D, language design and formula auditing
Formulas engineers can write like a spreadsheet.
An Excel-compatible formula language for sensor data on a monitoring platform — lexer, translator, safe time-series window functions and four editors on one syntax tree — plus an audit that caught a unit error in a live dam formula.

Results
4
editing modes on one syntax tree
0.304→0.345
conversion factor corrected (m/inHg)
~4 cm
level bias per inHg removed
Engineers on the platform turn raw sensor readings into levels, pressures and flows with “flexible formulas”. Most of them think in Excel, but the editor spoke a different dialect and had no way to look across a window of readings. I prototyped a formula layer that accepts Excel syntax, explains itself as you type and stays safe when it runs against real data.
What I built
- A hand-written Excel formula lexer and an Excel-to-mathjs translator, both covered by tests, so existing spreadsheet habits carry over.
- Time-series window functions such as SUM(A:B[10,12]). They are rewritten into injected scalar values before evaluation, so a user expression never gets access to the whole dataset, and blanks and edges behave the way Excel users expect.
- Autocomplete, hover help, screen tips and a function palette in the editor.
- Four editing modes — Blocks, Guided (with templates), Chips and Advanced — on one shared syntax tree that renders to both LaTeX and plain text, with a panel to test a formula before saving it.
Auditing what was already running
I also wrote an offline Python interpreter for the platform’s formulas to re-evaluate deployed calculations against field readings. On a dam piezometer it found a transcription error: 0.304 had been used where 0.345 m per inHg was correct, biasing water levels upward by about 4 cm for every inHg of barometric correction. I documented the check in a validation report so the fix could be reviewed.
Status
The editor and window functions are an R&D prototype that has not been released. The audit was real work on a production formula.
Services
- Scientific & engineering computation
- Platform & application software
- Time-series data engineering
Tools & tech
- TypeScript
- React
- mathjs
- MathLive
- Node.js
- Python