Algorithm URL: https://algorithmia.com/algorithms/marksskram/SocrataOpenDataAnalysis
INPUT: ["open.whitehouse.gov","rcp4-3y7g","select * order by salary desc limit 100"]
OUTPUT:
{
"duration": 1.131406922,
"result": {
"querySettings": {
"domain": "open.whitehouse.gov",
"datasetFourByFour": "rcp4-3y7g",
"queryString": "select * order by salary desc limit 5"
},
"queryResults": [
/* what you would expect */
],
"numericColumns": [
{
"position": 3,
"id": 134381418,
"width": 142,
"name": "Salary",
"fieldName": "salary",
"description": "The salary paid per period",
"dataTypeName": "money",
"renderTypeName": "money",
"format": {},
"fieldValues": [
179700,
179700,
172200,
172200,
172200
],
"someStats": { /* powered by https://algorithmia.com/algorithms/marksskram/SomeStats alg */
"min": 172200,
"median": 172200,
"max": 179700,
"variance": 16875000,
"mean": 175200,
"sum": 876000,
"n": 5,
"standardDeviation": 4107.919181288746
}
}
]
}
}
CURL it:
curl -X POST -d '["open.whitehouse.gov","rcp4-3y7g","select * order by salary desc limit 5"]' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Authorization: YOUR_ALGORITHMIA_KEY_HERE' https://api.algorithmia.com/api/marksskram/SocrataOpenDataAnalysis/0.1.6