Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scatter plot and Slider do not make sense #77

Open
dansotoz opened this issue Apr 11, 2020 · 3 comments
Open

Scatter plot and Slider do not make sense #77

dansotoz opened this issue Apr 11, 2020 · 3 comments
Assignees

Comments

@dansotoz
Copy link
Collaborator

when I use a slider to apply a filter on a scatter plot, the values do not make sense
Those two plots should be identical, the first one has no filter used.
here is the JSON code of the slider
{
"query": {
"filtered": {
"query": {
"query_string": {
"analyze_wildcard": true,
"query": ""
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"Promedio Delta": {
"gte": -0.3,
"lte": 0.1
}
}
},
{
"query": {
"query_string": {
"analyze_wildcard": true,
"query": "
"
}
}
}
],
"must_not": []
}
}
}
},
"size": 0,
"aggs": {}
}
newplot(1)
newplot(2)

@mastropi
Copy link
Collaborator

Do you think this problem comes from the backend side or from the frontend side?

On my side (the backend), I can say that I have at least one passing unit test where the filter is based on a variable range. The filter seems to be working properly as the number of records coincide with those obtained by applying the same filter on the input table (CensusIncome).

I am attaching the query and response files for such unit test.

Note that the range filter is applied on a variable ("capital gains") that is also part of the Y-axis aggregations (as in your case).

Bug02-Census-FilterOnFieldWithSpaces-MyResponse.txt
Bug02-Census-FilterOnFieldWithSpaces-Query-Beautified.txt

If you think the problem comes from the backend side, do you think you could share the input data with me so I can investigate?

@Kranf99
Copy link
Owner

Kranf99 commented May 14, 2020

This seems to fixed with the latest release.
@dansotoz : could you confirm?

@mastropi
Copy link
Collaborator

mastropi commented Jun 4, 2020

I talked to Daniel on Tuesday and it seems this is still a problem.

He said he was using the latest version Kibella-v3.4 although we were not able to check that as the home page of Kibella does not work --see issue #92

On the other hand, he sent me the JSON request string of the query related to the problem, which I tested on my side with another table and got no issues, as explained below.

@dansotoz: attached are the query I ran and the response I received on a table with 16,531 records, when a slider filter is applied to limit one of the plotted variables to the range [-9, 0].

kibella_issue77_query.txt
kibella_issue77_response.txt

In terms of the query you shared with me, the equivalences with my query are as follows:
your grouping variable account_number -> my q20_CapDevDeuda
your slider variable gross_margin -> my ROE
your other scatter plot variable charges_SEK_byCount -> my importeAjustadovsVentas

Note that the records returned in the response are the same I get when I run the equivalent SQL query on the SQLite Explorer by Timi:
image

I also checked using the Slider and Scatter plot in a Kibella dashboard and things seem to be working fine.
Example:
image

image

The only difference in terms of software used is that I am using the latest version of the JSON-SQL bridge, which I pushed last Monday to the respective repository. However, I haven't touched the aggregations related to this problem for quite a few months/year already...

The next steps I would suggest are:

  1. Check that you are running the latest version of Kibella (v3.4, released on 28-May-2020)
  2. If yes, share your data with me and I will try to reproduce the problem on my side.

@Kranf99 Kranf99 assigned Kranf99 and unassigned bourgue Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants