Skip to content

Commit c73cbc9

Browse files
authored
Merge pull request #70 from AmyYH/branch-0.3.x
EN translation of files under doc-en/source/restful.
2 parents 877ab67 + c6ebb20 commit c73cbc9

File tree

16 files changed

+280
-280
lines changed

16 files changed

+280
-280
lines changed

doc-cn/source/restful/restful_config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
> **注意:**
1111
> * 在 local 模式下,Spark 在一个物理节点内运行。配置示例如 `--interpreter_master=local[8]`,其中 `[8]` 表示使用 8 个 CPU。
12-
> * 在 standalone 模式下,你需要指定 maseter url。配置示例如 `--interpreter_master=spark://IP:PORT`
12+
> * 在 standalone 模式下,你需要指定 master url。配置示例如 `--interpreter_master=spark://IP:PORT`
1313
1414
- `interpreter_pyspark_python`: Spark executor 的 Python 解释器的绝对路径。
1515
- `interpreter_pyspark_driver_python`: Spark driver 的 Python 解释器的绝对路径。

doc-en/source/restful/api/function/choroplethmap.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Choropleth map
1+
# Choropleth Map
22

3-
Draws the choropleth map according to the relevant parameters and returns a Base64 image.
3+
Draws a choropleth map according to the relevant drawing parameters and returns the map in Base64 format.
44

55
## Request description
66

@@ -14,22 +14,22 @@ Draws the choropleth map according to the relevant parameters and returns a Base
1414

1515
Parameter description:
1616

