Python Interactive Dashboards with Plotly Dash - Quick Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ย. 2024
  • An intro to plotly Dash in Python with a real-world dataset example.
    Build interactive, nice-looking, easily sharable, and web-based dashboards in Python!
    - For better learning of Dash, check out our Udemy course:
    www.udemy.com/...
    - To download the avocado dataset used in the video:
    www.kaggle.com...
    - Try out the dashboard in the video deployed on Heroku:
    python-dash-tu...
    There's also an article of the same content, if you prefer reading, check out www.justintoda...

ความคิดเห็น • 51

  • @justintodata
    @justintodata  2 ปีที่แล้ว +2

    Dash has made multiple changes after upgrading to version 2.x.
    We can't modify this video. So for an updated version, please visit our website for the article www.justintodata.com/python-interactive-dashboard-with-plotly-dash-tutorial/.
    Or our course on Udemy www.udemy.com/course/python-interactive-dashboards-with-plotly-dash/?referralCode=27BF272291E2106DA590

    • @fayalessa7315
      @fayalessa7315 2 ปีที่แล้ว

      Is the Udemy course updated to the new version? or its just fundamentals and can be apply to any of the versions?

    • @justintodata
      @justintodata  2 ปีที่แล้ว

      Hi@@fayalessa7315 Yes, the Udemy course has been updated to the new version.

    • @elhipster1
      @elhipster1 2 ปีที่แล้ว

      just went to the tutorial link and the code worked wonderfully. Thank you!

  • @teklehaimanotaman3150
    @teklehaimanotaman3150 3 ปีที่แล้ว +3

    Very excellent explaination Justin. Thank you very much for the efforts you put to make us understand about the dash layout and callback.

  • @lfmtube
    @lfmtube 2 ปีที่แล้ว

    Very well-made video. The pacing and the quality of the presentation of all the content is 100% useful, every second. Thanks!

  • @antonjohansson9391
    @antonjohansson9391 3 ปีที่แล้ว +1

    Excellent video! Got my first dashboard up and running thanks to you.

  • @digigoliath
    @digigoliath 3 ปีที่แล้ว +1

    Awesome!!! TQVM!! All new to me. A great introduction video for me!

  • @mkgm001
    @mkgm001 2 ปีที่แล้ว

    Such a well composed video tutorial, thank you so much Lianne

  • @MegaAmged
    @MegaAmged ปีที่แล้ว

    This was a great video, Simple and easy to understand.

  • @ollydsouza
    @ollydsouza 13 วันที่ผ่านมา

    Good stuff - could this be made "live" - like in a real time display of data being generated in real time.

  • @aboozarsobboohi827
    @aboozarsobboohi827 2 ปีที่แล้ว

    Very nice explanation

  • @nanosoftitsolutions3207
    @nanosoftitsolutions3207 3 ปีที่แล้ว +1

    Great video. Please advise on how to cluster data and use mutiple drop drowns. For example grouping the cities by state and then accessing the cities. This would help for a company with a large number of products but need to access data by category first before individual products.

  • @XuanTran-ri1hn
    @XuanTran-ri1hn 2 ปีที่แล้ว

    Thank you for the video. It is very helpful :) !

  • @TheRossspija
    @TheRossspija 3 ปีที่แล้ว

    built my first dashboard! yeeeeeeeeeeeeeeeeeey

  • @starkarabil9260
    @starkarabil9260 3 ปีที่แล้ว

    such a great work! Thank you thank you thank you...

  • @martosah7973
    @martosah7973 2 ปีที่แล้ว

    Great video 👍🏾

  • @shashikantrrathod3617
    @shashikantrrathod3617 2 ปีที่แล้ว +1

    Hi, Your lectures are really useful to create dashboards using plotly dash in efficient way. Just have one questions ? How we can export these dashboards either in PDF or PPT using dash?

    • @justintodata
      @justintodata  2 ปีที่แล้ว

      Hi Shashikant, I don't think Dash offers any functions like that. You probably have to use other packages to do that

    • @shashikantrrathod3617
      @shashikantrrathod3617 2 ปีที่แล้ว

      @@justintodata Thanks for your reply. Can you please suggest other packages that may be useful??

    • @justintodata
      @justintodata  2 ปีที่แล้ว

      @@shashikantrrathod3617 I haven't had to do anything similar. Perhaps try out something mentioned in this thread stackoverflow.com/questions/52820266/how-do-i-display-a-website-written-in-dash-as-a-static-pdf-python

  • @AlgoTradingX
    @AlgoTradingX 3 ปีที่แล้ว

    Useful content!

  • @franciscomiranda3239
    @franciscomiranda3239 2 ปีที่แล้ว +1

    How to upload csv data in real time??

    • @justintodata
      @justintodata  2 ปีที่แล้ว

      Hi Francisco, I've never done it myself. But I'm guessing you need to automate updating the csv file in Python and get Dash to read it. Dash can use interval component to read periodically

  • @pranavkumar9782
    @pranavkumar9782 3 ปีที่แล้ว

    How does the dcc.Graph object know which graph to show? The update_graph function doesn't have an id attached to it

    • @justintodata
      @justintodata  3 ปีที่แล้ว +2

      Hi Pranav, around 9:20, it mentioned that the function returns line_fig, corresponds to the Output in @app.callback, which has id of dcc.Graph

  • @sathyapramodadpurnaiah6386
    @sathyapramodadpurnaiah6386 7 หลายเดือนก่อน

    can i get the github repo for this

  • @mladenperkovic3564
    @mladenperkovic3564 2 ปีที่แล้ว

    I am building a desktop app in Python and mySQL which requires some reporting - Dash and Plotly seem to be good choice. Is it possible to add Dash+Plotly as reporting functionality from desktop app (click on button in the app, and web browser opens with reporting tool build in Dash/Plotly) and compile such app into an exe? What I mean is - will the Dash/Plotly functionalities work if I compile such app to exe?

    • @justintodata
      @justintodata  2 ปีที่แล้ว

      Hi Mladen, we've never had to do it ourselves. But sounds like this article is solving the problem, python.plainenglish.io/how-to-convert-your-dash-app-into-an-executable-gui-b1d4271a8fa7

  • @stkyriakoulisdr
    @stkyriakoulisdr 3 ปีที่แล้ว

    But how do you make dash update itself every some interval, as data come in?

    • @justintodata
      @justintodata  3 ปีที่แล้ว

      Hi, please check out dash.plotly.com/live-updates

  • @ramkrishnachoudhary633
    @ramkrishnachoudhary633 2 ปีที่แล้ว

    How to generate dashboard for data from MySQL database????

    • @justintodata
      @justintodata  2 ปีที่แล้ว

      Hi Ram, you'll need to connect from Python to your database, and grab the data as pandas DataFrame. Then you can use Dash to create a dashboard based on it

  • @raould2590
    @raould2590 3 ปีที่แล้ว

    Hi, liked this tutorial. I have run into an error while executing the code. Would you be able to help me please? I am new to plotly/dash and relatively new to Python itself. Thanks.
    The error is:
    Traceback (most recent call last):
    File "dash_example.py", line 26, in
    @app.callback(
    File "C:\RAOUL\Python\PycharmProjects\PLOTLY DASHBOARDS WITH DASH\venv\lib\site-packages\dash\dash.py", line 1000, in callback
    callback_id = self._insert_callback(output, inputs, state, prevent_initial_call)
    AttributeError: 'Output' object has no attribute '_insert_callback'

    • @justintodata
      @justintodata  3 ปีที่แล้ว

      Hi Raoul,
      We've never had that error message before so it's hard to say without seeing your code and your environment. But it looks like something to do with your Dash installation. Maybe try to reinstall it again?

  • @fun_with_AI269
    @fun_with_AI269 2 ปีที่แล้ว

    Can we share this link to someone else to see the graph??

    • @justintodata
      @justintodata  2 ปีที่แล้ว

      Hi Fahad, I'm guessing you are talking about the final deployed dashboard. You're welcome to share it for your personal use.

  • @azizee
    @azizee 3 ปีที่แล้ว

    my chart to produce show the title. where should i look for the problem?

    • @justintodata
      @justintodata  3 ปีที่แล้ว

      Sorry, you mean you can't see the title of the plotly chart or you want to remove the title? You can change the title in the callback function.

    • @rupinchaudhry592
      @rupinchaudhry592 2 ปีที่แล้ว

      @@justintodata I've experienced something similar. My title and axis titles do not show and more importantly the custom data on mouse hover also does not show...is something wrong with plotly express and dash.....do we have to switch plotly graph objects?

    • @justintodata
      @justintodata  2 ปีที่แล้ว

      @@rupinchaudhry592 Hi Rupin, we just tried to run it again on our environment. It is ok. Maybe try a different version of Dash or a different browser.

    • @rupinchaudhry592
      @rupinchaudhry592 2 ปีที่แล้ว +1

      @@justintodata got it. my dash library was outdated
      Thanks

  • @gabrielnino2892
    @gabrielnino2892 3 ปีที่แล้ว

    Can i try this using M1 Apple Silicone?

    • @justintodata
      @justintodata  3 ปีที่แล้ว

      Hi Gabriel, we are not really experts in hardware. But it should work if you can run Python on it.

  • @chriskeo392
    @chriskeo392 3 ปีที่แล้ว

    Justin2Data is a better name

  • @RobertAlexanderRM
    @RobertAlexanderRM 2 ปีที่แล้ว

    Thanks a lot for this very we'll explained tutorial. I should only suggest that the "import" would be a lot simpler if written as "from dash import Dash, dcc, html, Input, Output" (and of course the corresponding modified "app = Dash()" line). But my code being identical to yours I am not getting the dropdownbox displayed and in the browser get the following error:
    Invalid argument `options` passed into Dropdown with ID "geo-dropdown".
    Value provided:
    [
    {
    "label": "Albany",
    "value:": "Albany"
    },
    {
    "label": "Atlanta",
    "value:": "Atlanta"
    },
    ....
    {
    "label": "West Tex/New Mexico",
    "value:": "West Tex/New Mexico"
    }
    ]
    not understanding what's wrong. Any ideas?

    • @RobertAlexanderRM
      @RobertAlexanderRM 2 ปีที่แล้ว

      FWIW if I replace your "options" line with a simple "options=avocado["geography"].unique()," the code works as it should

    • @justintodata
      @justintodata  2 ปีที่แล้ว +1

      @@RobertAlexanderRM Hi Robert, Dash has updated to a newer version in recent months.
      So now you can use a simpler import statement and provide a list of strings as the options of Dropdown. But the list of dictionaries should still work.

  • @imveryhungry112
    @imveryhungry112 8 หลายเดือนก่อน

    i wish i was smarter so i could understand this :(

  • @suryabanerjee4071
    @suryabanerjee4071 3 ปีที่แล้ว

    Hi. Thanks for the video, it's extremely informative and helpful.
    Can you help me with a persistent issue that I am currently facing? Whenever I am trying to import dash_core_components or dash_html_components or dash_bootstrap_components in jupyter , it's throwing an import error, stating cannot import _explicitize_args , has anyone faced this issue here? Please help. Can elaborate more if someone wants. Thanks in advance!
    P.s I am using dash 1.20.0 , which I believe is the latest version

    • @SorianoTech
      @SorianoTech 2 ปีที่แล้ว +1

      yep! those imports are deprecated so you may want to use: from dash import dcc
      instead of the two import methods you mentioned