mini-kep / frontend-dash Goto Github PK
View Code? Open in Web Editor NEWDash application with interactive controls and time series plotting.
Dash application with interactive controls and time series plotting.
File "D:\Continuum\Anaconda3\lib\site-packages\werkzeug\serving.py", line 691, in run_simple
s.bind((hostname, port))
OSError: [WinError 10013] Сделана попытка доступа к сокету методом, запрещенным правами доступа
Proposed code here, but it is not working:
https://community.plot.ly/t/annotation-not-showing-on-dash-dcc-graph/6660
Line 26 in 8c744b4
We now have 2 variables selectors. For each of these selectors I would like to have a two selectors(dropdown menus) on one line: one chooses varibale group (eg GDP components, Prices, Foreign Trade) and the other chooses a ariable from a smaller list.
Need a) loyout for this on a separate branch b) data structure, c) callbacks.
Am integration test must:
Lines 276 to 313 in f9fea1b
We currently have:
Download data: q_GDP_yoy.csv q_CPI_rog.csv.
This should link to:
Download data: csv
with proper start date.
Links to individual files should appear in variable information.
2017-11-01T15:07:36.729843+00:00 heroku[router]: at=info method=POST path="/_dash-update-component" host=macrodash.herokuapp.com request_id=796fd55c-29b8-4178-acf1-ce3f90e1010e fwd="91.220.93.136" dyno=web.1 connect=0ms service=3ms status=200 bytes=419 protocol=https
2017-11-01T15:07:36.918710+00:00 heroku[router]: at=info method=POST path="/_dash-update-component" host=macrodash.herokuapp.com request_id=1277318b-79b8-490e-bb8f-45d4771191d9 fwd="91.220.93.136" dyno=web.1 connect=0ms service=191ms status=500 bytes=456 protocol=https
2017-11-01T15:07:36.914720+00:00 app[web.1]: [2017-11-01 15:07:36,914] ERROR in app: Exception on /_dash-update-component [POST]
2017-11-01T15:07:36.914737+00:00 app[web.1]: Traceback (most recent call last):
2017-11-01T15:07:36.914740+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
2017-11-01T15:07:36.914741+00:00 app[web.1]: response = self.full_dispatch_request()
2017-11-01T15:07:36.914742+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
2017-11-01T15:07:36.914742+00:00 app[web.1]: rv = self.handle_user_exception(e)
2017-11-01T15:07:36.914743+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
2017-11-01T15:07:36.914744+00:00 app[web.1]: reraise(exc_type, exc_value, tb)
2017-11-01T15:07:36.914744+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
2017-11-01T15:07:36.914745+00:00 app[web.1]: raise value
2017-11-01T15:07:36.914746+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
2017-11-01T15:07:36.914747+00:00 app[web.1]: rv = self.dispatch_request()
2017-11-01T15:07:36.914747+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
2017-11-01T15:07:36.914748+00:00 app[web.1]: return self.view_functions[rule.endpoint](**req.view_args)
2017-11-01T15:07:36.914749+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/dash/dash.py", line 541, in dispatch
2017-11-01T15:07:36.914750+00:00 app[web.1]: return self.callback_map[target_id]['callback'](*args)
2017-11-01T15:07:36.914750+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/dash/dash.py", line 498, in add_context
2017-11-01T15:07:36.914751+00:00 app[web.1]: output_value = func(*args, **kwargs)
2017-11-01T15:07:36.914751+00:00 app[web.1]: File "/app/app.py", line 132, in update_graph_parameters
2017-11-01T15:07:36.914752+00:00 app[web.1]: data_list = [get_time_series_dict(freq, name1)]
2017-11-01T15:07:36.914753+00:00 app[web.1]: File "/app/app.py", line 81, in get_time_series_dict
2017-11-01T15:07:36.914753+00:00 app[web.1]: data = get_from_api_datapoints(freq, name)
2017-11-01T15:07:36.914754+00:00 app[web.1]: File "/app/app.py", line 74, in get_from_api_datapoints
2017-11-01T15:07:36.914754+00:00 app[web.1]: data = requests.get(url).json()
2017-11-01T15:07:36.914755+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/requests/models.py", line 892, in json
2017-11-01T15:07:36.914756+00:00 app[web.1]: return complexjson.loads(self.text, **kwargs)
2017-11-01T15:07:36.914757+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/json/__init__.py", line 354, in loads
2017-11-01T15:07:36.914758+00:00 app[web.1]: return _default_decoder.decode(s)
2017-11-01T15:07:36.914758+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/json/decoder.py", line 339, in decode
2017-11-01T15:07:36.914759+00:00 app[web.1]: obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2017-11-01T15:07:36.914760+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/json/decoder.py", line 357, in raw_decode
2017-11-01T15:07:36.914760+00:00 app[web.1]: raise JSONDecodeError("Expecting value", s, err.value) from None
2017-11-01T15:07:36.914765+00:00 app[web.1]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
See test example at https://github.com/jackdbd/dash-earthquakes/blob/master/tests/test_basics.py
Fixed by 35f0daa
Lines 204 to 209 in c741624
I have an app in plotly/Dash, that draws some charts. Dash produces JavaScript code,
which is rendered by browser. In is working fairly nicely, but has one limitation:
once it is browser-side Javascript code, there is just one address for the whole application.
App: http://macrodash.herokuapp.com
Code: https://github.com/mini-kep/frontend-dash/blob/master/app.py
My desired behaviour is the following: I want to have URLs that link to
to specific charts, eg:
It is a bit tricky to do that with Dash and Flask.
In Dash there are callbacks to update/reload browser address:
This functionality is ok for changing the addresses once you are at http://macrodash.herokuapp.com and further navigate by selecting variable names and frequencies.
What I'm lacking now is the landing page functionality: how can I type and addrress like http://macrodash.herokuapp.com/q/GDP_yoy+CPI_rog in the browser and further find myself on a page with these indicators plotted?
This functionality involves wrapping Dash with Flask, and I could not find an easy way to do that. Th possible routes are outlined here: plotly/dash#38 (comment)
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.