napjon / krisk Goto Github PK
View Code? Open in Web Editor NEWStatistical Interactive Visualization with pandas+Jupyter integration on top of Echarts.
License: BSD 3-Clause "New" or "Revised" License
Statistical Interactive Visualization with pandas+Jupyter integration on top of Echarts.
License: BSD 3-Clause "New" or "Revised" License
Add trendline that shows changes for bar chart
0 treated as value, and thus makes line chart dropped to zero because of missing data.
As far as I know, the current package only support line,scatter,bar,bar_line types...Thanks...
Users don't have to set config for each chart. Currently targeting for:
In Clinical Trial, there are various cases where start date for each patient is different. We have to make baseline date for each patient and measure compliance rate. Timedelta operations can benefit case like this.
Now numbers rendered as is, and it doesn't do formatting properly when go as high as hundreds of millions. Should add additional parameters to control how numbers are rendered.
There is option that generated by make_chart, but there are also additional option provided by setter method. Resync Data have to handle that as well.
Echarts Density Line for Histogram: http://echarts.baidu.com/demo.html#mix-line-bar
I'm having a similar problem to #70 **
Collecting krisk
Using cached krisk-0.3.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/6s/fdz619ns34jfkhhjfqmwb3br0000gn/T/pip-build-x99MZJ/krisk/setup.py", line 2, in
from krisk import version
File "krisk/init.py", line 5, in
import krisk.plot.api as plot
File "krisk/plot/api.py", line 1, in
from krisk.plot.make_chart import make_chart
File "krisk/plot/make_chart.py", line 2, in
from krisk.chart.api import Chart
File "krisk/chart/api.py", line 1, in
from krisk.chart.core import rcParams, Chart
File "krisk/chart/core.py", line 189
SyntaxError: Non-ASCII character '\xef' in file krisk/chart/core.py on line 189, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details**
The last update doesn't seem to fix this issue.
Collecting risk
Using cached krisk-0.3.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/c4/yxk5p2k93z53gw5ywq750x3nhlvp8p/T/pip-build-imEuXs/krisk/setup.py", line 2, in <module>
from krisk import __version__
File "krisk/__init__.py", line 5, in <module>
import krisk.plot.api as plot
File "krisk/plot/api.py", line 1, in <module>
from krisk.plot.make_chart import make_chart
File "krisk/plot/make_chart.py", line 2, in <module>
from krisk.chart.api import Chart
File "krisk/chart/api.py", line 1, in <module>
from krisk.chart.core import rcParams, Chart
File "krisk/chart/core.py", line 189
SyntaxError: Non-ASCII character '\xef' in file krisk/chart/core.py on line 189, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details```
Reproduce:
from krisk import init_notebook; init_notebook()
since it's not gonna publish to nbviewer.Output:
Javascript part failed to print out.
Console error:
require.min.js:8 Uncaught Error: Script error for: dark
require.min.js:8 Failed to load resource: net::ERR_FILE_NOT_FOUND
...
Expected Output:
Charts should be shown as it run in notebook after exporting.
Possible solution:
It seems like after exporting, it still tries to retrieve source js files from local server and current folder. Is that possible we can define the source files' location as commands in python?
ENV:
Python3.5
Jupyter Notebook 4.2.1
Echarts 3.2.1 (built-in)
Don't embed the actual data in the option
variable. Instead, assign variable for each of category, and let data option reference to that variable
i use command like this :
ipython nbconvert --to html --template fill mynotebook.ipynb
the question is all the krisk img can not show ....
This will break API change.
Krisk users can just specify JSON option of Echarts to plot directly in Jupyter
Support Waterfall.
Echarts Examples:
See http://nbviewer.jupyter.org/github/napjon/krisk/blob/master/notebooks/themes-colors.ipynb
Not all year index values shown
add 'mode' as keyword parameter for bar chart.
hi there
python3.5
win10
pip install krisk
i run this page code, http://nbviewer.jupyter.org/github/napjon/krisk/blob/master/notebooks/Intro.ipynb
when i run , kk.bar(df,'continent')
i got error
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
C:\Program Files\Anaconda3\lib\site-packages\IPython\core\formatters.py in __call__(self, obj)
309 method = get_real_method(obj, self.print_method)
310 if method is not None:
--> 311 return method()
312 return None
313 else:
C:\Program Files\Anaconda3\lib\site-packages\krisk\chart\core.py in _repr_javascript_(self)
574 width=self._size['width'],
575 height=self._size['height']))+\
--> 576 (self._get_resync_option_strings(self.option))
577
578 def _get_duplicated(self):
C:\Program Files\Anaconda3\lib\site-packages\krisk\chart\core.py in _get_resync_option_strings(self, option)
553 """Resync Chart option"""
554
--> 555 js_template = get_content(JS_TEMPLATE_PATH)
556 event_template = get_content(EVENT_TEMPLATE_PATH)
557
C:\Program Files\Anaconda3\lib\site-packages\krisk\util.py in get_content(filepath)
13 """Retrieve content from file"""
14 abs_path = join_current_dir(filepath)
---> 15 with open(abs_path, 'r') as f:
16 return f.read()
17
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files\\Anaconda3\\lib\\site-packages\\krisk\\static/krisk.js'
Out[4]:
<krisk.chart.core.Chart at 0x27540c21ba8>
Adding chart with bar and line with different series but same x-axis. For example,
kk.bar_line(df, x, y_bar, y_line, c=None, .....)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.