Open Mining Language
Project description
# Open Mining Language
Language to preprocess Olap Cubes
## Sample
DataSet:
[
{"nome": "Thiago Avelino", "field1": 10, "field2": 20, "address": "Av. Castelo Branco, 1300, Cacapava, SP, Brasil"},
{"nome": "Luiz Vital", "field1": 30, "field2": 40, "address": "Cacapava, SP, Brasil"},
{"nome": "Carlos Leite", "field1": 50, "field2": 60, "address": "Sao Jose dos Campos, SP, Brasil"}
]
OML:
ROW('new_collum1', OML.SUM({@field1, @field2}))
ROW('new_collum2', OML.SUB({@field1, @field2}))
ROW('geo', OML.GEO_LOCATION("@address"))
ROW('func', function() return 'abc' end)
{dict1=@field1*@field2, dict2=123}
Return:
{u'new_collum1': 30, u'new_collum2': -30, 'nome': 'Thiago Avelino', 'field2': 20, 'field1': 10, 'address': 'Av. Castelo Branco, 1300, Cacapava, SP, Brasil', u'geo': {u'lat': -23.1036861, u'lng': -45.7197228}}
{u'new_collum1': 70, u'new_collum2': -70, 'nome': 'Luiz Vital', 'field2': 40, 'field1': 30, 'address': 'Cacapava, SP, Brasil', u'geo': {u'lat': -23.0996965, u'lng': -45.7080824}}
{u'new_collum1': 110, u'new_collum2': -110, 'nome': 'Carlos Leite', 'field2': 60, 'field1': 50, 'address': 'Sao Jose dos Campos, SP, Brasil', u'geo': {u'lat': -23.223701, u'lng': -45.9009074}}
## TODO
- [x] Run lua
- [ ] Run R (We spent a day doing a proof of concept and we can't use simply as Moon, let's start the project with Moon after we returned in R)
Language to preprocess Olap Cubes
## Sample
DataSet:
[
{"nome": "Thiago Avelino", "field1": 10, "field2": 20, "address": "Av. Castelo Branco, 1300, Cacapava, SP, Brasil"},
{"nome": "Luiz Vital", "field1": 30, "field2": 40, "address": "Cacapava, SP, Brasil"},
{"nome": "Carlos Leite", "field1": 50, "field2": 60, "address": "Sao Jose dos Campos, SP, Brasil"}
]
OML:
ROW('new_collum1', OML.SUM({@field1, @field2}))
ROW('new_collum2', OML.SUB({@field1, @field2}))
ROW('geo', OML.GEO_LOCATION("@address"))
ROW('func', function() return 'abc' end)
{dict1=@field1*@field2, dict2=123}
Return:
{u'new_collum1': 30, u'new_collum2': -30, 'nome': 'Thiago Avelino', 'field2': 20, 'field1': 10, 'address': 'Av. Castelo Branco, 1300, Cacapava, SP, Brasil', u'geo': {u'lat': -23.1036861, u'lng': -45.7197228}}
{u'new_collum1': 70, u'new_collum2': -70, 'nome': 'Luiz Vital', 'field2': 40, 'field1': 30, 'address': 'Cacapava, SP, Brasil', u'geo': {u'lat': -23.0996965, u'lng': -45.7080824}}
{u'new_collum1': 110, u'new_collum2': -110, 'nome': 'Carlos Leite', 'field2': 60, 'field1': 50, 'address': 'Sao Jose dos Campos, SP, Brasil', u'geo': {u'lat': -23.223701, u'lng': -45.9009074}}
## TODO
- [x] Run lua
- [ ] Run R (We spent a day doing a proof of concept and we can't use simply as Moon, let's start the project with Moon after we returned in R)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
oml-0.1.tar.gz
(1.9 kB
view details)
File details
Details for the file oml-0.1.tar.gz
.
File metadata
- Download URL: oml-0.1.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5db938d0b652a7b0d1cdcb49e6bfeae75b6010c4c8e08b1d0e866d8eae276743 |
|
MD5 | 6fa28cfb6743bed068d94dff0aedcc37 |
|
BLAKE2b-256 | 5ef63d91ec7a47a722ebff5f18ff0324c5169168019b92f59e4ea6a666bb6867 |