openbudgets / DAM

OBEU Data Analysis and Mining repository
3 stars 1 forks source link

Descriptive statistics do not work through DAM #12

Open larjohn opened 6 years ago

larjohn commented 6 years ago

Like timeseries did, descriptive statistics also run directly to the R server right now. It is time to migrate the algorithm to DAM. Although it seems it is ready, when I try this:

http://dam-obeu.iais.fraunhofer.de/statistics?dimensions=budgetPhase.prefLabel&amount=amount&json_data=http://apps.openbudgets.eu/api/3/cubes/budget-athens-expenditure-2006__97b39/facts

the resulting job never finishes.

What could be the issue?

wk0206 commented 6 years ago

Before DAM use curl to post request and get response, at that time it is fine because the link is fake and not complicated. But it happen to know it do not work correctly in Time_Series, especially when the "json_data" has complex parameters, so I changed it to http.request.post. So, I will change the statistics by this method too.

wk0206 commented 6 years ago

17.08.2017 10:00 this link works 17.08.2017 11:00 this link not working again. With error "Error: lexical error: invalid char in json text. efLabel":"Approved","amount":NAN},{"economicClassification.p (right here) ------^" will continue to check

problem partly solved. Please check link.

http://apps.openbudgets.eu/cube/analytics/bonn-budget-2022-costCenter__ceed0/descriptive_statistics/facts?amounts=amount&dimensions=economicClassification.prefLabel&json_data=http%3A%2F%2Fapps.openbudgets.eu%2Fapi%2F3%2Fcubes%2Fbonn-budget-2022-costCenter__ceed0%2Ffacts%3Ffields%3DeconomicClassification.prefLabel%2CbudgetPhase.prefLabel%2Camount

wk0206 commented 6 years ago

@larjohn In you first post, the link: http://apps.openbudgets.eu/api/3/cubes/budget-athens-expenditure-2006__97b39/facts

do not return any value, could you change to another dataset and check again? The link I post now is working, you can check the result.

larjohn commented 6 years ago

@wk0206 it was working because it was using the old method (direct connection to our server).

The following does not work: https://apps.openbudgets.eu/dam/statistics?amount=%27amount%27&dimensions=%27fundingClassification.prefLabel%27&BABBAGE_FACT_URI=%27http%3A%2F%2Fws307.math.auth.gr%2Frudolf%2Fpublic%2Fapi%2F3%2Fcubes%2Faragon-2007-income__3209b%2Ffacts%3F%27

I have checked with POST and it does not work either, as it doesn't accept the parameters.

This change is somewhat forced because we have to go with HTTPS and it is not easy to implement that to our server right now.