jsongrapher 1.6__py3-none-any.whl → 3.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- JSONGrapher/JSONRecordCreator.py +2870 -227
- JSONGrapher/UnitPytesting.py +125 -0
- JSONGrapher/UnitpyCustomUnitsTesting.py +28 -0
- JSONGrapher/__init__.py +1 -1
- JSONGrapher/drag_and_drop_gui.py +109 -0
- JSONGrapher/equation_creator.py +374 -0
- JSONGrapher/equation_evaluator.py +670 -0
- JSONGrapher/styles/__init__.py +0 -0
- JSONGrapher/styles/layout_styles_library.py +68 -0
- JSONGrapher/styles/trace_styles_collection_library.py +194 -0
- JSONGrapher/units_list.py +27 -0
- jsongrapher-3.7.data/data/LICENSE +9 -0
- jsongrapher-3.7.data/data/README.md +101 -0
- jsongrapher-3.7.dist-info/LICENSE +9 -0
- jsongrapher-3.7.dist-info/METADATA +128 -0
- jsongrapher-3.7.dist-info/RECORD +18 -0
- jsongrapher-1.6.data/data/LICENSE +0 -24
- jsongrapher-1.6.data/data/README.md +0 -79
- jsongrapher-1.6.dist-info/LICENSE +0 -24
- jsongrapher-1.6.dist-info/METADATA +0 -101
- jsongrapher-1.6.dist-info/RECORD +0 -10
- {jsongrapher-1.6.dist-info → jsongrapher-3.7.dist-info}/WHEEL +0 -0
- {jsongrapher-1.6.dist-info → jsongrapher-3.7.dist-info}/top_level.txt +0 -0
@@ -1,79 +0,0 @@
|
|
1
|
-
# JSONGrapherRC
|
2
|
-
A python package for creating JSONGrapher Records
|
3
|
-
|
4
|
-
To use JSONGrapherRC, first install it using pip:
|
5
|
-
<pre>
|
6
|
-
pip install JSONGrapherRC[COMPLETE]
|
7
|
-
</pre>
|
8
|
-
|
9
|
-
Alternatively, you can download the directory directly.<br>
|
10
|
-
It is easiest to then follow the [example file](https://github.com/AdityaSavara/JSONGrapherRC/blob/main/example/exampleUsageJSONRecordCreator.py) to learn.<br>
|
11
|
-
|
12
|
-
|
13
|
-
## **1\. Preparing to Create a Record**
|
14
|
-
|
15
|
-
Let's create an example where we plot the height of a pear tree over several years. Assuming a pear tree grows approximately 0.40 meters per year, we'll generate sample data with some variation.
|
16
|
-
<pre>
|
17
|
-
x_label_including_units = "Time (years)"
|
18
|
-
y_label_including_units = "Height (m)"
|
19
|
-
time_in_years = [0, 1, 2, 3, 4]
|
20
|
-
tree_heights = [0, 0.42, 0.86, 1.19, 1.45]
|
21
|
-
</pre>
|
22
|
-
|
23
|
-
## **2\. Creating and Populating a New JSONGrapher Record**
|
24
|
-
|
25
|
-
The easiest way to start is with the `create_new_JSONGrapherRecord()` function. While you *can* instantiate the JSONGrapherRecord class directly, this function is generally more convenient. We'll create a record and inspect its default fields.
|
26
|
-
<pre>
|
27
|
-
try:
|
28
|
-
from JSONGRapherRC import JSONRecordCreator # Normal usage
|
29
|
-
except ImportError:
|
30
|
-
import JSONRecordCreator # If the class file is local
|
31
|
-
|
32
|
-
Record = JSONRecordCreator.create_new_JSONGrapherRecord()
|
33
|
-
Record.set_comments("Tree Growth Data collected from the US National Arboretum")
|
34
|
-
Record.set_datatype("Tree_Growth_Curve")
|
35
|
-
Record.set_x_axis_label_including_units(x_label_including_units)
|
36
|
-
Record.set_y_axis_label_including_units(y_label_including_units)
|
37
|
-
Record.add_data_series(series_name="pear tree growth", x_values=time_in_years, y_values=tree_heights, plot_type="scatter_spline")
|
38
|
-
Record.set_graph_title("Pear Tree Growth Versus Time")
|
39
|
-
</pre>
|
40
|
-
|
41
|
-
## **3\. Exporting to File**
|
42
|
-
|
43
|
-
We now have a JSONGrapher record! We can export it to a file, which can then be used with JSONGrapher.
|
44
|
-
<pre>
|
45
|
-
Record.export_to_json_file("ExampleFromTutorial.json")
|
46
|
-
Record.print_to_inspect()
|
47
|
-
</pre>
|
48
|
-
|
49
|
-
<p><strong>Expected Output:</strong></p>
|
50
|
-
<pre>
|
51
|
-
JSONGrapher Record exported to, ./ExampleFromTutorial.json
|
52
|
-
{
|
53
|
-
"comments": "Tree Growth Data collected from the US National Arboretum",
|
54
|
-
"datatype": "Tree_Growth_Curve",
|
55
|
-
"data": [
|
56
|
-
{
|
57
|
-
"name": "pear tree growth",
|
58
|
-
"x": [0, 1, 2, 3, 4],
|
59
|
-
"y": [0, 0.42, 0.86, 1.19, 1.45],
|
60
|
-
"type": "scatter",
|
61
|
-
"line": { "shape": "spline" }
|
62
|
-
}
|
63
|
-
],
|
64
|
-
"layout": {
|
65
|
-
"title": "Pear Tree Growth Versus Time",
|
66
|
-
"xaxis": { "title": "Time (year)" },
|
67
|
-
"yaxis": { "title": "Height (m)" }
|
68
|
-
}
|
69
|
-
}
|
70
|
-
</pre>
|
71
|
-
|
72
|
-
|
73
|
-
We can also plot the data using Matplotlib and export the plot as a PNG file.
|
74
|
-
<pre>
|
75
|
-
Record.plot_with_matplotlib()
|
76
|
-
Record.export_to_matplotlib_png("ExampleFromTutorial")
|
77
|
-
</pre>
|
78
|
-
|
79
|
-
[](https://raw.githubusercontent.com/AdityaSavara/JSONGrapherRC/main/example/ExampleFromTutorial.png)
|
@@ -1,24 +0,0 @@
|
|
1
|
-
This is free and unencumbered software released into the public domain.
|
2
|
-
|
3
|
-
Anyone is free to copy, modify, publish, use, compile, sell, or
|
4
|
-
distribute this software, either in source code form or as a compiled
|
5
|
-
binary, for any purpose, commercial or non-commercial, and by any
|
6
|
-
means.
|
7
|
-
|
8
|
-
In jurisdictions that recognize copyright laws, the author or authors
|
9
|
-
of this software dedicate any and all copyright interest in the
|
10
|
-
software to the public domain. We make this dedication for the benefit
|
11
|
-
of the public at large and to the detriment of our heirs and
|
12
|
-
successors. We intend this dedication to be an overt act of
|
13
|
-
relinquishment in perpetuity of all present and future rights to this
|
14
|
-
software under copyright law.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
-
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
20
|
-
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
21
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
23
|
-
|
24
|
-
For more information, please refer to <https://unlicense.org>
|
@@ -1,101 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: jsongrapher
|
3
|
-
Version: 1.6
|
4
|
-
Summary: A python package for creating JSONGrapher Records.
|
5
|
-
Home-page: https://github.com/AdityaSavara/JSONGrapherRC
|
6
|
-
Author: Aditya Savara
|
7
|
-
Author-email: AditySavara2008@u.northwestern.edu
|
8
|
-
License: Unlicense
|
9
|
-
Classifier: License :: OSI Approved :: BSD License
|
10
|
-
Classifier: Programming Language :: Python
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
12
|
-
Classifier: Programming Language :: Python :: 3.6
|
13
|
-
Classifier: Programming Language :: Python :: Implementation :: CPython
|
14
|
-
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
15
|
-
Requires-Python: >=3.0.0
|
16
|
-
Description-Content-Type: text/markdown
|
17
|
-
License-File: LICENSE
|
18
|
-
Requires-Dist: numpy
|
19
|
-
Provides-Extra: complete
|
20
|
-
Requires-Dist: matplotlib; extra == "complete"
|
21
|
-
|
22
|
-
|
23
|
-
# JSONGrapherRC
|
24
|
-
A python package for creating JSONGrapher Records
|
25
|
-
|
26
|
-
To use JSONGrapherRC, first install it using pip:
|
27
|
-
<pre>
|
28
|
-
pip install JSONGrapherRC[COMPLETE]
|
29
|
-
</pre>
|
30
|
-
|
31
|
-
Alternatively, you can download the directory directly.<br>
|
32
|
-
It is easiest to then follow the [example file](https://github.com/AdityaSavara/JSONGrapherRC/blob/main/example/exampleUsageJSONRecordCreator.py) to learn.<br>
|
33
|
-
|
34
|
-
|
35
|
-
## **1\. Preparing to Create a Record**
|
36
|
-
|
37
|
-
Let's create an example where we plot the height of a pear tree over several years. Assuming a pear tree grows approximately 0.40 meters per year, we'll generate sample data with some variation.
|
38
|
-
<pre>
|
39
|
-
x_label_including_units = "Time (years)"
|
40
|
-
y_label_including_units = "Height (m)"
|
41
|
-
time_in_years = [0, 1, 2, 3, 4]
|
42
|
-
tree_heights = [0, 0.42, 0.86, 1.19, 1.45]
|
43
|
-
</pre>
|
44
|
-
|
45
|
-
## **2\. Creating and Populating a New JSONGrapher Record**
|
46
|
-
|
47
|
-
The easiest way to start is with the `create_new_JSONGrapherRecord()` function. While you *can* instantiate the JSONGrapherRecord class directly, this function is generally more convenient. We'll create a record and inspect its default fields.
|
48
|
-
<pre>
|
49
|
-
try:
|
50
|
-
from JSONGRapherRC import JSONRecordCreator # Normal usage
|
51
|
-
except ImportError:
|
52
|
-
import JSONRecordCreator # If the class file is local
|
53
|
-
|
54
|
-
Record = JSONRecordCreator.create_new_JSONGrapherRecord()
|
55
|
-
Record.set_comments("Tree Growth Data collected from the US National Arboretum")
|
56
|
-
Record.set_datatype("Tree_Growth_Curve")
|
57
|
-
Record.set_x_axis_label_including_units(x_label_including_units)
|
58
|
-
Record.set_y_axis_label_including_units(y_label_including_units)
|
59
|
-
Record.add_data_series(series_name="pear tree growth", x_values=time_in_years, y_values=tree_heights, plot_type="scatter_spline")
|
60
|
-
Record.set_graph_title("Pear Tree Growth Versus Time")
|
61
|
-
</pre>
|
62
|
-
|
63
|
-
## **3\. Exporting to File**
|
64
|
-
|
65
|
-
We now have a JSONGrapher record! We can export it to a file, which can then be used with JSONGrapher.
|
66
|
-
<pre>
|
67
|
-
Record.export_to_json_file("ExampleFromTutorial.json")
|
68
|
-
Record.print_to_inspect()
|
69
|
-
</pre>
|
70
|
-
|
71
|
-
<p><strong>Expected Output:</strong></p>
|
72
|
-
<pre>
|
73
|
-
JSONGrapher Record exported to, ./ExampleFromTutorial.json
|
74
|
-
{
|
75
|
-
"comments": "Tree Growth Data collected from the US National Arboretum",
|
76
|
-
"datatype": "Tree_Growth_Curve",
|
77
|
-
"data": [
|
78
|
-
{
|
79
|
-
"name": "pear tree growth",
|
80
|
-
"x": [0, 1, 2, 3, 4],
|
81
|
-
"y": [0, 0.42, 0.86, 1.19, 1.45],
|
82
|
-
"type": "scatter",
|
83
|
-
"line": { "shape": "spline" }
|
84
|
-
}
|
85
|
-
],
|
86
|
-
"layout": {
|
87
|
-
"title": "Pear Tree Growth Versus Time",
|
88
|
-
"xaxis": { "title": "Time (year)" },
|
89
|
-
"yaxis": { "title": "Height (m)" }
|
90
|
-
}
|
91
|
-
}
|
92
|
-
</pre>
|
93
|
-
|
94
|
-
|
95
|
-
We can also plot the data using Matplotlib and export the plot as a PNG file.
|
96
|
-
<pre>
|
97
|
-
Record.plot_with_matplotlib()
|
98
|
-
Record.export_to_matplotlib_png("ExampleFromTutorial")
|
99
|
-
</pre>
|
100
|
-
|
101
|
-
[](https://raw.githubusercontent.com/AdityaSavara/JSONGrapherRC/main/example/ExampleFromTutorial.png)
|
jsongrapher-1.6.dist-info/RECORD
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
JSONGrapher/JSONRecordCreator.py,sha256=_dfVxwy7itw3mUq7G_akyeup5KEy6KHXLeiINAzhHqg,45957
|
2
|
-
JSONGrapher/__init__.py,sha256=YvI9lnzN8e6jfCF--fuyiNZYq_YiVM72osipYjmWLAA,279
|
3
|
-
JSONGrapher/units_list.py,sha256=ARlPgvKWZM8um1FA7OtzDjnJhl0zy1X4vGbTQN93MnQ,33074
|
4
|
-
jsongrapher-1.6.data/data/LICENSE,sha256=KrPIO2Ij3T_47dfpfngKzpC4EXohIZMsHauG0R4M-kM,1234
|
5
|
-
jsongrapher-1.6.data/data/README.md,sha256=9UIVwsfi9CtLWzRFTnMiWvRiFf7MZLzmlWOpuOrj8e8,3036
|
6
|
-
jsongrapher-1.6.dist-info/LICENSE,sha256=KrPIO2Ij3T_47dfpfngKzpC4EXohIZMsHauG0R4M-kM,1234
|
7
|
-
jsongrapher-1.6.dist-info/METADATA,sha256=sLXqe5taldI3P4ASryDjexbue9uH8p2bY3Gnb3nZvHw,3913
|
8
|
-
jsongrapher-1.6.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
9
|
-
jsongrapher-1.6.dist-info/top_level.txt,sha256=5f7Ui2hCKCPTQOjD540WKghKNYOvUDNfdpnDbIlAD3Y,12
|
10
|
-
jsongrapher-1.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|