John Coene
john-coene.com/talks/unige
R, Go, Javascript at opifex.org
Socials:
Use the github installation*
CRAN
install.packages("echarts4r")
Github
# install.packages("remotes") remotes::install_github("JohnCoene/echarts4r")
iris |> e_charts(x = Sepal.Length) |> e_scatter(serie = Sepal.Width)
iris |> group_by(Species) |> e_charts(Sepal.Length) |> e_scatter(Sepal.Width)
iris |> group_by(Species) |> e_charts(x = Sepal.Length) |> e_scatter(serie = Sepal.Width) |> e_tooltip()
iris |> group_by(Species) |> e_charts(x = Sepal.Length) |> e_scatter(serie = Sepal.Width) |> e_tooltip() |> e_axis_labels(x = "Sepal Length")
iris |> group_by(Species) |> e_charts(x = Sepal.Length) |> e_scatter(serie = Sepal.Width) |> e_tooltip() |> e_axis_labels(x = "Sepal Length") |> e_theme("essos")
iris |> group_by(Species) |> e_charts(x = Sepal.Length) |> e_scatter(serie = Sepal.Width) |> e_tooltip() |> e_axis_labels(x = "Sepal Length") |> e_theme("essos") |> e_title("Iris", "Length and Width")
iris |> group_by(Species) |> e_charts(x = Sepal.Length) |> e_scatter(serie = Sepal.Width) |> e_tooltip() |> e_axis_labels(x = "Sepal Length") |> e_theme("essos") |> e_title("Iris", "Length and Width") |> e_legend(right = 0)
iris |> group_by(Species) |> e_charts(Sepal.Length, timeline = TRUE) |> e_scatter(Sepal.Width)
iris |> e_charts(Sepal.Length) |> e_scatter(Sepal.Width, Petal.Length) |> e_visual_map(Petal.Length)
quakes |> e_charts(long) |> e_geo( roam = TRUE, boundingCoords = list( c(200, -10), c(165, -40) ) ) |> e_scatter(lat, mag, coord_system = "geo") |> e_visual_map(min = 4, max = 6.5)
e_charts(mtcars, qsec) |> e_scatter(mpg, wt) |> e_datazoom(startValue = 14)
data <- expand.grid( x = seq(-3, 3, by = 0.05), y = seq(-3, 3, by = 0.05) ) |> dplyr::mutate(z = sin(x * x + y * y) * x / 3.14) data |> e_charts(x) |> e_surface(y, z, wireframe = list(show = FALSE)) |> e_visual_map(z)
df <- data.frame(x = 1:10, y = rnorm(10, 10, 2)) style <- list(normal = list(opacity = 0.5), emphasis = list(opacity = 1)) path <- "path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z" df |> e_charts(x) |> e_pictorial(y, symbol = path, barCategoryGap = "-130%", itemStyle = style)
cns <- countrycode::codelist$country.name.en cns <- data.frame( country = cns, value = runif(length(cns), 1, 100) ) cns |> e_charts(country) |> e_map(value) |> e_visual_map(value)
data <- jsonlite::fromJSON("https://echarts.apache.org/examples/data-gl/asset/data/population.json") data <- as.data.frame(data) names(data) <- c("lon", "lat", "value") data |> e_charts(lon) |> e_geo_3d() |> e_bar_3d(lat, value, coord_system = "geo3D") |> e_visual_map()