{"id":16971578,"url":"https://github.com/johncoene/countup","last_synced_at":"2025-03-22T14:31:23.327Z","repository":{"id":85365977,"uuid":"81713823","full_name":"JohnCoene/countup","owner":"JohnCoene","description":"⏱️ countup.js R htmlwidget","archived":false,"fork":false,"pushed_at":"2020-08-16T09:01:25.000Z","size":996,"stargazers_count":37,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T15:29:22.749Z","etag":null,"topics":["countup","htlmwidgets","r","rmarkdown","rstats"],"latest_commit_sha":null,"homepage":"","language":"R","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/JohnCoene.png","metadata":{"files":{"readme":"README.Rmd","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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-02-12T08:49:55.000Z","updated_at":"2023-11-02T17:01:45.000Z","dependencies_parsed_at":"2023-03-24T01:17:34.845Z","dependency_job_id":null,"html_url":"https://github.com/JohnCoene/countup","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Fcountup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Fcountup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Fcountup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Fcountup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnCoene","download_url":"https://codeload.github.com/JohnCoene/countup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244971964,"owners_count":20540898,"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":["countup","htlmwidgets","r","rmarkdown","rstats"],"created_at":"2024-10-14T00:52:44.559Z","updated_at":"2025-03-22T14:31:23.315Z","avatar_url":"https://github.com/JohnCoene.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: \n  github_document:\n    html_preview: false\n---\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"README-\"\n)\n```\n\n\u003c!-- badges: start --\u003e\n[![Travis build status](https://travis-ci.org/JohnCoene/countup.svg?branch=master)](https://travis-ci.org/JohnCoene/countup)\n\u003c!-- badges: end --\u003e\n\n![](./man/figures/logo.png)\n\nThe underlying JavaScript libraries are [CountUp.js](https://github.com/inorganik/CountUp.js), and [Odometer](https://github.hubspot.com/odometer/docs/welcome/).\n\n## Install\n\nInstall from Github with `remotes`:\n\n```{r, eval=FALSE}\n# install.packages(\"remotes\")\nremotes::install_github(\"JohnCoene/countup\")\n```\n\n## News\n\nSince version `0.1.1` the package also includes the [odometer](https://github.hubspot.com/odometer/docs/welcome/) widget.\n\n## Examples\n\nIn the R console or R markdown.\n\n```{r, eval=FALSE}\nlibrary(countup)\n\ncountup(25)\n\ncountup(\n  count = 1729,\n  useEasing = TRUE,\n  useGrouping = TRUE,\n  separator = \",\",\n  decimal = \".\",\n  prefix = \"US$\",\n  suffix = \" bejillion\"\n)\n```\n\nIn Shiny (since version `0.1.0`), there are methods to programatically interact with the counter.\n\n```r\nlibrary(shiny)\nlibrary(countup)\n\nui \u003c- fluidPage(\n  h1(countupOutput(\"cnt\")),\n  actionButton(\"start\", \"start\"),\n  actionButton(\"pause\", \"pause / resume\"),\n  numericInput(\"value\", \"update to:\", min = 1, max = 1000, value = 24)\n)\n\nserver \u003c- function(input, output, session) {\n\n  output$cnt \u003c- renderCountup({\n    countup(1000, duration = 10, start = FALSE)\n  })\n\n  observeEvent(input$start, {\n    countupProxy(\"cnt\") %\u003e% \n      countup_start()\n  })\n\n  observeEvent(input$value, {\n    countupProxy(\"cnt\") %\u003e% \n      countup_update(input$value)\n  })\n\n  observeEvent(input$pause, {\n    countupProxy(\"cnt\") %\u003e% \n      countup_pause_resume()\n  })\n\n}\n\nshinyApp(ui, server)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohncoene%2Fcountup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohncoene%2Fcountup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohncoene%2Fcountup/lists"}