Skip to content

Restructure package, datascience.py -> table.py, and stub map widget#16

Merged
papajohn merged 3 commits intomasterfrom
split-stuff
Jul 21, 2015
Merged

Restructure package, datascience.py -> table.py, and stub map widget#16
papajohn merged 3 commits intomasterfrom
split-stuff

Conversation

@SamLau95
Copy link
Contributor

Before, all the code in this package lived in the datascience.py file.

In this commit, I add a folder structure to the package to facilitate
adding additional functionality. Specifically, I add a maps module
which will eventually contain the logic to render a GMap widget in a
notebook (see #5).

The widget will require Javascript to be placed in the user's
nbextension directory, so I add the relevant code in setup.py to do
so.

After this commit is merged, we are still able to type:

from datascience import *

letters = ['a', 'b', 'c', 'z']
counts = [9, 3, 3, 1]
points = [1, 2, 2, 10]
t = Table([('letter', letters), ('count', counts), ('points', points)])
print(t)
letter | count | points
a      | 9     | 1
b      | 3     | 2
c      | 3     | 2
z      | 1     | 10

With an eventual API of

from datascience import draw_map

draw_map(...)

Resolves #15

SamLau95 and others added 3 commits July 21, 2015 00:15
Before, all the code in this package lived in the `datascience.py` file.

In this commit, I add a folder structure to the package to facilitate
adding additional functionality. Specifically, I add a `maps` module
which will eventually contain the logic to render a GMap widget in a
notebook (see #5).

The widget will require Javascript to be placed in the user's
`nbextension` directory, so I add the relevant code in `setup.py` to do
so.

After this commit is merged, we are still to type:

```python

from datascience import *

letters = ['a', 'b', 'c', 'z']
counts = [9, 3, 3, 1]
points = [1, 2, 2, 10]
t = Table([('letter', letters), ('count', counts), ('points', points)])
print(t)
letter | count | points
a      | 9     | 1
b      | 3     | 2
c      | 3     | 2
z      | 1     | 10

```

With an eventual API of

```python

from datascience import draw_map

draw_map(...)
```

Resolves #15
@papajohn
Copy link
Contributor

Great!

papajohn added a commit that referenced this pull request Jul 21, 2015
Restructure package, datascience.py -> table.py, and stub map widget
@papajohn papajohn merged commit 0a95626 into master Jul 21, 2015
@papajohn papajohn deleted the split-stuff branch July 21, 2015 15:59
chrispyles added a commit to khsu2000/datascience that referenced this pull request Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants