Skip to content

Commit

Permalink
1.8.14
Browse files Browse the repository at this point in the history
* #168, updated default colorscale for heatmaps to be Jet
* #152, added scattermapbox as a valid map type
* #136 & #86: column replacements for values
* #87: highlight ranges of numbers
  • Loading branch information
aschonfeld committed May 31, 2020
1 parent 8cf15ce commit 4b017a2
Show file tree
Hide file tree
Showing 61 changed files with 2,611 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ python: &python
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
CODECOV_TOKEN: b0d35139-0a75-427a-907b-2c78a762f8f0
VERSION: 1.8.13
VERSION: 1.8.14
PANDOC_RELEASES_URL: https://github.com/jgm/pandoc/releases
steps:
- attach_workspace:
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changelog

### 1.8.14 (2020-5-31)
* [#168](https://github.com/man-group/dtale/issues/168): updated default colorscale for heatmaps to be Jet
* [#152](https://github.com/man-group/dtale/issues/152): added scattermapbox as a valid map type
* [#136](https://github.com/man-group/dtale/issues/136) & [#86](https://github.com/man-group/dtale/issues/86): column replacements for values
* [#87](https://github.com/man-group/dtale/issues/87): highlight ranges of numeric cells
### 1.8.13 (2020-5-20)
* [#193](https://github.com/man-group/dtale/issues/193): Support for JupyterHub Proxy

Expand Down
39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ D-Tale was the product of a SAS to Python conversion. What was originally a per
- [Header](#header)
- [Editing Cells](#editing-cells)
- [Main Menu Functions](#main-menu-functions)
- [Describe](#describe), [Outlier Detection](#outlier-detection), [Custom Filter](#custom-filter), [Building Columns](#building-columns), [Summarize Data](#summarize-data), [Charts](#charts), [Coverage (Deprecated)](#coverage-deprecated), [Correlations](#correlations), [Heat Map](#heat-map), [Highlight Dtypes](#highlight-dtypes), [Highlight Missing](#highlight-missing), [Highlight Outliers](#highlight-outliers), [Instances](#instances), [Code Exports](#code-exports), [About](#about), [Resize](#resize), [Shutdown](#shutdown)
- [Describe](#describe), [Outlier Detection](#outlier-detection), [Custom Filter](#custom-filter), [Building Columns](#building-columns), [Summarize Data](#summarize-data), [Charts](#charts), [Coverage (Deprecated)](#coverage-deprecated), [Correlations](#correlations), [Heat Map](#heat-map), [Highlight Dtypes](#highlight-dtypes), [Highlight Missing](#highlight-missing), [Highlight Outliers](#highlight-outliers), [Highlight Range](#highlight-range), [Instances](#instances), [Code Exports](#code-exports), [About](#about), [Resize](#resize), [Shutdown](#shutdown)
- [Column Menu Functions](#column-menu-functions)
- [Filtering](#filtering), [Moving Columns](#moving-columns), [Hiding Columns](#hiding-columns), [Delete](#delete), [Lock](#lock), [Unlock](#unlock), [Sorting](#sorting), [Formats](#formats), [Column Analysis](#column-analysis)
- [Filtering](#filtering), [Moving Columns](#moving-columns), [Hiding Columns](#hiding-columns), [Delete](#delete), [Rename](#rename), [Replacements](#replacements), [Lock](#lock), [Unlock](#unlock), [Sorting](#sorting), [Formats](#formats), [Column Analysis](#column-analysis)
- [Menu Functions Depending on Browser Dimensions](#menu-functions-depending-on-browser-dimensions)
- [For Developers](#for-developers)
- [Cloning](#cloning)
Expand Down Expand Up @@ -363,6 +363,7 @@ The information in the upper right-hand corner gives grid dimensions ![](https:/
- lower-left => row count
- upper-right => column count
- clicking the triangle displays the menu of standard functions (click outside menu to close it)

![](https://raw.githubusercontent.com/aschonfeld/dtale-media/master/images/Info_menu_small.png)

### Header
Expand Down Expand Up @@ -661,7 +662,6 @@ This is a quick way to check and see if your data has been categorized correctly
* Any string column cells which are empty strings or strings consisting only of spaces will be highlighted in orange.
* ❗will be prepended to any column header which contains missing values.


![](https://raw.githubusercontent.com/aschonfeld/dtale-media/master/images/highlight_missing.png)

#### Highlight Outliers
Expand All @@ -672,6 +672,18 @@ Highlight any cells for numeric columns which surpass the upper or lower bounds

![](https://raw.githubusercontent.com/aschonfeld/dtale-media/master/images/highlight_outliers.png)

#### Highlight Range
Highlight any range of numeric cells based on three different criteria:
* equals
* greater than
* less than

You can activate as many of these criteria as you'd like nad they will be treated as an "or" expression. For example, `(x == 0) or (x < -1) or (x > 1)`

|Selections|Output|
|:------:|:------:|
|![](https://raw.githubusercontent.com/aschonfeld/dtale-media/master/images/highlight_range_selections.png)|![](https://raw.githubusercontent.com/aschonfeld/dtale-media/master/images/highlight_range_output.png)|


#### Code Exports
*Code Exports* are small snippets of code representing the current state of the grid you're viewing including things like:
Expand Down Expand Up @@ -775,7 +787,26 @@ All column movements are saved on the server so refreshing your browser won't lo

#### Delete

As simple as it sounds, click this button to delete this column from your dataframe. (Warning: not un-doable!)
As simple as it sounds, click this button to delete this column from your dataframe.

#### Rename

Update the name of any column in your dataframe to a name that is not currently in use by your dataframe.

![](https://raw.githubusercontent.com/aschonfeld/dtale-media/master/images/rename.png)

#### Replacements

This feature allows users to replace content on their column directly or for safer purposes in a brand new column. Here are the options you have:

|Type |Data Types |Description|Menu |
|------------|-------------|-----------|--------|
|Value(s) |all |Replace specific values in a column with raw values, output from another column or an aggregation on your column|![](https://raw.githubusercontent.com/aschonfeld/dtale-media/master/images/replacements_value.png)|
|Spaces Only |strings |Replace string values consisting only of spaces with raw values|![](https://raw.githubusercontent.com/aschonfeld/dtale-media/master/images/replacements_spaces.png)|
|Contains Char/Substring|strings |Replace string values containing a specific character or substring|![](https://raw.githubusercontent.com/aschonfeld/dtale-media/master/images/replacements_strings.png)|
|Scikit-Learn Imputer|numeric |Replace missing values with the output of using different Scikit-Learn imputers like iterative, knn & simple|![](https://raw.githubusercontent.com/aschonfeld/dtale-media/master/images/replacements_sklearn.png)|

Here's a quick demo: [![](http://img.youtube.com/vi/GiNFRtcpIt8/0.jpg)](http://www.youtube.com/watch?v=GiNFRtcpIt8 "Column Replacements")

#### Lock
Adds your column to "locked" columns
Expand Down
2 changes: 1 addition & 1 deletion docker/dtale.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION=1.8.13
VERSION=1.8.14
TZ=America/New_York
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
# built documents.
#
# The short X.Y version.
version = u'1.8.13'
version = u'1.8.14'
# The full version, including alpha/beta/rc tags.
release = u'1.8.13'
release = u'1.8.14'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
3 changes: 2 additions & 1 deletion docs/source/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ markdown
pandas
future
Flask
scipy
scipy
scikit-learn
3 changes: 2 additions & 1 deletion dtale/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@ def __init__(self, *args, **kwargs):
self.host = kwargs.pop('hostname', 'localhost')
self.port = kwargs.pop('port', str(random.randint(0, 65535))) or str(random.randint(0, 65535))
super(DtaleFlaskTesting, self).__init__(*args, **kwargs)
self.application.config['SERVER_NAME'] = '{host}:{port}'.format(host=self.host, port=self.port)
self.application.config['SESSION_COOKIE_DOMAIN'] = 'localhost.localdomain'

def get(self, *args, **kwargs):
"""
:param args: Optional arguments to be passed to :meth:`flask:flask.FlaskClient.get`
:param kwargs: Optional keyword arguments to be passed to :meth:`flask:flask.FlaskClient.get`
"""
self.application.config['SERVER_NAME'] = '{host}:{port}'.format(host=self.host, port=self.port)
return super(DtaleFlaskTesting, self).get(url_scheme='http', *args, **kwargs)


Expand Down
15 changes: 14 additions & 1 deletion dtale/charts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@
YAXIS_CHARTS = ['line', 'bar', 'scatter']
ZAXIS_CHARTS = ['heatmap', '3d_scatter', 'surface']
MAX_GROUPS = 30
MAPBOX_TOKEN = None


def get_mapbox_token():
global MAPBOX_TOKEN

return MAPBOX_TOKEN


def set_mapbox_token(token):
global MAPBOX_TOKEN

MAPBOX_TOKEN = token


def valid_chart(chart_type=None, x=None, y=None, z=None, **inputs):
Expand All @@ -33,7 +46,7 @@ def valid_chart(chart_type=None, x=None, y=None, z=None, **inputs):
map_type = inputs.get('map_type')
if map_type == 'choropleth' and all(inputs.get(p) is not None for p in ['loc_mode', 'loc', 'map_val']):
return True
elif map_type == 'scattergeo' and all(inputs.get(p) is not None for p in ['lat', 'lon']):
elif map_type in ['scattergeo', 'mapbox'] and all(inputs.get(p) is not None for p in ['lat', 'lon']):
return True
return False

Expand Down
Loading

0 comments on commit 4b017a2

Please sign in to comment.