{"id":18886529,"url":"https://github.com/facultyai/scala-plotly-client","last_synced_at":"2025-04-14T21:31:09.408Z","repository":{"id":57716326,"uuid":"53142236","full_name":"facultyai/scala-plotly-client","owner":"facultyai","description":"Visualise your data from Scala using Plotly","archived":false,"fork":false,"pushed_at":"2020-08-15T16:35:28.000Z","size":769,"stargazers_count":40,"open_issues_count":10,"forks_count":11,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-03-25T20:20:49.859Z","etag":null,"topics":["data-science","graph","plot","plotly","scala","visualisation"],"latest_commit_sha":null,"homepage":"https://facultyai.github.io/scala-plotly-client/","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/facultyai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-04T14:50:21.000Z","updated_at":"2024-01-04T16:03:29.000Z","dependencies_parsed_at":"2022-08-26T13:11:54.520Z","dependency_job_id":null,"html_url":"https://github.com/facultyai/scala-plotly-client","commit_stats":null,"previous_names":["the-asi/plotly-client"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facultyai%2Fscala-plotly-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facultyai%2Fscala-plotly-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facultyai%2Fscala-plotly-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facultyai%2Fscala-plotly-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/facultyai","download_url":"https://codeload.github.com/facultyai/scala-plotly-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223647330,"owners_count":17179231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","graph","plot","plotly","scala","visualisation"],"created_at":"2024-11-08T07:28:11.992Z","updated_at":"2024-11-08T07:28:12.631Z","avatar_url":"https://github.com/facultyai.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/ASIDataScience/scala-plotly-client.svg)](https://travis-ci.org/ASIDataScience/scala-plotly-client)\n\n# Plotly client\n\n## Installation\n\nTo add the plotly client to your code, add the following lines to your `build.sbt`:\n\n```scala\nlibraryDependencies += \"co.theasi\" %% \"plotly\" % \"0.2.0\"\n```\n\nTo install the bleeding edge version, add this instead:\n\n```scala\nresolvers += \"Sonatype OSS Snapshots\" at \"https://oss.sonatype.org/content/repositories/snapshots\"\n\nlibraryDependencies += \"co.theasi\" %% \"plotly\" % \"0.2.1-SNAPSHOT\"\n```\n\n## Documentation\n\n - Tutorials will be included as part of the [Plotly documentation](https://plot.ly/api/) when the interface stabilises.\n\n - [API documentation](http://asidatascience.github.io/scala-plotly-client/latest/api/#co.theasi.plotly.package).\n\n## Authentication\n\nTo create a graph on Plotly, start by opening an account with the web UI. Then create an API key by clicking on your username in the top right hand corner of the screen and selecting *SETTINGS \u003e API KEYS*. Create the file `~/.plotly/.credentials` in your home directory. The file should look like:\n\n```json\n{\n  \"username\": \"pbugnion\",\n  \"api_key\": \"l233fgfdsjk\"\n}\n```\n\nNote that if you have already used another Plotly client, you probably do not need to do this.\n\n## Your first graph\n\nTo create a graph on the Plotly servers, start by importing the client:\n\n```scala\nimport co.theasi.plotly._\n```\n\nThen, just pass the *x*, *y* series that you want to plot:\n\n```scala\nscala\u003e val x = Vector(1.0, 2.0, 3.0)\n\nscala\u003e val y = Vector(1.0, 4.0, 9.0)\n\nscala\u003e val p = Plot().withScatter(x, y)\n\nscala\u003e draw(p, \"hello-plotly\")\nPlotFile = PlotFile(pbugnion:264,hello-plotly)\n```\n\nThis will create a graph called `hello-plotly` in your account!\n\n## Using custom credentials\n\nSometimes, creating a `~/.plotly/.credentials` file isn't practical. In that case, you can pass credentials to Plotly programatically by defining a custom server.\n\n```scala\nimport co.theasi.plotly._\n\nimplicit val server = new writer.Server {\n  val credentials = writer.Credentials(\"\u003cusername\u003e\", \"\u003capi_key\u003e\")\n  val url = \"https://api.plot.ly/v2/\"\n}\n```\n\nYou can then use Plotly commands normally:\n\n```scala\nscala\u003e val p = Plot().withScatter(Vector(1, 2, 3), Vector(1, 4, 9))\n\nscala\u003e draw(p, \"custom-credentials\")\nPlotFile = PlotFile(pbugnion:268,custom-credentials)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacultyai%2Fscala-plotly-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffacultyai%2Fscala-plotly-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacultyai%2Fscala-plotly-client/lists"}