Skip to content

Commit 0c37616

Browse files
committed
modified README.md and package.json
1 parent 12eadea commit 0c37616

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

README.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ It works both in node.js and in the browser.
99
If you use npm, you can install it with:
1010

1111
```sh
12-
npm install ecStat
12+
npm install echarts-stat
1313
```
14-
14+
1515
Otherwise, download this tool from [dist directory](https://github.com/ecomfe/echarts-stat/tree/master/dist):
1616

1717
```html
1818
<script src='./dist/ecStat.js'></script>
1919
<script>
2020
21-
var result = ecStat.clustering.hierarchicalKMeans(data, clusterNumber, false);
21+
var result = ecStat.clustering.hierarchicalKMeans(data, clusterNumber, false);
2222
2323
</script>
2424
```
@@ -39,7 +39,7 @@ var result = ecStat.clustering.hierarchicalKMeans(data, clusterNumber, stepBySte
3939
```
4040
##### Parameter
4141

42-
* data - `Two-dimensional Numeric Array`, each data point can have more than two numeric attributes in the original data set. In the following example, `data[0]` is called `data point` and `data[0][1]` is one of the numeric attributes of `data[0]`.
42+
* data - `Two-dimensional Numeric Array`, each data point can have more than two numeric attributes in the original data set. In the following example, `data[0]` is called `data point` and `data[0][1]` is one of the numeric attributes of `data[0]`.
4343

4444
```js
4545
var data = [
@@ -48,7 +48,7 @@ var result = ecStat.clustering.hierarchicalKMeans(data, clusterNumber, stepBySte
4848
[11, 12, 13, 14, 15],
4949
...
5050
];
51-
```
51+
```
5252
* clusterNumer - `number`, the number of clusters generated
5353
* stepByStep - `Boolean`, control whether doing the clustering step by step
5454

@@ -68,7 +68,7 @@ var result = ecStat.clustering.hierarchicalKMeans(data, clusterNumber, stepBySte
6868
result.clusterAssment = [
6969

7070
[1, 0.145],
71-
[2, 0.680],
71+
[2, 0.680],
7272
[0, 1.022],
7373
...
7474
];
@@ -79,7 +79,7 @@ var result = ecStat.clustering.hierarchicalKMeans(data, clusterNumber, stepBySte
7979
[0.335, -3.376],
8080
[-0.994, -0.884],
8181
...
82-
],
82+
],
8383
...
8484
];
8585
```
@@ -88,17 +88,17 @@ var result = ecStat.clustering.hierarchicalKMeans(data, clusterNumber, stepBySte
8888

8989
You can not only do cluster analysis through this interface, but also use [ECharts](https://github.com/ecomfe/echarts) to visualize the results.
9090

91-
Note: the clustering algorithm can handle multiple numeric attributes, but for the convenience of visualization, two numeric attributes are chosen here as an example.
91+
Note: the clustering algorithm can handle multiple numeric attributes, but for the convenience of visualization, two numeric attributes are chosen here as an example.
9292

93-
##### Directly visualize the results of clustering
93+
##### Directly visualize the results of clustering
9494

9595
```html
9696
<script src='https://cdn.bootcss.com/echarts/3.4.0/echarts.js'></script>
9797
<script src='./dist/ecStat.js'></script>
9898
<script>
9999
100100
var clusterNumber = 3;
101-
var result = ecStat.clustering.hierarchicalKMeans(data, clusterNumber, false);
101+
var result = ecStat.clustering.hierarchicalKMeans(data, clusterNumber, false);
102102
103103
</script>
104104
```
@@ -113,9 +113,9 @@ var result = ecStat.clustering.hierarchicalKMeans(data, clusterNumber, false);
113113
<script src='https://cdn.bootcss.com/echarts/3.4.0/echarts.js'></script>
114114
<script src='./dist/ecStat.js'></script>
115115
<script>
116-
116+
117117
var clusterNumber = 6;
118-
var result = ecStat.clustering.hierarchicalKMeans(data, clusterNumber, true);
118+
var result = ecStat.clustering.hierarchicalKMeans(data, clusterNumber, true);
119119
120120
</script>
121121
```
@@ -127,7 +127,7 @@ var result = ecStat.clustering.hierarchicalKMeans(data, clusterNumber, true);
127127

128128
### Regression
129129

130-
Regression algorithm can according to the value of the dependent and independent variables of the data set, fitting out a curve to reflect their trends. The regression algorithm here only supports two numeric attributes.
130+
Regression algorithm can according to the value of the dependent and independent variables of the data set, fitting out a curve to reflect their trends. The regression algorithm here only supports two numeric attributes.
131131

132132
#### Syntax
133133
```
@@ -172,7 +172,7 @@ var myRegression = ecStat.regression(regressionType, data, order);
172172

173173
You can not only do regression analysis through this interface, you can also use [ECharts](https://github.com/ecomfe/echarts) to visualize the results.
174174

175-
##### Linear Regression
175+
##### Linear Regression
176176

177177
```html
178178
<script src='https://cdn.bootcss.com/echarts/3.4.0/echarts.js'></script>
@@ -194,7 +194,7 @@ var myRegression = ecStat.regression('linear', data);
194194
<script src='https://cdn.bootcss.com/echarts/3.4.0/echarts.js'></script>
195195
<script src='./dist/ecStat.js'></script>
196196
<script>
197-
197+
198198
var myRegression = ecStat.regression('exponential', data);
199199
200200
</script>
@@ -210,7 +210,7 @@ var myRegression = ecStat.regression('exponential', data);
210210
<script src='https://cdn.bootcss.com/echarts/3.4.0/echarts.js'></script>
211211
<script src='./dist/ecStat.js'></script>
212212
<script>
213-
213+
214214
var myRegression = ecStat.regression('logarithmic', data);
215215
216216
</script>
@@ -226,7 +226,7 @@ var myRegression = ecStat.regression('logarithmic', data);
226226
<script src='https://cdn.bootcss.com/echarts/3.4.0/echarts.js'></script>
227227
<script src='./dist/ecStat.js'></script>
228228
<script>
229-
229+
230230
var myRegression = ecStat.regression('polynomial', data, 3);
231231
232232
</script>
@@ -251,7 +251,7 @@ var maxValue = ecStat.statistic.max(dataList);
251251
##### Parameter
252252

253253
* dataList : `Array.<number>`
254-
254+
255255
##### Return Value
256256

257257
* maxValue: `number`, the maximum value of the data list
@@ -266,7 +266,7 @@ var minValue = ecStat.statistic.min(dataList);
266266
##### Parameter
267267

268268
* dataList : `Array.<number>`
269-
269+
270270
##### Return Value
271271

272272
* minValue: `number`, the minimum value of the data list
@@ -281,7 +281,7 @@ var meanValue = ecStat.statistic.mean(dataList);
281281
##### Parameter
282282

283283
* dataList : `Array.<number>`
284-
284+
285285
##### Return Value
286286

287287
* meanValue: `number`, the average of the data list
@@ -296,7 +296,7 @@ var medianValue = ecStat.statistic.median(dataList);
296296
##### Parameter
297297

298298
* dataList : `Array.<number>`
299-
299+
300300
##### Return Value
301301

302302
* medianValue: `number`, the median of the data list
@@ -311,7 +311,7 @@ var sumValue = ecStat.statistic.sum(dataList);
311311
##### Parameter
312312

313313
* dataList : `Array.<number>`
314-
314+
315315
##### Return Value
316316

317317
* sumValue: `number`, the sum of the data list

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "ecStat",
2+
"name": "echarts-stat",
33
"version": "1.0.0",
4-
"description": "a statistical tool",
4+
"description": "a statistical tool for ECharts",
55
"main": "index.js",
66
"author": {
77
"name": "Deqing",

0 commit comments

Comments
 (0)