Code Monkey home page Code Monkey logo

dashboards.jl's Introduction

OBSOLETE - Development of this package has continued as Dash.jl, the official Julia back end for Plotly Dash

dashboards.jl's People

Contributors

ericforgy avatar felix-gauthier avatar kimttfung avatar logankilpatrick avatar mbauman avatar nandvinchhi avatar waralex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dashboards.jl's Issues

Requesting new labels

Please add a 'testing' label for changes made in the test folder as well as a 'CI' label for .yml file changes, thnx. This is for the purpose of implementing a PR labeler.

More components, dash-table, dash-daq, etc.

It would be great to use dash-table, dash-daq, etc. I'm really new to Julia.

I suppose that it's just a matter of adding it to ComponentPackages.jl, components_meta.json, and component_sources.json

However, I also suppose they should be additional packages, the same as for Python.

Can there be a hook for additional components?

Better error handling for callbacks

When the programmer makes a mistake in the number of arguments for a callback, the error message is very dificult to parse. In a large app with many callbacks, it will be impossible to understand where the error is coming from.

In the code below, the callid is defined with 2 inputs, but the function itself has only one argument. That throws the error below at runtime.

app = Dash("Test App") do
   html_div() do
     dcc_slider(id="n", min=1, max=10, value=2),
     html_button("Submit", id="submit_button", n_clicks=0),
     html_span("0", id="outval")
   end
end;

callback!(app, callid"{n.value} submit_button.n_clicks => outval.children") do N
  N
end
┌ Error: error handling request
│   exception =
│    MethodError: no method matching (::var"#17#18")(::Int64, ::Int64)
│    Closest candidates are:
│      #17(::Any) at untitled-7814016ae0f6e59fe06df0f4913896fc:41
│    Stacktrace:
│     [1] (::Dashboards.var"#455#456"{Bool,Dash})(::HTTP.Messages.Request) at C:\Users\avik\.julia\packages\Dashboards\hn9XK\src\Dashboards.jl:439
│     [2] handle at C:\Users\avik\.julia\packages\HTTP\hJSsm\src\Handlers.jl:253 [inlined]
│     [3] handle(::HTTP.Handlers.RequestHandlerFunction{Dashboards.var"#455#456"{Bool,Dash}}, ::HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}) at C:\Users\avik\.julia\packages\HTTP\hJSsm\src\Handlers.jl:276
│     [4] #4 at C:\Users\avik\.julia\packages\HTTP\hJSsm\src\Handlers.jl:345 [inlined]
│     [5] macro expansion at C:\Users\avik\.julia\packages\HTTP\hJSsm\src\Servers.jl:360 [inlined]
│     [6] (::HTTP.Servers.var"#13#14"{HTTP.Handlers.var"#4#5"{HTTP.Handlers.RequestHandlerFunction{Dashboards.var"#455#456"{Bool,Dash}}},HTTP.ConnectionPool.Transaction{Sockets.TCPSocket},HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}})() at .\task.jl:333
└ @ HTTP.Servers C:\Users\avik\.julia\packages\HTTP\hJSsm\src\Servers.jl:364

Check install instructions...

