Closed grugna closed 6 years ago
Thank you for reaching out! Can you share your config files? The app is currently a little picky about those.
Sure! They are json so I can't attach them here, I will just copy and paste the content.
dataDescription.json
[ { "name": "var_1", "datatype": "integer", "dataProvider": "data_SOURCE", "attributeType": ["filtering"] }, { "name": "var_2", "datatype": "integer", "dataProvider": "data_SOURCE", "attributeType": ["filtering"] }, { "name": "var_3", "datatype": "integer", "dataProvider": "data_SOURCE", "attributeType": ["visual", "filtering"] }, { "name": "var_5", "datatype": "integer", "dataProvider": "data_SOURCE", "attributeType": ["filtering"] }, { "name": "var_6", "datatype": "integer", "dataProvider": "data_SOURCE", "attributeType": ["filtering"] }, { "name": "var_7", "datatype": "integer", "dataProvider": "data_SOURCE", "attributeType": ["filtering"] }, { "name": "var_8", "datatype": "integer", "dataProvider": "data_SOURCE", "attributeType": ["filtering"] }, { "name": "var_9", "datatype": "integer", "dataProvider": "data_SOURCE", "attributeType": ["filtering"] }, { "name": "var_4", "datatype": "integer", "dataProvider": "data_SOURCE", "attributeType": ["visual", "filtering"] }, { "name": "var_10", "datatype": "integer", "dataProvider": "data_SOURCE", "attributeType": ["filtering"] }, { "name": "var_11", "datatype": "integer", "dataProvider": "data_SOURCE", "attributeType": ["filtering"] } ]
dataSource.json
{ "dataSourceAlias": "data_SOURCE", "dataSources": [ { "sourceName": "data_SOURCE", "sourceType": "csv", "options":{ "path": "/Users/lgraglia/Downloads/data_SOURCE.csv" }, "dataAttributes": ["var_1","var_2","var_3","var_4","var_5","var_6","var_7","var_8","var_9","var_10","var_11"] } ] }
interactiveFilters.json
[ { "attributeName": "var_3", "visualization": { "visType": "pieChart" }, "statistics": "count" }, { "attributeName": "var_4", "visualization": { "visType": "pieChart" }, "statistics": "count" } ]
visualization.json `[ { "visualizationType": "dataTable", "attributes":[
{"attributeName": "var_1"},
{"attributeName": "var_2"},
{"attributeName": "var_3"},
{"attributeName": "var_4"}
],
"heading": "HEADING",
"subheading": ""
}
]`
@grugna can you also give me the head and, if you can, a record or two of your csv? Thank you.
@birm I attached a zip file with the 4 config files and a csv with header and 4/5 rows. I'm looking forward to hearing from you.
use enum
as the datatype in dataDescription.json
two kinds of changes are required; in dataDescription, change "name" to "attributeName". In dataSource.json, change "csv" to "csvFile".
Here are the two files after these modifications, noting that DATA_SOURCE.csv is in ./data/ in my env.
dataSource.json
"dataSourceAlias": "DATA_SOURCE",
"dataSources": [
{
"sourceName": "DATA_SOURCE",
"sourceType": "csvFile",
"options":{
"path": "data/DATA_SOURCE.csv"
},
"dataAttributes": ["var_1","var_2","var_3","var_4","var_5","var_6","var_7","var_8","var_9","var_10","var_11","var_12","var_13","var_14","var_15"]
}
]
}
dataDescription.json
[
{
"attributeName": "var_1",
"datatype": "string",
"dataProvider": "DATA_SOURCE",
"attributeType": ["key"]
},
{
"attributeName": "var_2",
"datatype": "integer",
"dataProvider": "DATA_SOURCE",
"attributeType": ["filtering"]
},
{
"attributeName": "var_3",
"datatype": "integer",
"dataProvider": "DATA_SOURCE",
"attributeType": ["filtering"]
},
{
"attributeName": "var_4",
"datatype": "integer",
"dataProvider": "DATA_SOURCE",
"attributeType": ["visual", "filtering"]
},
{
"attributeName": "var_5",
"datatype": "integer",
"dataProvider": "DATA_SOURCE",
"attributeType": ["visual", "filtering"]
},
{
"attributeName": "var_6",
"datatype": "integer",
"dataProvider": "DATA_SOURCE",
"attributeType": ["filtering"]
},
{
"attributeName": "var_7",
"datatype": "integer",
"dataProvider": "DATA_SOURCE",
"attributeType": ["filtering"]
},
{
"attributeName": "var_8",
"datatype": "integer",
"dataProvider": "DATA_SOURCE",
"attributeType": ["filtering"]
},
{
"attributeName": "var_9",
"datatype": "integer",
"dataProvider": "DATA_SOURCE",
"attributeType": ["filtering"]
},
{
"attributeName": "var_10",
"datatype": "integer",
"dataProvider": "DATA_SOURCE",
"attributeType": ["filtering"]
},
{
"attributeName": "var_11",
"datatype": "integer",
"dataProvider": "DATA_SOURCE",
"attributeType": ["filtering"]
},
{
"attributeName": "var_12",
"datatype": "float",
"dataProvider": "DATA_SOURCE",
"attributeType": ["filtering"]
},
{
"attributeName": "var_13",
"datatype": "float",
"dataProvider": "DATA_SOURCE",
"attributeType": ["filtering"]
},
{
"attributeName": "var_14",
"datatype": "integer",
"dataProvider": "DATA_SOURCE",
"attributeType": ["filtering"]
},
{
"attributeName": "var_15",
"datatype": "integer",
"dataProvider": "DATA_SOURCE",
"attributeType": ["filtering"]
}
]
Thank you! This solved the problem.
I followed the documentation, created the config file, but when I run "node app.js" nothing happen and the application doesn't start. Do you have any suggestion on what I am missing?