17-
- `input_data`: 输入数据描述,需为已定义的变量名称或可执行的 Python 语句。
18-
- `region_boundaries`: 轮廓的位置,格式为 WKB 的 pandas.Series
19-
- `weights`: 轮廓权重,为 float64 或 int64 类型的 pandas.Series
20-
- `params`: 绘图参数。
21-
- `width`: 图片宽度。
22-
- `height`: 图片高度。
23-
- `bounding_box`: 渲染图片所表示的地理范围 [x_min, y_min, x_max, y_max]
24-
- `coordinate_system`: 输入数据的坐标系统,详见 [World Geodetic System](https://en.wikipedia.org/wiki/World_Geodetic_System)
25-
- `color_gradient`: 轮廓的颜色渐变范围,即轮廓的颜色从左边渐变到右边。
26-
- `color_bound`: 轮廓颜色的取值范围,与 `color_gradient` 配合使用。
27-
- `opacity`: 轮廓的不透明度。
28-
- `aggregation_type`: 聚合类型。
17+
- `input_data`: Description of input data. Needs to be the names of the defined variables or executable Python statements.
18+
- `region_boundaries`: Location of the contour, which is pandas.Series in WKB format.
19+
- `weights`: Weight of the contour, which is pandas.Series of float64 type or int64 type.
20+
- `params`: Drawing parameters.
21+
- `width`: Width of the image.
22+
- `height`: Height of the image.
23+
- `bounding_box`: Geographic extent represented by the rendered image [x_min, y_min, x_max, y_max].
24+
- `coordinate_system`: Coordinate system of the input data. See [World Geodetic System](https://en.wikipedia.org/wiki/World_Geodetic_System) for more information.
25+
- `color_gradient`: The color gradient range of the contour, that is, the color of the contour is gradient from the left to the right.
26+
- `color_bound`: Value range of the contour color, used together with `color_gradient`.
27+
- `opacity`: Opacity of the contour.
28+
- `aggregation_type`: Aggregation type.
2929

3030
### Python backend
3131

32-
The example for Python backend is as follows:
32+
A JSON example for the Python backend is as follows:
3333

3434
```json
3535
{
@@ -52,7 +52,7 @@ The example for Python backend is as follows:
5252

5353
### PySpark backend
5454

55-
If you use the PySpark backend, you only need to change the `input_data` in the example of Python backend to the following SQL query:
55+
If you use the PySpark backend, you only need to change the `input_data` in the above example for Python backend to the corresponding SQL query. See the following example:
5656

5757
```
5858
"sql": "select ST_GeomFromText(buildingtext_pickup) as polygon, fare_amount as count from raw_data where buildingtext_pickup!=''"
@@ -62,13 +62,13 @@ If you use the PySpark backend, you only need to change the `input_data` in the
6262

6363
### Python
6464

65-
The example uses Python's `requests` library to call `Arctern RESTful API`. Run the following command to install `requests`:
65+
Examples in this article use Python's `requests` library. Run the following command to install `requests`:
6666

6767
```bash
6868
pip install requests
6969
```
7070

71-
Here is an example of calling the `choroplethmap` API:
71+
Sample code:
7272

7373
```python
7474
import requests
@@ -130,6 +130,6 @@ curl --location --request POST 'http://localhost:8080/choroplethmap' \
130130
{
131131
"status": "success",
132132
"code": "200",
133-
"result": "使用 Base64 编码后的轮廓图数据"
133+
"result": "Base64-encoded choropleth map data"
134134
}
135135
```

doc-en/source/restful/api/function/command.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Run codes
1+
# Code Execution
22

3-
执行给定的 Python 代码。
3+
Executes a given Python code.
44

55
## Request description
66

@@ -18,19 +18,19 @@
1818

1919
Parameter description:
2020

21-
- `command`: 待执行的 Python 代码。
21+
- `command`: The Python code to execute.
2222

2323
## Request example
2424

2525
### Python
2626

27-
The example uses Python's `requests` library to call `Arctern RESTful API`. Run the following command to install `requests`:
27+
Examples in this article use Python's `requests` library. Run the following command to install `requests`:
2828

2929
```bash
3030
pip install requests
3131
```
3232

33-
Here is an example of calling the `command` API:
33+
Sample code:
3434

3535
```python
3636
import requests

doc-en/source/restful/api/function/fishnetmap.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
# Fishnet map
1+
# Fishnet Map
22

3-
根据相关画图参数绘制渔网图,将绘图结果以 Base64 编码方式返回。
3+
Draws a fishnet map according to the relevant drawing parameters and returns the map in Base64 format.
44

55
## Request description
66

77
- Method: `POST`
88
- URL: `/fishnetmap`
99
- Headers:
1010
- `Content-Type: application/json`
11-
- Body: See [Body example](#Body-example)
11+
- Body: See [Body example](#Body-example).
1212

1313
## Body example
1414

1515
Parameter description:
1616

17-
- `input_data`: 输入数据描述,需为已定义的变量名称或可执行的 Python 语句。
18-
- `points`: 渔网网格的位置,格式为 WKB 的 pandas.Series
19-
- `weights`: 渔网网格的权重,为 float64 或 int64 类型的 pandas.Series
20-
- `params`: 绘图参数。
21-
- `width`: 图片宽度。
22-
- `height`: 图片高度。
23-
- `bounding_box`: 渲染图片所表示的地理范围 [x_min, y_min, x_max, y_max]
24-
- `coordinate_system`: 输入数据的坐标系统,详见 [World Geodetic System](https://en.wikipedia.org/wiki/World_Geodetic_System)
25-
- `color_gradient`: 渔网网格的颜色渐变范围,目前仅支持默认值 ["#0000FF", "#FF0000"]
26-
- `cell_size`: 渔网网格的边长。
27-
- `cell_spacing`: 渔网网格之间的间隔。
28-
- `opacity`: 渔网网格的不透明度。
29-
- `aggregation_type`: 聚合类型。
17+
- `input_data`: Description of input data. Needs to be the names of the defined variables or executable Python statements.
18+
- `points`: Location of the fishnet cell, which is pandas.Series in WKB format.
19+
- `weights`: Weight of the fishnet cell, which is pandas.Series of float64 type or int64 type.
20+
- `params`: Drawing parameters.
21+
- `width`: Width of the image.
22+
- `height`: Height of the image.
23+
- `bounding_box`: Geographic extent represented by the rendered image [x_min, y_min, x_max, y_max].
24+
- `coordinate_system`: Coordinate system of the input data. See [World Geodetic System](https://en.wikipedia.org/wiki/World_Geodetic_System) for more information.
25+
- `color_gradient`: The color gradient range of the fishnet cell. Supports the default value ["#0000FF", "#FF0000"] only.
26+
- `cell_size`: Size of the fishnet cell.
27+
- `cell_spacing`: Spacing between fishnet cells.
28+
- `opacity`: Opacity of the fishnet cell.
29+
- `aggregation_type`: Aggregation type.
3030

3131
### Python backend
3232

33-
The example for Python backend is as follows:
33+
A JSON example for the Python backend is as follows:
3434

3535
```json
3636
{
@@ -54,7 +54,7 @@ The example for Python backend is as follows:
5454

5555
### PySpark backend
5656

57-
If you use the PySpark backend, you only need to change the `input_data` in the example of Python backend to the following SQL query:
57+
If you use the PySpark backend, you only need to change the `input_data` in the above example to the corresponding SQL query. See the following example:
5858

5959
```
6060
"sql": "select ST_Point(pickup_longitude, pickup_latitude) as point, fare_amount as count from raw_data"
@@ -64,13 +64,13 @@ If you use the PySpark backend, you only need to change the `input_data` in the
6464

6565
### Python
6666

67-
The example uses Python's `requests` library to call `Arctern RESTful API`. Run the following command to install `requests`:
67+
Examples in this article use Python's `requests` library. Run the following command to install `requests`:
6868

6969
```bash
7070
pip install requests
7171
```
7272

73-
Here is an example of calling the `fishnetmap` API:
73+
Sample code:
7474

7575
```python
7676
import requests
@@ -134,6 +134,6 @@ curl --location --request POST 'http://localhost:8080/fishnetmap' \
134134
{
135135
"status": "success",
136136
"code": "200",
137-
"result": "使用 Base64 编码后的渔网图数据"
137+
"result": "Base64-encoded fishnet map data"
138138
}
139139
```

doc-en/source/restful/api/function/heatmap.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
# Heat map
1+
# Heat Map
22

3-
根据相关画图参数绘制热力图,将绘图结果以 Base64 编码方式返回。
3+
Draws a heat map according to the relevant drawing parameters and returns the map in Base64 format.
44

55
## Request description
66

77
- Method: `POST`
88
- URL: `/heatmap`
99
- Headers:
1010
- `Content-Type: application/json`
11-
- Body: See [Body example](#Body-example)
11+
- Body: See [Body example](#Body-example).
1212

1313
## Body example
1414

1515
Parameter description:
1616

17-
- `input_data`: 输入数据描述,需为已定义的变量名称或可执行的 Python 语句。
18-
- `points`: 点的位置,格式为 WKB 的 pandas.Series
19-
- `weights`: 热力值,为 float64 或 int64 类型的 pandas.Series
20-
- `params`: 绘图参数。
21-
- `width`: 图片宽度。
22-
- `height`: 图片高度。
23-
- `bounding_box`: 渲染图片所表示的地理范围 [x_min, y_min, x_max, y_max]
24-
- `coordinate_system`: 输入数据的坐标系统,详见 [World Geodetic System](https://en.wikipedia.org/wiki/World_Geodetic_System)
25-
- `map_zoom_level`: 地图放大比例,取值范围 [1, 15]
26-
- `aggregation_type`: 聚合类型。
17+
- `input_data`: Description of input data. Needs to be the names of the defined variables or executable Python statements.
18+
- `points`: Location of the point, which is pandas.Series in WKB format.
19+
- `weights`: Heat value, which is pandas.Series of float64 type or int64 type.
20+
- `params`: Drawing parameters.
21+
- `width`: Width of the image.
22+
- `height`: Height of the image.
23+
- `bounding_box`: Geographic extent represented by the rendered image [x_min, y_min, x_max, y_max].
24+
- `coordinate_system`: Coordinate system of the input data. See [World Geodetic System](https://en.wikipedia.org/wiki/World_Geodetic_System) for more information.
25+
- `map_zoom_level`: Zoom level of the map, in the range of [1, 15].
26+
- `aggregation_type`: Aggregation type.
2727

2828
### Python backend
2929

30-
The example for Python backend is as follows:
30+
A JSON example for the Python backend is as follows:
3131

3232
```json
3333
{
@@ -48,7 +48,7 @@ The example for Python backend is as follows:
4848

4949
### PySpark backend
5050

51-
If you use the PySpark backend, you only need to change the `input_data` in the example of Python backend to the following SQL query:
51+
If you use the PySpark backend, you only need to change the `input_data` in the above example for Python backend to the corresponding SQL query. See the following example:
5252

5353
```
5454
"sql": "select ST_Point(pickup_longitude, pickup_latitude) as point, fare_amount as weights from raw_data"
@@ -58,13 +58,13 @@ If you use the PySpark backend, you only need to change the `input_data` in the
5858

5959
### Python
6060

61-
The example uses Python's `requests` library to call `Arctern RESTful API`. Run the following command to install `requests`:
61+
Examples in this article use Python's `requests` library. Run the following command to install `requests`:
6262

6363
```bash
6464
pip install requests
6565
```
6666

67-
Here is an example of calling the `heatmap` API:
67+
Sample code:
6868

6969
```python
7070
import requests
@@ -122,6 +122,6 @@ curl --location --request POST 'http://localhost:8080/heatmap' \
122122
{
123123
"status": "success",
124124
"code": "200",
125-
"result": "使用 Base64 编码后的热力图数据"
125+
"result": "Base64-encoded heat map data"
126126
}
127127
```

doc-en/source/restful/api/function/icon_viz.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
# Icon map
1+
# Icon Map
22

3-
根据相关画图参数绘制图标图,将绘图结果以 Base64 编码方式返回。
3+
Draws an icon map according to the relevant drawing parameters and returns the map in Base64 format.
44

55
## Request description
66

77
- Method: `POST`
88
- URL: `/icon_viz`
99
- Headers:
1010
- `Content-Type: application/json`
11-
- Body: See [Body example](#Body-example)
11+
- Body: See [Body example](#Body-example).
1212

1313
## Body example
1414

1515
Parameter description:
1616

17-
- `input_data`: 输入数据描述,需为已定义的变量名称或可执行的 Python 语句。
18-
- `points`: 点的位置,格式为 WKB 的 pandas.Series
19-
- `params`: 绘图参数。
20-
- `width`: 图片宽度。
21-
- `height`: 图片高度。
22-
- `bounding_box`: 渲染图片所表示的地理范围 [x_min, y_min, x_max, y_max]
23-
- `icon_path`: png 图标文件的绝对路径。
24-
- `coordinate_system`: 输入数据的坐标系统,详见 [World Geodetic System](https://en.wikipedia.org/wiki/World_Geodetic_System)
17+
- `input_data`: Description of input data. Needs to be the names of the defined variables or executable Python statements.
18+
- `points`: Location of points, which is pandas.Series in WKB format.
19+
- `params`: Drawing parameters.
20+
- `width`: Width of the image.
21+
- `height`: Height of the image.
22+
- `bounding_box`: Geographic extent represented by the rendered image [x_min, y_min, x_max, y_max].
23+
- `icon_path`: Absolute path to the icon file in PNG format.
24+
- `coordinate_system`: Coordinate system of the input data. See [World Geodetic System](https://en.wikipedia.org/wiki/World_Geodetic_System) for more information.
2525

2626
### Python backend
2727

28-
The example for Python backend is as follows:
28+
A JSON example for the Python backend is as follows:
2929

3030
```json
3131
{
@@ -44,7 +44,7 @@ The example for Python backend is as follows:
4444

4545
### PySpark backend
4646

47-
If you use the PySpark backend, you only need to change the `input_data` in the example of Python backend to the following SQL query:
47+
If you use the PySpark backend, you only need to change the `input_data` in the above example for Python backend to the corresponding SQL query. See the following example:
4848

4949
```
5050
"sql": "select ST_Point(pickup_longitude, pickup_latitude) as point from raw_data"
@@ -54,13 +54,13 @@ If you use the PySpark backend, you only need to change the `input_data` in the
5454

5555
### Python
5656

57-
The example uses Python's `requests` library to call `Arctern RESTful API`. Run the following command to install `requests`:
57+
Examples in this article use Python's `requests` library. Run the following command to install `requests`:
5858

5959
```bash
6060
pip install requests
6161
```
6262

63-
Here is an example of calling the `icon_viz` API:
63+
Sample code:
6464

6565
```python
6666
import requests
@@ -114,6 +114,6 @@ curl --location --request POST 'http://localhost:8080/icon_viz' \
114114
{
115115
"status": "success",
116116
"code": "200",
117-
"result": "使用 Base64 编码后的图标图数据"
117+
"result": "Base64-encoded icon map data"
118118
}
119119
```

0 commit comments

Comments
 (0)