Coder Social home page Coder Social logo

bis-med-it / sdmx-dashboard-generator Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 1.0 5.9 MB

SDMX Dashboard Generator. A web application for SDMX data and metadata rendering.

Home Page: https://bis-med-it.github.io/SDMX-dashboard-generator/

License: Apache License 2.0

Python 100.00%
dash python sdmx

sdmx-dashboard-generator's Introduction


Logo

Coverage pylint Apache 2.0 Active repo Mentioned in Awesome

About the SDMX Dashboard Generator

The SDMX Dashboard Generator (SDMX-DG) is an open-source Dash application that generates dynamic dashboards by pulling data and metadata from SDMX Rest API. It supports the version 2.1 of the standard. It leverages the open-source library SDMXthon to retrieve and parse data and metadata in SDMX. Data and metadata are supported by asynchronous retrieval. A dashboard is composed of several visualizations as defined by the specifications provided in a .yaml file. The specifications are interpreted by a ChartGenerator class containing instructions to define the Plotly charts. It has been developed for the SDMX Hackathon Global Conference 2023.

Documentation

A quick introduction to the SDMX Dashboard Generator is available at sdmx.io. The full documentation for this app is available at GitHub Pages.

License

The source code in this repository is licensed under Apache-2.0. See LICENSE for more information.

Acknowledgments

This app has been developed by Cristina Leonte, Pietro Patelli, Stephan Probst and Olivier Sirello (Bank for International Settlements). The views expressed are those of the authors and do not necessarily reflect those of the Bank for International Settlements. All errors are our own.

Infographics

How it works

What it does

sdmx-dashboard-generator's People

Contributors

crileonte avatar dependabot[bot] avatar osirello avatar pietropatelli avatar stephprobst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pascal-cbs

sdmx-dashboard-generator's Issues

Images linked in documentation via html syntax not displayed

When an image is inserted in .rst files or in markdown files using markdown syntax, the images are correctly picked up by sphinx and saved in the output build directory, in the _images folder. The html code of the built documentation then correctly references these.

When an image is inserted in markdown files via html syntax this does not happen.

There are three possible solutions:

  1. Use full links to the repo images in the html code. This is easy but not ideal.
  2. Use reST files or another syntax in markdown to avoid using html syntax to insert images. This takes more work but would be my preferred course of action as it also makes the raw documentation files more readable.
  3. Figure out a way to make sphinx handle the images in a way that either adds the repo path on build or copies the images to the build dir and links them there as it is done with non-html images.

Data with alternate label

DATA: The syntax to specify the DATA for the chart is the following:
"""
“Dataflow query Dataflow query, {”";
:
“Dataflow query Dataflow query, {”";
"""
where:
• Dataflow query is a valid SDMX query used to get the data to display, containing the appropriated filtering string and time period selection (using the SDMX query parameters startPeriod=, endPeriod= and lastNObservations=) for the purpose of the visualization.
• is optional and is enclosed in curly brackets ({}). It overrides the default label and can include references to {$<concept_Id>}.
• Optionally, it might be possible to compute values to be represented using the operators + - * / between the values obtained from the data queries, e.g., multiplying a result by the unit multiplier value, or computing a rate as the quotient between two levels.

Prevent crash if multiple YAML files share the same dashid

If multiple YAML files share the same ID, load_yaml() won't return the correct results and fails.
Need to print an error in the log or, better, a warning by taking the first (alphabetical) file

if dash_id_url != "/": yaml_location = ''.join([d["location"] for d in yaml_files if d['dash_id'] == dash_id_url_s]) return yaml_location

Responsive Display

I am having an issue with the display of report pages. For example, I have two graph titles and two graphs on the same line. Sometimes the formatting looks fine, but sometimes the second graph jumps to a different line while the two graph titles remain on the same line. What should i do?
S__401
S__402

failure with ExampleDashboardILOSTAT-SDMXHackathon v1.1

Attempt to draw dashboard with ExampleDashboardILOSTAT-SDMXHackathon v1.1 as input fails with the error:

