diff --git a/MongoDB.ipynb b/MongoDB.ipynb index b817f97..5152995 100644 --- a/MongoDB.ipynb +++ b/MongoDB.ipynb @@ -2,24 +2,16 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 27, "metadata": {}, "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/usr/local/lib/python3.5/dist-packages/ipykernel_launcher.py:11: DeprecationWarning: insert is deprecated. Use insert_one or insert_many instead.\n", - " # This is added back by InteractiveShellApp.init_path()\n" - ] - }, { "data": { "text/plain": [ - "ObjectId('5d7e6769e1eaff62f15de0d2')" + "" ] }, - "execution_count": 1, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } @@ -33,27 +25,367 @@ "\n", "client = pymongo.MongoClient (host=\"da1.eecs.utk.edu\")\n", "db = client ['fdac19mp2']\n", - "coll = db ['audris']\n", + "coll = db ['tkrobats']\n", + "\n", + "#coll.drop()\n", + "\n", "# for each dataset\n", - "coll.insert_one ( { 'topic':'git URLs', 'first dataset': 'largest projects', 'license': 'NA', 'description': 'The list of projects on github with the largest number of starts', 'urls': [ 'url1', 'url2' ] } )\n" + "coll.insert_one ( { 'topic':'Particle Physics at LHC',\n", + " 'title': 'Measurement of Z0-boson production at large rapidities in Pb-Pb collisions at sNN−−−√=5.02 TeV',\n", + " 'license': 'Open/Custom https://www.hepdata.net/terms',\n", + " 'description': 'Z-boson candidates are reconstructed in the dimuon decay channel (Z0→μ+μ−), based on muons selected with pseudo-rapidity −4.0<ημ<−2.5 and pμT>20 GeV/c.',\n", + " 'urls': [ 'https://www.hepdata.net/record/ins1639439','https://www.hepdata.net/download/submission/ins1639439/1/yaml' ] } )\n", + "\n", + "coll.insert_one ( { 'topic':'Particle Physics at LHC',\n", + " 'title': 'Transverse momentum spectra and nuclear modification factors of charged particles in pp, p-Pb and Pb-Pb collisions at the LHC',\n", + " 'license': 'Open/Custom https://www.hepdata.net/terms',\n", + " 'description': 'measured transverse momentum (pT) spectra of primary charged particles from pp, p-Pb and Pb-Pb collisions at a center-of-mass energy sNN−−−√=5.02 TeV in the kinematic range of 0.1520 GeV/c.',\n", + " 'license': 'Open/Custom https://www.hepdata.net/terms',\n", + " 'title': 'Measurement of Z0-boson production at large '\n", + " 'rapidities in Pb-Pb collisions at sNN−−−√=5.02 TeV',\n", + " 'topic': 'Particle Physics at LHC',\n", + " 'urls': ['https://www.hepdata.net/record/ins1639439',\n", + " 'https://www.hepdata.net/download/submission/ins1639439/1/yaml']}\n", + "{'_id': ObjectId('5d850190baff23a7b357dac5'),\n", + " 'description': 'measured transverse momentum (pT) spectra of '\n", + " 'primary charged particles from pp, p-Pb and '\n", + " 'Pb-Pb collisions at a center-of-mass energy '\n", + " 'sNN−−−√=5.02 TeV in the kinematic range of '\n", + " '0.15" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import pprint\n", + "import re\n", + "import pymongo, json\n", + "\n", + "pp = pprint.PrettyPrinter(indent=1,width=65)\n", + "\n", + "client = pymongo.MongoClient (host=\"da1.eecs.utk.edu\")\n", + "db = client ['fdac19mp2']\n", + "coll = db ['tkrobats']\n", + "\n", + "#coll.drop()\n", + "\n", + "# for each dataset\n", + "coll.insert_one ( { 'topic':'Particle Physics at LHC',\n", + " 'title': 'Measurement of Z0-boson production at large rapidities in Pb-Pb collisions at sNN−−−√=5.02 TeV',\n", + " 'license': 'Open/Custom https://www.hepdata.net/terms',\n", + " 'description': 'Z-boson candidates are reconstructed in the dimuon decay channel (Z0→μ+μ−), based on muons selected with pseudo-rapidity −4.0<ημ<−2.5 and pμT>20 GeV/c.',\n", + " 'urls': [ 'https://www.hepdata.net/record/ins1639439','https://www.hepdata.net/download/submission/ins1639439/1/yaml' ] } )\n", + "\n", + "coll.insert_one ( { 'topic':'Particle Physics at LHC',\n", + " 'title': 'Transverse momentum spectra and nuclear modification factors of charged particles in pp, p-Pb and Pb-Pb collisions at the LHC',\n", + " 'license': 'Open/Custom https://www.hepdata.net/terms',\n", + " 'description': 'measured transverse momentum (pT) spectra of primary charged particles from pp, p-Pb and Pb-Pb collisions at a center-of-mass energy sNN−−−√=5.02 TeV in the kinematic range of 0.1520 GeV/c.',\n", + " 'license': 'Open/Custom https://www.hepdata.net/terms',\n", + " 'title': 'Measurement of Z0-boson production at large '\n", + " 'rapidities in Pb-Pb collisions at sNN−−−√=5.02 TeV',\n", + " 'topic': 'Particle Physics at LHC',\n", + " 'urls': ['https://www.hepdata.net/record/ins1639439',\n", + " 'https://www.hepdata.net/download/submission/ins1639439/1/yaml']}\n", + "{'_id': ObjectId('5d850190baff23a7b357dac5'),\n", + " 'description': 'measured transverse momentum (pT) spectra of '\n", + " 'primary charged particles from pp, p-Pb and '\n", + " 'Pb-Pb collisions at a center-of-mass energy '\n", + " 'sNN−−−√=5.02 TeV in the kinematic range of '\n", + " '0.15