Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 0 additions & 107 deletions Makefile

This file was deleted.

10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,4 @@

![rtemis.draw cover](https://docs.rtemis.org/r/draw/assets/cover.avif)

Interface to Apache ECharts
(<https://echarts.apache.org>) for creating interactive charts and
visualizations. Offers type-checked, validated configuration objects
that mirror the ECharts TypeScript API, with convenience functions for
common chart types.

Allows cross-language support for arbitrarily complex visualizations with a common JSON configuration format. Language-specific high-level APIs provide a user-friendly interface to create and customize common chart types, while low-level APIs allow direct access to the full power of ECharts for advanced users.

First available implementation is in [R](r/README.md)
Interface to JS libraries for high performance interactive visualization using type-checked, validated configuration objects.
88 changes: 88 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# justfile
# ::rtemis::
# 2026- EDG rtemis.org

r_dir := "r"
pkg := `awk '/^Package:/{print $2; exit}' r/DESCRIPTION`
r := env("R", "R")
rscript := env("RSCRIPT", "Rscript")
tarball_glob := pkg + "_*.tar.gz"

# List available recipes
default:
@just --list

_msg msg:
@printf '\033[38;2;108;163;160m[%s] %s\033[0m\n' "$(date '+%Y-%m-%d %H:%M:%S')" "{{msg}}"

# Format R code with air CLI (if available)
format:
@just _msg "─── Formatting {{pkg}} package... ───"
@if command -v air >/dev/null 2>&1; then \
cd {{r_dir}} && air format .; \
else \
echo " Note: 'air' CLI not found — skipping R code formatting."; \
fi
@just _msg "Done"

# Generate roxygen2 documentation
document: format
@just _msg "─── Documenting {{pkg}} package... ───"
cd {{r_dir}} && {{rscript}} -e "roxygen2::roxygenize()"
@just _msg "Done"

# Document and install the package locally with pak
install: document
@just _msg "─── Installing {{pkg}} package... ───"
cd {{r_dir}} && {{rscript}} -e "pak::local_install(upgrade = TRUE)"
@just _msg "Done"

# Run testthat::test_local(stop_on_failure = TRUE)
test:
@just _msg "─── Running testthat tests for {{pkg}}... ───"
cd {{r_dir}} && {{rscript}} -e "testthat::test_local(stop_on_failure = TRUE)"
@just _msg "Done"

# Build the source tarball
build: clean
@just _msg "─── Building {{pkg}} package... ───"
cd {{r_dir}} && {{r}} CMD build .
@just _msg "Done"

# Run R CMD check on the built tarball (pass extra flags, e.g. `just check --as-cran`)
check *flags: build
@just _msg "─── Running R CMD check {{flags}} on {{pkg}}... ───"
cd {{r_dir}} && {{r}} CMD check {{tarball_glob}} {{flags}}
rm -f {{r_dir}}/{{tarball_glob}}
@just _msg "Done"

# Run R CMD check --as-cran
check-cran: (check "--as-cran")

# Run R CMD check --as-cran --no-tests
check-cran-no-tests: (check "--as-cran" "--no-tests")

# Check URLs in package documentation with urlchecker
urls:
@just _msg "─── Checking URLs for {{pkg}}... ───"
cd {{r_dir}} && {{rscript}} -e "urlchecker::url_check()"
@just _msg "Done"

# Build package manual (PDF)
manual:
@just _msg "─── Building manual for {{pkg}}... ───"
cd {{r_dir}} && {{r}} CMD Rd2pdf . --output={{pkg}}.pdf
@just _msg "Done"

# Build pkgdown site
site:
@just _msg "─── Building pkgdown site for {{pkg}}... ───"
cd {{r_dir}} && {{rscript}} -e "pkgdown::build_site()"
@just _msg "Done"

# Remove tarballs and .Rcheck output
clean:
@just _msg "─── Cleaning build artifacts... ───"
rm -rf {{r_dir}}/{{pkg}}.Rcheck
rm -f {{r_dir}}/{{tarball_glob}}
@just _msg "Done"
4 changes: 3 additions & 1 deletion r/.Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@
^pkgdown$
^SKILL\.md$
^LICENSE\.md$
^Makefile$
^justfile$
^tools$
node_modules
5 changes: 4 additions & 1 deletion r/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Package: rtemis.draw
Title: Interactive Visualization
Version: 0.2.2
Version: 0.4.0
Date: 2026-06-29
Authors@R:
person(given = "E.D.", family = "Gennatas", role = c("aut", "cre", "cph"),
email = "gennatas@gmail.com",
Expand Down Expand Up @@ -47,6 +48,8 @@ Collate:
'option.R'
'theme.R'
'draw.R'
'network.R'
'map.R'
'draw_a3.R'
'draw_spectrogram.R'
'draw_gantt.R'
Expand Down
11 changes: 11 additions & 0 deletions r/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export(BarSeries)
export(BoxplotSeries)
export(DataZoom)
export(EChartsOption)
export(GraphEdge)
export(GraphModel)
export(GraphNode)
export(Grid)
export(HeatmapSeries)
export(ItemStyle)
Expand All @@ -17,6 +20,9 @@ export(LabelOption)
export(Legend)
export(LineSeries)
export(LineStyle)
export(MapLibreOption)
export(MapModel)
export(MapRow)
export(MarkArea)
export(MarkAreaDataPoint)
export(MinorSplitLine)
Expand All @@ -27,6 +33,7 @@ export(SankeyLevelOption)
export(SankeyNodeItem)
export(SankeySeries)
export(ScatterSeries)
export(SigmaOption)
export(SplitArea)
export(SplitLine)
export(TextStyle)
Expand All @@ -39,11 +46,15 @@ export(drawOutput)
export(draw_a3)
export(draw_bar)
export(draw_boxplot)
export(draw_choropleth)
export(draw_density)
export(draw_gantt)
export(draw_graph)
export(draw_heatmap)
export(draw_histogram)
export(draw_line)
export(draw_map)
export(draw_network)
export(draw_pie)
export(draw_sankey)
export(draw_scatter)
Expand Down
Loading
Loading