{"id":17485700,"url":"https://github.com/doktormike/r-bayesian","last_synced_at":"2025-04-22T15:25:37.087Z","repository":{"id":70914469,"uuid":"69678735","full_name":"DoktorMike/r-bayesian","owner":"DoktorMike","description":"This is the R Bayesian Data Science Toolkit","archived":false,"fork":false,"pushed_at":"2018-04-12T08:02:32.000Z","size":23,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T05:22:38.849Z","etag":null,"topics":["bayesian-applications","bayesian-inference","docker","opencpu","probabilistic-graphical-models","probabilistic-programming"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DoktorMike.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-30T15:31:44.000Z","updated_at":"2021-10-28T12:10:17.000Z","dependencies_parsed_at":"2023-03-11T09:28:08.137Z","dependency_job_id":null,"html_url":"https://github.com/DoktorMike/r-bayesian","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoktorMike%2Fr-bayesian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoktorMike%2Fr-bayesian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoktorMike%2Fr-bayesian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoktorMike%2Fr-bayesian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DoktorMike","download_url":"https://codeload.github.com/DoktorMike/r-bayesian/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250266016,"owners_count":21402214,"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":["bayesian-applications","bayesian-inference","docker","opencpu","probabilistic-graphical-models","probabilistic-programming"],"created_at":"2024-10-19T02:08:32.659Z","updated_at":"2025-04-22T15:25:37.077Z","avatar_url":"https://github.com/DoktorMike.png","language":null,"readme":"# R Bayesian\nThis is the R Bayesian Data Science Toolkit for deployment purposes.\n\n## Docker image\n\n[![](https://images.microbadger.com/badges/image/drmike/r-bayesian.svg)](https://microbadger.com/images/drmike/r-bayesian \"Get your own image badge on microbadger.com\") [![](https://images.microbadger.com/badges/version/drmike/r-bayesian.svg)](https://microbadger.com/images/drmike/r-bayesian \"Get your own version badge on microbadger.com\")\n\n## Build\n\n[![Build Status](https://travis-ci.org/DoktorMike/r-bayesian.svg?branch=master)](https://travis-ci.org/DoktorMike/r-bayesian) [![Coverage Status](https://coveralls.io/repos/github/DoktorMike/r-bayesian/badge.svg?branch=master)](https://coveralls.io/github/DoktorMike/r-bayesian?branch=master)\n\n## Quick start\n\nTo start using this container and playing around with it you should start by pulling it into your machine and opening an interactive bash session by writing\n\n```bash\nsudo docker pull drmike/r-bayesian\nsudo docker run -it drmike/r-bayesian bash\n```\n\nin your terminal.\n\nYou can also make sure that you run the OpenCPU server inside the docker and test the stupidweather prediction api included in this release.\n\n```bash\ndocker run -d -p 80:80 -p 443:443 -p 8004:8004 drmike/r-bayesian\ncurl http://localhost:8004/ocpu/library/stupidweather/R/predictweather/json -H \"Content-Type: application/json\" -d '{\"n\":6}'\n```\n\nwhich on windows most likely have to be:\n\n```bash\ncurl http://localhost/ocpu/library/stupidweather/R/predictweather/json -Method Post\n```\n\nsince curl is slightly different there.\n\nBe sure to replace the ip number with the ip number you received when you started the docker container. On linux systems this can be referred to as localhost. On windows it will be a specific IP. On Windows 10 I think localhost also works.\n\nIf you want to play around with the interface you can open up your browser and surf to http://localhost/ocpu/test/ where again the IP number has to be updated to your specific IP that you got when starting the docker.\n\n## Worked examples\n\nThis code represents two ways of getting the weather prediction for the next 6 days.\n\n```bash\n# Posting parameters as JSON\ncurl http://localhost:8004/ocpu/library/stupidweather/R/predictweather/json -H \"Content-Type: application/json\" -d '{\"n\":6}'\n\n# Same thing using post and afterwards get. Remember to replace the id with the output you get\ncurl http://localhost:8004/ocpu/library/stupidweather/R/predictweather -d 'n=6'\ncurl http://localhost:8004/ocpu/tmp/x036827416d/stdout/text\n```\n\nWe can also upload data and look at the summaries:\n\n```bash\n# Upload local file mydata.csv\ncurl http://localhost:8004/ocpu/library/utils/R/read.csv -F \"file=@mydata.csv\"\n\n# Replace session id with returned one above\ncurl http://localhost:8004/ocpu/tmp/x067b4172/R/.val/print\ncurl http://localhost:8004/ocpu/library/base/R/summary -d \"object=x067b4172\"\n```\n\n## About this container\n\nSo why did I go through the trouble of creating this container? Well first off I didn't find a container for deploying Bayesian applications using [R](https://www.r-project.org) that suited my needs. Thus I created this one with the sole purpose of having a small barebone platform on which I could build many different Bayesian applications in R. When I say Bayesian I mean Bayesian models fitted using [Stan](http://mc-stan.org). According to me Hamiltonian Markov Chain Monte Carlo is currently the best option we have for building general Bayesian models.\n\nI borrowed heavily from the [Rocker](https://hub.docker.com/u/rocker) repository as I think they built some really nice containers. Dirk and the others, keep up the great work. ;)\n\nAnother thing I've added to the mix since we are talking about deployment is [OpenCPU](https://www.opencpu.org) which basically allows R to be called through javascript libraries and exposing the power of R directly on the web. Note that this is very different than Shiny as it doesn't require you to learn specific frameworks or syntaxes. It's just R piped through AJAX.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoktormike%2Fr-bayesian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoktormike%2Fr-bayesian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoktormike%2Fr-bayesian/lists"}