Skip to content

Commit 49b2938

Browse files
committed
fix merge
2 parents d1c2e10 + 6a95f1f commit 49b2938

15 files changed

Lines changed: 1179 additions & 226 deletions

File tree

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
patreon: danfojs

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: node_js
2+
node_js:
3+
- node
4+
- 8
5+
- 10
6+
- 12
7+
script:
8+
- export NODE_ENV=test
9+
- npm run build
10+
- npm run test
11+
- npm run lint
12+
- nyc --silent npm run test
13+
- nyc report --reporter=text-lcov | coveralls
14+
- nyc check-coverage --lines 70
15+
after_success:
16+
-
17+
notifications:
18+
email: false
19+
sudo: false

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at danfojs@gmail.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

README.md

Lines changed: 25 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11

22
<div align="center">
3-
<img src="logo.png"><br>
3+
<img src="assets/logo.png"><br>
44
</div>
55

66
-----------------
77

88
## danfojs: powerful javascript data analysis toolkit
99
![Node.js CI](https://github.com/opensource9ja/danfojs/workflows/Node.js%20CI/badge.svg?branch=master)
1010
[![](https://data.jsdelivr.com/v1/package/npm/danfojs/badge?style=rounded)](https://www.jsdelivr.com/package/npm/danfojs)
11-
11+
[![Build Status](https://travis-ci.org/opensource9ja/danfojs.svg?branch=master)](https://travis-ci.org/opensource9ja/danfojs)
12+
![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2FDanfoJs)
1213

1314

1415
## What is it?
@@ -38,6 +39,7 @@ easy and intuitive. It is heavily inspired by [Pandas](https://pandas.pydata.org
3839
sets
3940
- Robust IO tools for loading data from [flat-files](https://jsdata.gitbook.io/danfojs/api-reference/input-output)
4041
(CSV and delimited) and JSON data format.
42+
- Powerful, flexible and intutive API for [plotting](https://app.gitbook.com/@jsdata/s/danfojs/~/drafts/-MESZnq3_VBU0EW71MxS/api-reference/plotting) DataFrames and Series interactively.
4143
- [Timeseries](https://jsdata.gitbook.io/danfojs/api-reference/series#accessors)-specific functionality: date range
4244
generation and date and time properties.
4345

@@ -114,7 +116,7 @@ dfd.read_csv("https://web.stanford.edu/class/archive/cs/cs109/cs109.1166/stuff/t
114116
To use danfo.js via script tags, copy and paste the CDN below to your HTML file
115117

116118
```html
117-
<script src="https://cdn.jsdelivr.net/npm/danfojs@0.0.13/dist/index.min.js"></script>
119+
<script src="https://cdn.jsdelivr.net/npm/danfojs@0.0.14/dist/index.min.js"></script>
118120
```
119121

120122
### Example Usage in the Browser
@@ -126,83 +128,54 @@ To use danfo.js via script tags, copy and paste the CDN below to your HTML file
126128
<head>
127129
<meta charset="UTF-8">
128130
<meta name="viewport" content="width=device-width, initial-scale=1.0">
129-
<script src="https://cdn.jsdelivr.net/npm/danfojs@0.0.13/dist/index.min.js"></script>
131+
<script src="https://cdn.jsdelivr.net/npm/danfojs@0.0.14/dist/index.min.js"></script>
130132
<title>Document</title>
131133
</head>
132134

133135
<body>
134136

135-
<div id="some_div"></div>
136-
<div id="alldiv"></div>
137+
<div id="div1"></div>
138+
<div id="div2"></div>
139+
<div id="div3"></div>
140+
137141
<script>
138142
139-
dfd.read_csv("https://raw.githubusercontent.com/risenW/medium_tutorial_notebooks/master/train.csv")
143+
dfd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv")
140144
.then(df => {
141-
df.describe().print()
142-
143-
//prints in console
144-
// Shape: (5,5)
145-
146-
// ╔════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╤═══════════════════╗
147-
// ║ │ Product_Weight │ Product_Shelf... │ Product_Price │ Product_Super... │ Supermarket_O... ║
148-
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
149-
// ║ count │ 4188 │ 4990 │ 4990 │ 4990 │ 4990 ║
150-
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
151-
// ║ mean │ 12.908838 │ 0.066916 │ 391.803772 │ 6103.52002 │ 2004.783447 ║
152-
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
153-
// ║ std │ NaN │ 0.053058 │ 119.378259 │ 4447.333835 │ 8.283151 ║
154-
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
155-
// ║ min │ 4.555 │ 0 │ 78.730003 │ 83.230003 │ 1992 ║
156-
// ╟────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────┼───────────────────╢
157-
// ║ median │ NaN │ 0.053564 │ 393.86 │ 5374.675 │ 2006 ║
158-
// ╚════════╧═══════════════════╧═══════════════════╧═══════════════════╧═══════════════════╧═══════════════════╝
159-
160-
var layout = {
161-
title: 'A sample plot',
162-
xaxis: {
163-
title: 'X',
164-
},
165-
yaxis: {
166-
title: 'Y',
167-
}
168-
};
169-
170-
//Displays plot in the specified div
171-
df['Product_Weight'].plot("some_div", { kind: "histogram" })
172-
df.plot("alldiv", { x: "Product_Price", y: "Product_Shelf_Visibility", kind: "scatter", mode: 'markers' })
173145
146+
df['AAPL.Open'].plot("div1").box() //makes a box plot
147+
148+
df.plot("div2").table() //display csv as table
149+
150+
new_df = df.set_index({ key: "Date" }) //resets the index to Date column
151+
new_df.plot("div3").line({ columns: ["AAPL.Open", "AAPL.High"] }) //makes a timeseries plot
174152
175153
}).catch(err => {
176154
console.log(err);
177155
})
156+
178157
</script>
158+
179159
</body>
180160

181161
</html>
182162
```
183163

184-
## Installation from sources
185-
To install danfo in [development mode], clone the repo:
186-
187-
```sh
188-
git clone https://github.com/opensource9ja/danfojs
189-
```
190-
191-
cd into danfojs folder and run:
164+
Output:
165+
![](danfo-sample.gif)
192166

193-
```sh
194-
npm install
195-
```
196167

197168
## Documentation
198169
The official documentation can be found [here](https://jsdata.gitbook.io/danfojs/)
199170

200171
## Discussion and Development
201-
Most development discussions take place on github in this repo. Feel free to use the issues tab.
172+
Most development discussions take place on our [issues](https://github.com/opensource9ja/danfojs/issues) tab.
202173

203174
## Contributing to Danfo
204-
All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. A detailed overview on how to contribute can be found in the [contributing guide](https://jsdata.gitbook.io/danfojs/contributing-guide). As contributors and maintainers to this project, you are expected to abide by danfo' code of conduct. More information can be found at: [Contributor Code of Conduct](https://github.com/pandas-dev/pandas/blob/master/.github/CODE_OF_CONDUCT.md) Javascript version of Pandas
175+
All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. A detailed overview on how to contribute can be found in the [contributing guide](https://jsdata.gitbook.io/danfojs/contributing-guide).
205176

206177
#### Licence [MIT](https://github.com/opensource9ja/danfojs/blob/master/LICENCE)
207178

179+
#### Created by [Rising Odegua](https://github.com/risenW) and [Stephen Oni](https://github.com/steveoni)
180+
208181
#### Logo Design By [Seyi Oniyitan](https://twitter.com/seyioniyitan)

assets/logo-gif.gif

117 KB
Loading

assets/logo.png

225 KB
Loading

0 commit comments

Comments
 (0)