Paola Arce
Miró is a data analysis software developed and maintained by our own Nick Radcliffe.

It has been written in Python and supports command line expressions and (lisp-like) functions.
Miró is part of The Artists Software Suite:
stochasticsolutions/artists.artistshelpman COMMANDlisp FUNCTIONA new user variable is created using setq or its quiet form setv:
setq followed only by a variable prints its value:
Global variables are defined using global:
| Type | Example |
|---|---|
| int | 3 |
| real | 5.6 |
| bool | t, f |
| string | “hello” |
| field | fld |
| date | 2022-09-10 |
| list | (list 1 2 3) |
| a-list | (a-list (list 1 “uno”) (list 2 “dos”) (list 3 “tres”)) |
| dataset | dataset 2 |
Datasets are the most important data type in Miró.
| Command | Description | Long form |
|---|---|---|
| load filename | Load a Miró file/dataset | |
| unload dataset | Load a Miró dataset | |
| open filename | Load metadata for dataset with data loaded lazily | |
| save filename | Save a Miró dataset | |
| pwd | Print working dataset | |
| cwd | Current working dataset | |
| ls -l | List fields and their metadata | |
| lsd | list datasets in your repository |
| Command | Description | Long form |
|---|---|---|
| show N | Show first N rows of the working dataset | |
| tail N | Show last N rows of the working dataset | |
| sample N | Show N random records | |
| data | switch cwd or creates a new dataset | dataset |
| Command | Description | Long form |
|---|---|---|
| def field | Creates a new field | define |
| mv | Renames a field | |
| rm | Removes a field | |
| count | Counts the number of selected rows | |
| bin | Bins a field | |
| x | Crosstabs and visualizations | xtab |
Miró uses (lisp-like) expressions to perform vector operations on datasets fields. Lisp is the second oldest programming language after Fortran. It has a parenthesized prefix notation, for example this is how you add up two numbers:
similarly, this is how you add up two columns in Miró:
In Miró there are two function types:
then use it as:
then use it as:
Let’s write a script called myscript.miros
miro.mirodor from Salvador