julia> import Pkg; Pkg.add("https://github.com/waralex/Dashboards.git")
ERROR: https://github.com/waralex/Dashboards.git is not a valid packagename.
The argument appears to be a URL or path, perhaps you meant `Pkg.add(PackageSpec(url="..."))` or `Pkg.add(PackageSpec(path="..."))`.
Stacktrace:
 [1] pkgerror(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/Pkg/src/Types.jl:112
 [2] check_package_name(::String, ::Symbol) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:28
 [3] iterate at ./none:0 [inlined]
 [4] collect(::Base.Generator{Array{String,1},getfield(Pkg.API, Symbol("##22#23"))}) at ./array.jl:606
 [5] #add#21 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:65 [inlined]
 [6] add at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:65 [inlined]
 [7] #add#20(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.add), ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:64
 [8] add(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:64
 [9] top-level scope at REPL[1]:1

but

(v1.2) pkg> add https://github.com/waralex/Dashboards
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Cloning git-repo `https://github.com/waralex/Dashboards`
  Updating git-repo `https://github.com/waralex/Dashboards`
  Updating git-repo `https://github.com/waralex/Dashboards`
 Resolving package versions...
 Installed Compat ───────── v2.2.0
 Installed CSTParser ────── v1.0.0
 Installed BinaryProvider ─ v0.5.7
 Installed DataStructures ─ v0.17.5
 Installed MbedTLS ──────── v0.7.0
  Updating `~/.julia/environments/v1.2/Project.toml`
  [9024f26f] + Dashboards v0.1.0 #master (https://github.com/waralex/Dashboards)
  Updating `~/.julia/environments/v1.2/Manifest.toml`
  [b99e7846] ↑ BinaryProvider v0.5.6 ⇒ v0.5.7
  [00ebfdb7] + CSTParser v1.0.0
  [34da2185] ↑ Compat v2.1.0 ⇒ v2.2.0
  [9024f26f] + Dashboards v0.1.0 #master (https://github.com/waralex/Dashboards)
  [864edb3b] + DataStructures v0.17.5
  [cd3eb016] + HTTP v0.8.6
  [83e8ac13] + IniFile v0.5.0
  [2535ab7d] + JSON2 v0.3.1
  [1914dd2f] + MacroTools v0.5.1
  [739be429] + MbedTLS v0.7.0
  [bac558e1] + OrderedCollections v1.1.0
  [0796e94c] + Tokenize v0.5.6
  Building MbedTLS ───→ `~/.julia/packages/MbedTLS/a1JFn/deps/build.log`
  Building Dashboards → `~/.julia/packages/Dashboards/noLTU/deps/build.log`

works OK (though with only v1.2).

add images to readme

Hey, Love the work here. Consider adding images to the readme so that people can really see what this is about. IMO, since its a visual tool, images are all that matter when deciding if I should use this.

Support PlotlyBase

Hi, that's a fantastic package, thank you! Would it make sense to support the PlotlyBase interface? We have lots of Plotly code + Interact, which would be much nicer as a unified dash application, but porting it would take time. Supporting PlotlyBase would make it easier.

adding mapbox maps in dash

Congratulations on your work with this package.
I'm trying to add a mapbox map, but I can't. This is the code:

mapbox_access_token = "pk.eyJ1Ijoid2VybmVyLWNhc3RybyIsImEiOiJjanFibHR6d3QweHVwNDN0N2l0YjJzZ2M0In0.NOEK7azVbq29gYfGughIQg"

α = -3.900833
β = -38.390833
city = "Aquiraz"

data = scattermapbox(
lat = [α],
lon = [β],
text = city,
mode = "markers",
marker_size = 10,
)

layout = Layout(
autosize = true,
title = "Gráfico de mapa",
mapbox = attr(
accesstoken = mapbox_access_token,
bearing = 0,
center_lat = α,
center_lon = β,
pitch = 0,
zoom = 6,
style = "dark"
)
)

pj.plot(data, layout)

How do I add this map in dash ?

Docs look wrong

I clicked edit on Github, from this link: https://waralex.github.io/Dashboards.jl/stable/

I found "layoutm​aker" to look odd, with m subscripted. I know the reason, or I guess "layout_m​aker" taken as TeX? I'm not sure what the solution is, and for me that's ok, as I just use there.

With that out of the way, is there any reason to prefer https://github.com/plotly/Dash.jl (or similar Python package) to Dashboard.jl? I got the example to work for the latter, while getting an error for the former, and since I think this package is the future, I guess I'll stay with it, and see how it goes.

Package fails to precompile

julia> using Dashboards
[ Info: Precompiling Dashboards [9024f26f-ba4d-4e0a-965a-ad5b1da667aa]
ERROR: LoadError: LoadError: SystemError: opening file "/components/dash-core-components/dash_core_components/metadata.json": No such file or directory
Stacktrace:
 [1] #systemerror#44(::Nothing, ::typeof(systemerror), ::String, ::Bool) at ./error.jl:134
 [2] systemerror at ./error.jl:134 [inlined]
 [3] #open#512(::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::typeof(open), ::String) at ./iostream.jl:254
 [4] open at ./iostream.jl:246 [inlined]
 [5] #open#271(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(open), ::JSON.Parser.var"#4#5"{DataType,DataType,Nothing,Bool,Bool,Int64}, ::String) at ./io.jl:296
 [6] open at ./io.jl:296 [inlined]
 [7] #parsefile#3 at /Users/dhairyagandhi/.julia/packages/JSON/d89fA/src/Parser.jl:522 [inlined]
 [8] #parsefile at ./none:0 [inlined]
 [9] load_components_meta(::String) at /Users/dhairyagandhi/Downloads/temp/utrain/Dashboards.jl/src/ComponentMetas.jl:70
 [10] load_package_components(::String) at /Users/dhairyagandhi/Downloads/temp/utrain/Dashboards.jl/src/ComponentPackages.jl:88
 [11] @reg_components(::LineNumberNode, ::Module) at /Users/dhairyagandhi/Downloads/temp/utrain/Dashboards.jl/src/ComponentPackages.jl:191
 [12] include at ./boot.jl:328 [inlined]
 [13] include_relative(::Module, ::String) at ./loading.jl:1105
 [14] include(::Module, ::String) at ./Base.jl:31
 [15] top-level scope at none:2
 [16] eval at ./boot.jl:330 [inlined]
 [17] eval(::Expr) at ./client.jl:425
 [18] top-level scope at ./none:3
in expression starting at /Users/dhairyagandhi/Downloads/temp/utrain/Dashboards.jl/src/Dashboards.jl:17
in expression starting at /Users/dhairyagandhi/Downloads/temp/utrain/Dashboards.jl/src/Dashboards.jl:17
ERROR: Failed to precompile Dashboards [9024f26f-ba4d-4e0a-965a-ad5b1da667aa] to /Users/dhairyagandhi/.julia/compiled/v1.3/Dashboards/uhOv3_LMA6s.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1283
 [3] _require(::Base.PkgId) at ./loading.jl:1024
 [4] require(::Base.PkgId) at ./loading.jl:922
 [5] require(::Module, ::Symbol) at ./loading.jl:917

Version info:

julia> versioninfo()
Julia Version 1.3.0
Commit 46ce4d7933 (2019-11-26 06:09 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.0.0)
  CPU: Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)

IOError: stream is closed or unusable

When running the example app and refreshing it in the browser, I get the following error:

┌ Error: error handling request
│   exception =
│    IOError: stream is closed or unusable
│    Stacktrace:
│     [1] check_open at ./stream.jl:328 [inlined]
│     [2] uv_write_async(::Sockets.TCPSocket, ::Ptr{UInt8}, ::UInt64) at ./stream.jl:961
│     [3] uv_write(::Sockets.TCPSocket, ::Ptr{UInt8}, ::UInt64) at ./stream.jl:924
│     [4] unsafe_write(::Sockets.TCPSocket, ::Ptr{UInt8}, ::UInt64) at ./stream.jl:1007
│     [5] unsafe_write at /home/dario/.julia/packages/HTTP/facW7/src/ConnectionPool.jl:174 [inlined]
│     [6] macro expansion at ./gcutils.jl:91 [inlined]
│     [7] write at ./strings/io.jl:186 [inlined]
│     [8] writeheaders(::HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}, ::HTTP.Messages.Response) at /home/dario/.julia/packages/HTTP/facW7/src/Messages.jl:439
│     [9] startwrite(::HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}) at /home/dario/.julia/packages/HTTP/facW7/src/Streams.jl:85
│     [10] handle(::HTTP.Handlers.RequestHandlerFunction{Dashboards.var"#630#631"{Bool,Dash}}, ::HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}) at /home/dario/.julia/packages/HTTP/facW7/src/Handlers.jl:278
│     [11] #4 at /home/dario/.julia/packages/HTTP/facW7/src/Handlers.jl:345 [inlined]
│     [12] macro expansion at /home/dario/.julia/packages/HTTP/facW7/src/Servers.jl:367 [inlined]
│     [13] (::HTTP.Servers.var"#13#14"{HTTP.Handlers.var"#4#5"{HTTP.Handlers.RequestHandlerFunction{Dashboards.var"#630#631"{Bool,Dash}}},HTTP.ConnectionPool.Transaction{Sockets.TCPSocket},HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}})() at ./task.jl:333
└ @ HTTP.Servers ~/.julia/packages/HTTP/facW7/src/Servers.jl:373

It seems like an error with HTTP.jl as seen here JuliaWeb/HTTP.jl#392 but maybe you have an idea @waralex ?

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.