Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jabrena/spring-boot-and-r-language
A repository to explore how to interact with R from Java with Spring Boot
https://github.com/jabrena/spring-boot-and-r-language
data-science java r-language spring-boot statistics
Last synced: about 1 month ago
JSON representation
A repository to explore how to interact with R from Java with Spring Boot
- Host: GitHub
- URL: https://github.com/jabrena/spring-boot-and-r-language
- Owner: jabrena
- License: apache-2.0
- Created: 2024-02-09T14:51:19.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-02-21T20:40:27.000Z (11 months ago)
- Last Synced: 2024-10-27T20:41:42.320Z (3 months ago)
- Topics: data-science, java, r-language, spring-boot, statistics
- Language: Java
- Homepage:
- Size: 743 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring Boot & R Stat Server
[![Java CI](https://github.com/jabrena/spring-boot-and-r-language/actions/workflows/maven.yml/badge.svg)](https://github.com/jabrena/spring-boot-and-r-language/actions/workflows/maven.yml)
**Cloud IDEs:**
[![](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/jabrena/spring-boot-and-r)
---
## Motivation
A repository to explore how to interact with **R** from **Java** with **Spring Boot** in order to use both programming languages to extract knowledge from data samples.
![](./docs/architectural-solution.png)
## Features
- [x] Run **RStudio** from Docker compose.
- [x] Provide bidirectional ways/ideas to interact between Java & R.
- [ ] Send 2D Array from Java in order to process in R and return to a web document.
- [ ] Provide Data from Java in order to be consumed in R remotely.## How to run the project from Spring Boot
```bash
docker compose build
./mvnw spring-boot:run -Dspring-boot.run.profiles=dev
./mvnw spring-boot:run -Dspring-boot.run.profiles=prodcurl "http://localhost:8080/"
curl -v http://localhost:8080/download/employee.csv
```## How to run the project from Docker compose
```bash
docker compose build
docker compose up -d --profile dev
docker compose up -d --profile prodcurl "http://localhost:3000/"
curl "http://localhost:3000/echo"
curl "http://localhost:3000/echo?msg=hello"
curl "http://localhost:3000/plot"
curl "http://localhost:3000/sum" -H "Content-Type: application/json" --data '{"a":4, "b":5}'#Swagger from Plumber
open http://localhost:3000/__docs__/docker compose down
```**RStudio:**
```
open http://localhost:8787/
```## References
- https://spring.io/projects/spring-boot
- https://hypermedia.systems/book/contents/
- https://rocker-project.org/
- https://www.rplumber.io/
- https://www.tidyverse.org/
- https://www.r-project.org/
- https://r-graph-gallery.com/
- https://www.rdocumentation.org/
- https://github.com/rstudio## Previous works:
- https://stat.ethz.ch/pipermail/r-help/2006-June/107869.html
Made with ❤️ from Madrid