mini-kep / datamap Goto Github PK
View Code? Open in Web Editor NEWMissing values datamap
Missing values datamap
Use
or
to simplify data access.
Todo:
Bring in code for spline and chart class in matplotlib
directory, make it work with data from API.
Source:
https://github.com/mini-kep/parser-rosstat-kep/blob/master/src/images.py
fig = {'data' : [{
'type' : 'scatter',
'mode' :'lines',
'x' : ts.date,
'y' : ts.value
}],
'layout' : {
'xaxis' : {
'title' : 'date'
}
}}
As in current NOT TODO
comments to app.py
Parts of dash code seem work in progress
# > help(app)
# class Dash(builtins.object)
# | Methods defined here:
# |
# | __init__(self, name=None, server=None, static_folder=None, url_base_pathname='/', **kwargs)
# | Initialize self. See help(type(self)) for accurate signature.
# |
# | callback(self, output, inputs=[], state=[], events=[])
# | # TODO - Update nomenclature.
# | # "Parents" and "Children" should refer to the DOM tree
# | # and not the dependency tree.
# | # The dependency tree should use the nomenclature
# | # "observer" and "controller".
# | # "observers" listen for changes from their "controllers". For example,
# | # if a graph depends on a dropdown, the graph is the "observer" and the
# | # dropdown is a "controller". In this case the graph's "dependency" is
# | # the dropdown.
# | # TODO - Check this map for recursive or other ill-defined non-tree
# | # relationships
# File "C:\Users\PogrebnyakEV\Desktop\mini-kep\dash\dash_app\app.py", line 99, in <listcomp>
# 'x': [d['date'] for d in data],
#TypeError: string indices must be integers
#127.0.0.1 - - [26/Oct/2017 11:24:02] "POST /_dash-update-component HTTP/1.1" 200 -
#127.0.0.1 - - [26/Oct/2017 11:24:11] "POST /_dash-update-component HTTP/1.1" 200 -
#127.0.0.1 - - [26/Oct/2017 11:24:19] "POST /_dash-update-component HTTP/1.1" 500 -
#Traceback (most recent call last):
# File "D:\Continuum\Anaconda3\lib\site-packages\flask\app.py", line 1994, in __call__
# return self.wsgi_app(environ, start_response)
# File "D:\Continuum\Anaconda3\lib\site-packages\flask\app.py", line 1985, in wsgi_app
# response = self.handle_exception(e)
# File "D:\Continuum\Anaconda3\lib\site-packages\flask\app.py", line 1540, in handle_exception
# reraise(exc_type, exc_value, tb)
# File "D:\Continuum\Anaconda3\lib\site-packages\flask\_compat.py", line 33, in reraise
# raise value
# File "D:\Continuum\Anaconda3\lib\site-packages\flask\app.py", line 1982, in wsgi_app
# response = self.full_dispatch_request()
# File "D:\Continuum\Anaconda3\lib\site-packages\flask\app.py", line 1614, in full_dispatch_request
# rv = self.handle_user_exception(e)
# File "D:\Continuum\Anaconda3\lib\site-packages\flask\app.py", line 1517, in handle_user_exception
# reraise(exc_type, exc_value, tb)
# File "D:\Continuum\Anaconda3\lib\site-packages\flask\_compat.py", line 33, in reraise
# raise value
# File "D:\Continuum\Anaconda3\lib\site-packages\flask\app.py", line 1612, in full_dispatch_request
# rv = self.dispatch_request()
# File "D:\Continuum\Anaconda3\lib\site-packages\flask\app.py", line 1598, in dispatch_request
# return self.view_functions[rule.endpoint](**req.view_args)
# File "D:\Continuum\Anaconda3\lib\site-packages\dash\dash.py", line 541, in dispatch
# return self.callback_map[target_id]['callback'](*args)
# File "D:\Continuum\Anaconda3\lib\site-packages\dash\dash.py", line 498, in add_context
# output_value = func(*args, **kwargs)
# File "C:\Users\PogrebnyakEV\Desktop\mini-kep\dash\dash_app\app.py", line 99, in update_graph
# 'x': [d['date'] for d in data],
# File "C:\Users\PogrebnyakEV\Desktop\mini-kep\dash\dash_app\app.py", line 99, in <listcomp>
# 'x': [d['date'] for d in data],
#TypeError: string indices must be integers
daily = daily.reindex(index=pd.date_range(daily.index[0], daily.index[-1]))
this seems to distort days in the dataset.... we are assigning an index withou actuall knowing if the dates insude the dataset fit. Need a more precise solution for this.
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.