From fb565d16e67c43c9bc4eff0d32125ffc50908b17 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Thu, 26 Oct 2023 11:21:24 +1000 Subject: [PATCH] [DOCS] Standardize Markdown code blocks: word case and whitespace (#1060) --- R/README.md | 8 ++++---- R/vignettes/articles/apache-sedona.Rmd | 2 +- docs/api/flink/Function.md | 10 +++++----- docs/api/sql/Function.md | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/R/README.md b/R/README.md index 41314eb56f..c98d26ea3d 100644 --- a/R/README.md +++ b/R/README.md @@ -11,7 +11,7 @@ enabling higher-level access through a `{dplyr}` backend and familiar R function ## Installation To use Apache Sedona from R, you just need to install the apache.sedona package; Spark dependencies are managed directly by the package. -``` r +```r # Install released version from CRAN install.packages("apache.sedona") ``` @@ -21,7 +21,7 @@ To use the development version, you will need both the latest version of the pac To get the latest R package from GtiHub: -``` r +```r # Install development version from GitHub devtools::install_github("apache/sedona/R") ``` @@ -40,7 +40,7 @@ The path to the sedona-spark-shaded jars needs to be put in the `SEDONA_JAR_FILE The first time you load Sedona, Spark will download all the dependent jars, which can take a few minutes and cause the connection to timeout. You can either retry (some jars will already be downloaded and cached) or increase the `"sparklyr.connect.timeout"` parameter in the sparklyr config. -``` r +```r library(sparklyr) library(apache.sedona) @@ -51,7 +51,7 @@ sc <- spark_connect(master = "local") polygon_sdf <- spark_read_geojson(sc, location = "/tmp/polygon.json") ``` -``` r +```r mean_area_sdf <- polygon_sdf %>% dplyr::summarize(mean_area = mean(ST_Area(geometry))) print(mean_area_sdf) diff --git a/R/vignettes/articles/apache-sedona.Rmd b/R/vignettes/articles/apache-sedona.Rmd index 0d28210b55..b08e2dd306 100644 --- a/R/vignettes/articles/apache-sedona.Rmd +++ b/R/vignettes/articles/apache-sedona.Rmd @@ -362,7 +362,7 @@ to Sedona visualization routines. For example, the following is essentially the R equivalent of [this example in Scala](https://github.com/apache/sedona/blob/f6b1c5e24bdb67d2c8d701a9b2af1fb5658fdc4d/viz/src/main/scala/org/apache/sedona/viz/showcase/ScalaExample.scala#L142-L160). -``` {r} +```{r} resolution_x <- 1000 resolution_y <- 600 boundary <- c(-126.790180, -64.630926, 24.863836, 50.000) diff --git a/docs/api/flink/Function.md b/docs/api/flink/Function.md index e88e4da416..81d82542aa 100644 --- a/docs/api/flink/Function.md +++ b/docs/api/flink/Function.md @@ -1246,7 +1246,7 @@ Format: `ST_H3CellDistance(cell1: Long, cell2: Long)` Since: `v1.5.0` Example: -```SQL +```sql select ST_H3CellDistance(ST_H3CellIDs(ST_GeomFromWKT('POINT(1 2)'), 8, true)[1], ST_H3CellIDs(ST_GeomFromWKT('POINT(1.23 1.59)'), 8, true)[1]) ``` @@ -1291,7 +1291,7 @@ Format: `ST_H3CellIDs(geom: geometry, level: Int, fullCover: true)` Since: `v1.5.0` Example: -```SQL +```sql SELECT ST_H3CellIDs(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)'), 6, true) ``` @@ -1318,7 +1318,7 @@ Format: `ST_H3KRing(cell: Long, k: Int, exactRing: Boolean)` Since: `v1.5.0` Example: -```SQL +```sql select ST_H3KRing(ST_H3CellIDs(ST_GeomFromWKT('POINT(1 2)'), 8, true)[1], 1, false), ST_H3KRing(ST_H3CellIDs(ST_GeomFromWKT('POINT(1 2)'), 8, true)[1], 1, true) ``` @@ -1342,7 +1342,7 @@ Format: `ST_H3ToGeom(cells: Array[Long])` Since: `v1.5.0` Example: -```SQL +```sql SELECT ST_H3ToGeom(ST_H3CellIDs(ST_GeomFromWKT('POINT(1 2)'), 8, true)[0], 1, true)) ``` @@ -2189,7 +2189,7 @@ Since: `v1.4.0` Example: -```SQL +```sql SELECT ST_S2CellIDs(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)'), 6) ``` diff --git a/docs/api/sql/Function.md b/docs/api/sql/Function.md index 9ef38b0e12..0e6d3beaa0 100644 --- a/docs/api/sql/Function.md +++ b/docs/api/sql/Function.md @@ -1257,7 +1257,7 @@ Format: `ST_H3CellDistance(cell1: Long, cell2: Long)` Since: `v1.5.0` Spark SQL example: -```SQL +```sql select ST_H3CellDistance(ST_H3CellIDs(ST_GeomFromWKT('POINT(1 2)'), 8, true)[0], ST_H3CellIDs(ST_GeomFromWKT('POINT(1.23 1.59)'), 8, true)[0]) ``` @@ -1302,7 +1302,7 @@ Format: `ST_H3CellIDs(geom: geometry, level: Int, fullCover: Boolean)` Since: `v1.5.0` Spark SQL example: -```SQL +```sql SELECT ST_H3CellIDs(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)'), 6, true) ``` @@ -1329,7 +1329,7 @@ Format: `ST_H3KRing(cell: Long, k: Int, exactRing: Boolean)` Since: `v1.5.0` Spark SQL example: -```SQL +```sql SELECT ST_H3KRing(ST_H3CellIDs(ST_GeomFromWKT('POINT(1 2)'), 8, true)[0], 1, true) cells union select ST_H3KRing(ST_H3CellIDs(ST_GeomFromWKT('POINT(1 2)'), 8, true)[0], 1, false) cells ``` @@ -1354,7 +1354,7 @@ Format: `ST_H3ToGeom(cells: Array[Long])` Since: `v1.5.0` Spark SQL example: -```SQL +```sql SELECT ST_H3ToGeom(ST_H3CellIDs(ST_GeomFromWKT('POINT(1 2)'), 8, true)[0], 1, true)) ``` @@ -2199,7 +2199,7 @@ Since: `v1.4.0` Spark SQL Example: -```SQL +```sql SELECT ST_S2CellIDs(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)'), 6) ```