-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Filter out null locations by default #5642
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5642 +/- ##
==========================================
- Coverage 63.51% 63.51% -0.01%
==========================================
Files 360 360
Lines 22890 22902 +12
Branches 2549 2549
==========================================
+ Hits 14539 14546 +7
- Misses 8336 8341 +5
Partials 15 15
Continue to review full report at Codecov.
|
superset/viz.py
Outdated
|
||
# add NULL filters | ||
if fd.get('filter_nulls'): | ||
spatial_columns = set() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get a unit test around this block? Just making sure fd
has the proper values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do! +1
🚢 |
* Filter out null locations by default * Move exception to better place * Add unit test * Return columns in order for test and readibility (cherry picked from commit 4c5142d)
* Filter out null locations by default * Move exception to better place * Add unit test * Return columns in order for test and readibility (cherry picked from commit 4c5142d)
* Filter out null locations by default * Move exception to better place * Add unit test * Return columns in order for test and readibility (cherry picked from commit 4c5142d)
* Filter out null locations by default * Move exception to better place * Add unit test * Return columns in order for test and readibility
I added a checkbox to all spatial visualizations allowing null locations to be filtered out by default. Currently, they are shown as
0, 0
, which is confusing.My original approach to solving this was by filtering the data on
viz.py
, but at that point we don't know if a zero is a valid location or not (Druid return zeros for null, IIRC). Adding the extra filters to the form data has the benefit that the data is filtered in the database, and in a consistent way.Here's how the
flights
dataset currently looks like — note all the arcs with an edge at the Equator/Greenwich:When we toggle "Ignore null locations" they are removed: