{"id":28631452,"url":"https://github.com/dreamrs/uplot-r","last_synced_at":"2025-07-16T03:37:08.967Z","repository":{"id":62654393,"uuid":"518526575","full_name":"dreamRs/uPlot-r","owner":"dreamRs","description":"R htmlwidget for µPlot.js","archived":false,"fork":false,"pushed_at":"2025-04-29T16:11:15.000Z","size":10443,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-12T13:46:28.478Z","etag":null,"topics":["data-visualization","htmlwidgets","r"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dreamRs.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-27T16:06:25.000Z","updated_at":"2025-05-23T19:31:00.000Z","dependencies_parsed_at":"2025-04-18T09:44:34.806Z","dependency_job_id":"8c8c7a6f-1363-4d6d-9755-463891465400","html_url":"https://github.com/dreamRs/uPlot-r","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dreamRs/uPlot-r","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamRs%2FuPlot-r","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamRs%2FuPlot-r/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamRs%2FuPlot-r/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamRs%2FuPlot-r/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dreamRs","download_url":"https://codeload.github.com/dreamRs/uPlot-r/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamRs%2FuPlot-r/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265479627,"owners_count":23773574,"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-visualization","htmlwidgets","r"],"created_at":"2025-06-12T13:30:56.742Z","updated_at":"2025-07-16T03:37:08.903Z","avatar_url":"https://github.com/dreamRs.png","language":"JavaScript","readme":"\n# uPlot\n\n\u003e R htmlwidget for [µPlot](https://github.com/leeoniya/uPlot) JavaScript library. μPlot is a fast, memory-efficient Canvas 2D-based chart for plotting time series, lines, areas, ohlc \u0026 bars.\n\n\u003c!-- badges: start --\u003e\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n[![R-CMD-check](https://github.com/dreamRs/uPlot-r/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dreamRs/uPlot-r/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\n\n## Installation\n\nYou can install the development version of uPlot from [GitHub](https://github.com/dreamRs/uPlot-r) with:\n\n```r\n# install.packages(\"remotes\")\nremotes::install_github(\"dreamRs/uPlot-r\")\n```\n\n## Example\n\nHere's a time series in hourly steps over 12 years, representing a total of 874,584 points (9 series of 97,176).\n\n```r\nlibrary(uPlot)\nuPlot(data = eco2mix[, c(1, 3:11)]) %\u003e% \n  uOptions(\n    title = \"Electricity production by sources in France (2012 - 2023)\"\n  ) %\u003e% \n  uColors(\n    \"bioenergies\" = \"#156956\",\n    \"fuel\" = \"#80549f\",\n    \"coal\" = \"#a68832\",\n    \"solar\" = \"#d66b0d\",\n    \"gas\" = \"#f20809\",\n    \"wind\" = \"#72cbb7\",\n    \"hydraulic\" = \"#2672b0\",\n    \"nuclear\" = \"#e4a701\",\n    \"pumping\" = \"#0e4269\"\n  )\n```\n![uPlot example](man/figures/uplot.png)\n\n\n\nArea ranges examples :\n\n```r\nuPlot(data = temperatures) %\u003e% \n  uOptions(\n    title = \"Temperatures in 2022 with range from 2018 to 2021\"\n  ) %\u003e% \n  uAxesY(\n    label = \"Temperature in degree celsius\",\n    values = JS(\"function(u, vals) {return vals.map(v =\u003e v + '°C');}\")\n  ) %\u003e% \n  uBands(\"low\", \"high\", fill = \"#8485854D\") %\u003e% \n  uSeries(\"temperature\", label = \"Temperature (°C)\", stroke = \"red\", width = 2) %\u003e% \n  uSeries(\"low\", label = \"Low\", stroke = \"#848585\", dash = c(8, 2)) %\u003e% \n  uSeries(\"high\", label = \"High\", stroke = \"#848585\", dash = c(8, 2)) %\u003e% \n  uSeries(\"average\", label = \"Average\", show = FALSE, stroke = \"#111\")\n```\n\n![temperature 1 example](man/figures/temperature1.png)\n\n\n```r\nuPlot(data = temperatures[, c(1, 2, 5)]) %\u003e% \n  uOptions(\n    title = \"Temperatures in 2022 compared to average from previous years\"\n  ) %\u003e% \n  uAxesY(\n    label = \"Temperature in degree celsius\",\n    values = JS(\"function(u, vals) {return vals.map(v =\u003e v + '°C');}\")\n  ) %\u003e% \n  uBands(\"temperature\", \"average\", fill = \"#F681804D\") %\u003e%\n  uBands(\"average\", \"temperature\", fill = \"#2F64FF4D\") %\u003e% \n  uSeries(\n    serie = \"temperature\",\n    label = \"Temperature 2022\", \n    stroke = \"red\", \n    width = 2,\n    value = JS(\"function(u, v) {return v === null ? '--' : uPlot.fmtNum(v) + '°C';}\")\n  ) %\u003e% \n  uSeries(\n    serie = \"average\",\n    label = \"Average 2018-2021\",\n    stroke = \"black\",\n    width = 2,\n    value = JS(\"function(u, v) {return v === null ? '--' : uPlot.fmtNum(v) + '°C';}\")\n  )\n```\n\n![temperature 2 example](man/figures/temperature2.png)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamrs%2Fuplot-r","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdreamrs%2Fuplot-r","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamrs%2Fuplot-r/lists"}