Error on request:
Traceback (most recent call last):
  File "C:\Users\pi006005\Envs\SDMX-dashboard-generator\lib\site-packages\werkzeug\serving.py", line 333, in run_wsgi
    execute(self.server.app)
  File "C:\Users\pi006005\Envs\SDMX-dashboard-generator\lib\site-packages\werkzeug\serving.py", line 320, in execute
    application_iter = app(environ, start_response)
  File "C:\Users\pi006005\Envs\SDMX-dashboard-generator\lib\site-packages\flask\app.py", line 2552, in __call__
    return self.wsgi_app(environ, start_response)
  File "C:\Users\pi006005\Envs\SDMX-dashboard-generator\lib\site-packages\flask\app.py", line 2532, in wsgi_app
    response = self.handle_exception(e)
  File "C:\Users\pi006005\Envs\SDMX-dashboard-generator\lib\site-packages\flask\app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Users\pi006005\Envs\SDMX-dashboard-generator\lib\site-packages\flask\app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Users\pi006005\Envs\SDMX-dashboard-generator\lib\site-packages\flask\app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Users\pi006005\Envs\SDMX-dashboard-generator\lib\site-packages\flask\app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "C:\Users\pi006005\Envs\SDMX-dashboard-generator\lib\site-packages\dash\dash.py", line 1297, in dispatch
    ctx.run(
  File "C:\Users\pi006005\Envs\SDMX-dashboard-generator\lib\site-packages\dash\_callback.py", line 452, in add_context
    flat_output_values = flatten_grouping(output_value, output)
  File "C:\Users\pi006005\Envs\SDMX-dashboard-generator\lib\site-packages\dash\_grouping.py", line 35, in flatten_grouping
    validate_grouping(grouping, schema)
  File "C:\Users\pi006005\Envs\SDMX-dashboard-generator\lib\site-packages\dash\_grouping.py", line 210, in validate_grouping
    SchemaTypeValidationError.check(grouping, full_schema, path, (tuple, list))
  File "C:\Users\pi006005\Envs\SDMX-dashboard-generator\lib\site-packages\dash\_grouping.py", line 162, in check
    raise SchemaTypeValidationError(value, full_schema, path, expected_type)
dash._grouping.SchemaTypeValidationError: Schema: [<Output `charts_div.children`>, <Output `footer_div.children`>, <Output `spinner-id2.children`>]
Path: ()
Expected type: (<class 'tuple'>, <class 'list'>)
Received value of type <class 'NoneType'>:
    None

Create documentation

Provide detailed documentation on:

### Tasks
- [ ] Requirements and app setup
- [ ] App usage
- [ ] Enhancements
- [ ] Documenting code

Improve overall design of KPI

Improve the design of the card for the KPI to increase readability. Some ideas may include adding a background icon.

Yaml enhancement

• Font type, size, emphasis (bold, italics, etc.) and location (LEFT, CENTER, RIGHT) can be
specified in square-brackets ([]) following any text, title, note or label specification.
Example: Title: "Labour force participation rate, [Arial, 14, Bold, Italics, CENTER]”

TODO:

  • Implement example with [Arial, 14, Bold, Italics, CENTER]

Error when zooming out

Most likely a minor issue. Zooming out I get the error below:

Error on request:
Traceback (most recent call last):
  File "c:\Users\pi006005\Documents\Development\Envs\sdmx_dg\lib\site-packages\werkzeug\serving.py", line 333, in run_wsgi
    execute(self.server.app)
  File "c:\Users\pi006005\Documents\Development\Envs\sdmx_dg\lib\site-packages\werkzeug\serving.py", line 320, in execute
    application_iter = app(environ, start_response)
  File "c:\Users\pi006005\Documents\Development\Envs\sdmx_dg\lib\site-packages\flask\app.py", line 2552, in __call__
    return self.wsgi_app(environ, start_response)
  File "c:\Users\pi006005\Documents\Development\Envs\sdmx_dg\lib\site-packages\flask\app.py", line 2532, in wsgi_app
    response = self.handle_exception(e)
  File "c:\Users\pi006005\Documents\Development\Envs\sdmx_dg\lib\site-packages\flask\app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
  File "c:\Users\pi006005\Documents\Development\Envs\sdmx_dg\lib\site-packages\flask\app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "c:\Users\pi006005\Documents\Development\Envs\sdmx_dg\lib\site-packages\flask\app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "c:\Users\pi006005\Documents\Development\Envs\sdmx_dg\lib\site-packages\flask\app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "c:\Users\pi006005\Documents\Development\Envs\sdmx_dg\lib\site-packages\dash\dash.py", line 1297, in dispatch
    ctx.run(
  File "c:\Users\pi006005\Documents\Development\Envs\sdmx_dg\lib\site-packages\dash\_callback.py", line 437, in add_context
    output_value = func(*func_args, **func_kwargs)  # %% callback invoked %%
  File "C:\Users\pi006005\Documents\Development\SDMX-dashboard-generator\src\app.py", line 912, in download_table
    id_tag = ctx.triggered_id.index
AttributeError: 'NoneType' object has no attribute 'index'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.