Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pymoondb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alessandro Frigeri
pymoondb
Commits
ac2146cb
Commit
ac2146cb
authored
Apr 30, 2019
by
Alessandro Frigeri
Browse files
Options
Downloads
Patches
Plain Diff
added notebook
parent
ce6f57e5
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
example1.ipynb
+138
-0
138 additions, 0 deletions
example1.ipynb
with
138 additions
and
0 deletions
example1.ipynb
0 → 100644
+
138
−
0
View file @
ac2146cb
{
"cells": [
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"import moondb"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'name': 'Apollo 11'}\n",
"{'name': 'Apollo 12'}\n",
"{'name': 'Apollo 14'}\n",
"{'name': 'Apollo 15'}\n",
"{'name': 'Apollo 16'}\n",
"{'name': 'Apollo 17'}\n",
"{'name': 'Luna 16'}\n",
"{'name': 'Luna 20'}\n",
"{'name': 'Luna 24'}\n"
]
}
],
"source": [
"m = moondb.get_missions()"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [],
"source": [
"f = moondb.Filter()\n",
"#f.specimenType = [\"SOIL\"]\n",
"results = f.get_results()"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"37034"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(results)"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'analysisCode': '15100,3#3#0158', 'analyzedMaterial': 'WHOLE ROCK', 'comment': '0.97 g, 950C', 'dataset': 'IRVING, 1972#TABLE 1', 'citation': 'IRVING, 1972', 'dataResults': [{'unit': 'ppm', 'laboratory': 'UNKNOWN', 'variable': 'H', 'methodName': 'UNKNOWN', 'methodComment': 'COMBUSTION (NEW LINE, YIELDING LOW BLANKS)', 'value': '90.0', 'methodCode': 'UNKNOWN'}, {'unit': 'per mil', 'laboratory': 'UNKNOWN', 'variable': 'DELTA_D', 'methodName': 'UNKNOWN', 'methodComment': 'COMBUSTION (NEW LINE, YIELDING LOW BLANKS)', 'value': '-554.0', 'methodCode': 'UNKNOWN'}, {'unit': 'ppm', 'laboratory': 'UNKNOWN', 'variable': 'C', 'methodName': 'UNKNOWN', 'methodComment': 'COMBUSTION (NEW LINE, YIELDING LOW BLANKS)', 'value': '99.0', 'methodCode': 'UNKNOWN'}, {'unit': 'per mil', 'laboratory': 'UNKNOWN', 'variable': 'DELTA_C13', 'methodName': 'UNKNOWN', 'methodComment': 'COMBUSTION (NEW LINE, YIELDING LOW BLANKS)', 'value': '7.9', 'methodCode': 'UNKNOWN'}]}\n"
]
}
],
"source": [
"an = print(results[0])"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"None\n"
]
}
],
"source": [
"print(anaobj)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
%% Cell type:code id: tags:
```
python
import
moondb
```
%% Cell type:code id: tags:
```
python
m
=
moondb
.
get_missions
()
```
%% Output
{'name': 'Apollo 11'}
{'name': 'Apollo 12'}
{'name': 'Apollo 14'}
{'name': 'Apollo 15'}
{'name': 'Apollo 16'}
{'name': 'Apollo 17'}
{'name': 'Luna 16'}
{'name': 'Luna 20'}
{'name': 'Luna 24'}
%% Cell type:code id: tags:
```
python
f
=
moondb
.
Filter
()
#f.specimenType = ["SOIL"]
results
=
f
.
get_results
()
```
%% Cell type:code id: tags:
```
python
len
(
results
)
```
%% Output
37034
%% Cell type:code id: tags:
```
python
an
=
print
(
results
[
0
])
```
%% Output
{'analysisCode': '15100,3#3#0158', 'analyzedMaterial': 'WHOLE ROCK', 'comment': '0.97 g, 950C', 'dataset': 'IRVING, 1972#TABLE 1', 'citation': 'IRVING, 1972', 'dataResults': [{'unit': 'ppm', 'laboratory': 'UNKNOWN', 'variable': 'H', 'methodName': 'UNKNOWN', 'methodComment': 'COMBUSTION (NEW LINE, YIELDING LOW BLANKS)', 'value': '90.0', 'methodCode': 'UNKNOWN'}, {'unit': 'per mil', 'laboratory': 'UNKNOWN', 'variable': 'DELTA_D', 'methodName': 'UNKNOWN', 'methodComment': 'COMBUSTION (NEW LINE, YIELDING LOW BLANKS)', 'value': '-554.0', 'methodCode': 'UNKNOWN'}, {'unit': 'ppm', 'laboratory': 'UNKNOWN', 'variable': 'C', 'methodName': 'UNKNOWN', 'methodComment': 'COMBUSTION (NEW LINE, YIELDING LOW BLANKS)', 'value': '99.0', 'methodCode': 'UNKNOWN'}, {'unit': 'per mil', 'laboratory': 'UNKNOWN', 'variable': 'DELTA_C13', 'methodName': 'UNKNOWN', 'methodComment': 'COMBUSTION (NEW LINE, YIELDING LOW BLANKS)', 'value': '7.9', 'methodCode': 'UNKNOWN'}]}
%% Cell type:code id: tags:
```
python
``
`
%%
Cell
type
:
code
id
:
tags
:
```
python
print(anaobj)
```
%% Output
None
%% Cell type:code id: tags:
```
python
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment