Skip to content

Commit 0f884be

Browse files
minor cleaning
1 parent 4cce5a2 commit 0f884be

File tree

107 files changed

+54
-9131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+54
-9131
lines changed

Diff for: PyData-D3-in-Jupyter.pdf

8.08 MB
Binary file not shown.

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
# d3-jupyter-tutorial
2+
3+
This repo contains Jupyter notebooks, along with related code and example data, for a tutorial on the use of D3 in Jupyter.
4+
5+
The presentation file `PyData-D3-in-Jupyter.pdf` provides an entry point and overview.

Diff for: d3_lib.py

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import random
2+
import inspect, os
3+
from string import Template
4+
5+
6+
def this_dir():
7+
this_file = inspect.getfile(inspect.currentframe())
8+
return os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
9+
10+
11+
def set_styles(css_file_names):
12+
if type(css_file_names) == str:
13+
style = open(this_dir() + '/css/' + css_file_names + '.css','r').read()
14+
else:
15+
style = ''
16+
for css_file_name in css_file_names:
17+
style += open(this_dir() + '/css/' + css_file_name + '.css','r').read()
18+
return "<style>" + style + "</style>"
19+
20+
21+
def draw_graph(type, data):
22+
23+
JS_text = Template('''
24+
25+
<div id='maindiv${divnum}'></div>
26+
27+
<script>
28+
$main_text
29+
</script>
30+
31+
''')
32+
33+
divnum = int(random.uniform(0,9999999999))
34+
35+
main_text_template = Template( open(this_dir() + '/js/' + type + '.js','r').read() )
36+
37+
main_text = main_text_template.safe_substitute({'divnum': divnum, 'data': str(data)})
38+
return JS_text.safe_substitute({'divnum': divnum, 'main_text': main_text})

Diff for: lib/sigmajs/LICENSE.txt

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Copyright (C) 2013-2014, Alexis Jacomy, http://sigmajs.org
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
4+
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
5+
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
10+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
12+
IN THE SOFTWARE.

Diff for: lib/topojson/.gitignore

-3
This file was deleted.

Diff for: lib/topojson/.npmignore

-2
This file was deleted.

Diff for: lib/topojson/LICENSE

-26
This file was deleted.

Diff for: lib/topojson/Makefile

-48
This file was deleted.

Diff for: lib/topojson/README.md

-5
This file was deleted.

Diff for: lib/topojson/bin/bower

-24
This file was deleted.

Diff for: lib/topojson/bin/package

-47
This file was deleted.

0 commit comments

Comments
 (0)