|
11 | 11 | { |
12 | 12 | "cell_type": "code", |
13 | 13 | "execution_count": 1, |
| 14 | + "id": "5a76c77b-0078-48fc-ade6-e46cbac010dd", |
| 15 | + "metadata": {}, |
| 16 | + "outputs": [ |
| 17 | + { |
| 18 | + "name": "stdout", |
| 19 | + "output_type": "stream", |
| 20 | + "text": [ |
| 21 | + "Found existing installation: dapi 1.0.0\n", |
| 22 | + "Uninstalling dapi-1.0.0:\n", |
| 23 | + " Successfully uninstalled dapi-1.0.0\n", |
| 24 | + "Collecting git+https://github.com/DesignSafe-CI/dapi.git@t3\n", |
| 25 | + " Cloning https://github.com/DesignSafe-CI/dapi.git (to revision t3) to /tmp/pip-req-build-f6bbn80i\n", |
| 26 | + " Running command git clone --filter=blob:none --quiet https://github.com/DesignSafe-CI/dapi.git /tmp/pip-req-build-f6bbn80i\n", |
| 27 | + " Running command git checkout -b t3 --track origin/t3\n", |
| 28 | + " Switched to a new branch 't3'\n", |
| 29 | + " Branch 't3' set up to track remote branch 't3' from 'origin'.\n", |
| 30 | + " Resolved https://github.com/DesignSafe-CI/dapi.git to commit 6e85ea5b2b26fe7a82220db6260ac6c2124caaee\n", |
| 31 | + " Installing build dependencies ... \u001b[?25ldone\n", |
| 32 | + "\u001b[?25h Getting requirements to build wheel ... \u001b[?25ldone\n", |
| 33 | + "\u001b[?25h Preparing metadata (pyproject.toml) ... \u001b[?25ldone\n", |
| 34 | + "\u001b[?25hRequirement already satisfied: exceptiongroup<2.0.0,>=1.2.0 in /home/jupyter/.local/lib/python3.11/site-packages (from dapi==1.0.0) (1.2.2)\n", |
| 35 | + "Requirement already satisfied: jsonschema>=4.18.0 in /opt/conda/lib/python3.11/site-packages (from dapi==1.0.0) (4.23.0)\n", |
| 36 | + "Requirement already satisfied: numpy<3.0.0,>=2.1.1 in /home/jupyter/.local/lib/python3.11/site-packages (from dapi==1.0.0) (2.2.5)\n", |
| 37 | + "Requirement already satisfied: pandas<3.0.0,>=2.2.3 in /home/jupyter/.local/lib/python3.11/site-packages (from dapi==1.0.0) (2.2.3)\n", |
| 38 | + "Requirement already satisfied: pymysql<2.0.0,>=1.1.0 in /home/jupyter/.local/lib/python3.11/site-packages (from dapi==1.0.0) (1.1.1)\n", |
| 39 | + "Requirement already satisfied: python-dotenv<2.0.0,>=1.0.1 in /home/jupyter/.local/lib/python3.11/site-packages (from dapi==1.0.0) (1.1.0)\n", |
| 40 | + "Requirement already satisfied: sqlalchemy<3.0.0,>=2.0.23 in /home/jupyter/.local/lib/python3.11/site-packages (from dapi==1.0.0) (2.0.40)\n", |
| 41 | + "Requirement already satisfied: tapipy<2.0.0,>=1.6.3 in /opt/conda/lib/python3.11/site-packages (from dapi==1.0.0) (1.7.0)\n", |
| 42 | + "Requirement already satisfied: tqdm<5.0.0,>=4.66.1 in /opt/conda/lib/python3.11/site-packages (from dapi==1.0.0) (4.66.1)\n", |
| 43 | + "Requirement already satisfied: attrs>=22.2.0 in /opt/conda/lib/python3.11/site-packages (from jsonschema>=4.18.0->dapi==1.0.0) (23.1.0)\n", |
| 44 | + "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /opt/conda/lib/python3.11/site-packages (from jsonschema>=4.18.0->dapi==1.0.0) (2023.7.1)\n", |
| 45 | + "Requirement already satisfied: referencing>=0.28.4 in /opt/conda/lib/python3.11/site-packages (from jsonschema>=4.18.0->dapi==1.0.0) (0.30.2)\n", |
| 46 | + "Requirement already satisfied: rpds-py>=0.7.1 in /opt/conda/lib/python3.11/site-packages (from jsonschema>=4.18.0->dapi==1.0.0) (0.10.6)\n", |
| 47 | + "Requirement already satisfied: python-dateutil>=2.8.2 in /opt/conda/lib/python3.11/site-packages (from pandas<3.0.0,>=2.2.3->dapi==1.0.0) (2.8.2)\n", |
| 48 | + "Requirement already satisfied: pytz>=2020.1 in /opt/conda/lib/python3.11/site-packages (from pandas<3.0.0,>=2.2.3->dapi==1.0.0) (2023.3.post1)\n", |
| 49 | + "Requirement already satisfied: tzdata>=2022.7 in /home/jupyter/.local/lib/python3.11/site-packages (from pandas<3.0.0,>=2.2.3->dapi==1.0.0) (2025.2)\n", |
| 50 | + "Requirement already satisfied: greenlet>=1 in /opt/conda/lib/python3.11/site-packages (from sqlalchemy<3.0.0,>=2.0.23->dapi==1.0.0) (3.0.0)\n", |
| 51 | + "Requirement already satisfied: typing-extensions>=4.6.0 in /opt/conda/lib/python3.11/site-packages (from sqlalchemy<3.0.0,>=2.0.23->dapi==1.0.0) (4.8.0)\n", |
| 52 | + "Requirement already satisfied: PyJWT>=1.7.1 in /opt/conda/lib/python3.11/site-packages (from tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (2.8.0)\n", |
| 53 | + "Requirement already satisfied: atomicwrites<2.0.0,>=1.4.0 in /opt/conda/lib/python3.11/site-packages (from tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (1.4.1)\n", |
| 54 | + "Requirement already satisfied: certifi>=2020.11.8 in /opt/conda/lib/python3.11/site-packages (from tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (2023.7.22)\n", |
| 55 | + "Requirement already satisfied: cloudpickle>=1.6.0 in /opt/conda/lib/python3.11/site-packages (from tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (3.1.0)\n", |
| 56 | + "Requirement already satisfied: cryptography>=3.3.2 in /opt/conda/lib/python3.11/site-packages (from tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (41.0.4)\n", |
| 57 | + "Requirement already satisfied: openapi_core==0.16.0 in /opt/conda/lib/python3.11/site-packages (from tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (0.16.0)\n", |
| 58 | + "Requirement already satisfied: openapi_spec_validator<0.6.0,>=0.5.0 in /opt/conda/lib/python3.11/site-packages (from tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (0.5.4)\n", |
| 59 | + "Requirement already satisfied: pyyaml>=5.4 in /opt/conda/lib/python3.11/site-packages (from tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (6.0.1)\n", |
| 60 | + "Requirement already satisfied: requests<3.0.0,>=2.20.0 in /opt/conda/lib/python3.11/site-packages (from tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (2.31.0)\n", |
| 61 | + "Requirement already satisfied: setuptools>=21.0.0 in /opt/conda/lib/python3.11/site-packages (from tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (68.2.2)\n", |
| 62 | + "Requirement already satisfied: six<2.0,>=1.10 in /opt/conda/lib/python3.11/site-packages (from tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (1.16.0)\n", |
| 63 | + "Requirement already satisfied: urllib3<2.0.0,>=1.26.5 in /opt/conda/lib/python3.11/site-packages (from tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (1.26.20)\n", |
| 64 | + "Requirement already satisfied: isodate in /opt/conda/lib/python3.11/site-packages (from openapi_core==0.16.0->tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (0.7.2)\n", |
| 65 | + "Requirement already satisfied: jsonschema-spec<0.2.0,>=0.1.1 in /home/jupyter/.local/lib/python3.11/site-packages (from openapi_core==0.16.0->tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (0.1.3)\n", |
| 66 | + "Requirement already satisfied: more-itertools in /opt/conda/lib/python3.11/site-packages (from openapi_core==0.16.0->tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (10.5.0)\n", |
| 67 | + "Requirement already satisfied: openapi-schema-validator<0.4.0,>=0.3.0 in /opt/conda/lib/python3.11/site-packages (from openapi_core==0.16.0->tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (0.3.4)\n", |
| 68 | + "Requirement already satisfied: parse in /opt/conda/lib/python3.11/site-packages (from openapi_core==0.16.0->tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (1.20.2)\n", |
| 69 | + "Requirement already satisfied: pathable<0.5.0,>=0.4.0 in /opt/conda/lib/python3.11/site-packages (from openapi_core==0.16.0->tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (0.4.3)\n", |
| 70 | + "Requirement already satisfied: werkzeug in /opt/conda/lib/python3.11/site-packages (from openapi_core==0.16.0->tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (3.1.2)\n", |
| 71 | + "Requirement already satisfied: cffi>=1.12 in /opt/conda/lib/python3.11/site-packages (from cryptography>=3.3.2->tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (1.16.0)\n", |
| 72 | + "Requirement already satisfied: lazy-object-proxy<2.0.0,>=1.7.1 in /opt/conda/lib/python3.11/site-packages (from openapi_spec_validator<0.6.0,>=0.5.0->tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (1.10.0)\n", |
| 73 | + "Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.11/site-packages (from requests<3.0.0,>=2.20.0->tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (3.3.0)\n", |
| 74 | + "Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.11/site-packages (from requests<3.0.0,>=2.20.0->tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (3.4)\n", |
| 75 | + "Requirement already satisfied: pycparser in /opt/conda/lib/python3.11/site-packages (from cffi>=1.12->cryptography>=3.3.2->tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (2.21)\n", |
| 76 | + "Requirement already satisfied: MarkupSafe>=2.1.1 in /opt/conda/lib/python3.11/site-packages (from werkzeug->openapi_core==0.16.0->tapipy<2.0.0,>=1.6.3->dapi==1.0.0) (2.1.3)\n", |
| 77 | + "Building wheels for collected packages: dapi\n", |
| 78 | + " Building wheel for dapi (pyproject.toml) ... \u001b[?25ldone\n", |
| 79 | + "\u001b[?25h Created wheel for dapi: filename=dapi-1.0.0-py3-none-any.whl size=24062 sha256=cf0ff0df24ae1cb99cf56a627d1fdcd6d5d91e53a3c9eae6e99b8f3ab519713a\n", |
| 80 | + " Stored in directory: /tmp/pip-ephem-wheel-cache-58or_9hm/wheels/e1/79/c6/a9ec0b77e5349b798d57dca8ea213ee48626dea9e159e67fdc\n", |
| 81 | + "Successfully built dapi\n", |
| 82 | + "Installing collected packages: dapi\n", |
| 83 | + "Successfully installed dapi-1.0.0\n" |
| 84 | + ] |
| 85 | + } |
| 86 | + ], |
| 87 | + "source": [ |
| 88 | + "!pip uninstall dapi --yes\n", |
| 89 | + "!pip install git+https://github.com/DesignSafe-CI/dapi.git@t3 --user" |
| 90 | + ] |
| 91 | + }, |
| 92 | + { |
| 93 | + "cell_type": "code", |
| 94 | + "execution_count": 2, |
14 | 95 | "id": "06f33aaa", |
15 | 96 | "metadata": {}, |
16 | 97 | "outputs": [], |
|
29 | 110 | }, |
30 | 111 | { |
31 | 112 | "cell_type": "code", |
32 | | - "execution_count": 2, |
| 113 | + "execution_count": 3, |
33 | 114 | "id": "abc973d4", |
34 | 115 | "metadata": {}, |
35 | 116 | "outputs": [ |
|
57 | 138 | }, |
58 | 139 | { |
59 | 140 | "cell_type": "code", |
60 | | - "execution_count": 3, |
| 141 | + "execution_count": 4, |
61 | 142 | "id": "3c1d34e8", |
62 | 143 | "metadata": {}, |
63 | 144 | "outputs": [ |
|
100 | 181 | }, |
101 | 182 | { |
102 | 183 | "cell_type": "code", |
103 | | - "execution_count": null, |
| 184 | + "execution_count": 6, |
104 | 185 | "id": "80a7fa20", |
105 | 186 | "metadata": {}, |
106 | | - "outputs": [], |
| 187 | + "outputs": [ |
| 188 | + { |
| 189 | + "name": "stdout", |
| 190 | + "output_type": "stream", |
| 191 | + "text": [ |
| 192 | + "\n", |
| 193 | + "Querying NGL Database using 'ngl' variable...\n", |
| 194 | + "Executing query on 'ngl'...\n", |
| 195 | + "--- NGL Data (DataFrame) ---\n", |
| 196 | + " SITE_ID SITE_NAME SITE_LAT SITE_LON \\\n", |
| 197 | + "0 147 Amagasaki 34.715560 135.400750 \n", |
| 198 | + "1 148 Bonds Corner 32.693100 -115.338200 \n", |
| 199 | + "2 149 Hachirogata 39.850000 140.017000 \n", |
| 200 | + "3 150 Higashi-Kobe Bridge 34.710214 135.293345 \n", |
| 201 | + "4 151 Hanshin Expressway 34.724834 135.301489 \n", |
| 202 | + "\n", |
| 203 | + " SITE_GEOL \\\n", |
| 204 | + "0 Qal \n", |
| 205 | + "1 Qal, deep, Imperial Valley \n", |
| 206 | + "2 Af (Fill) \n", |
| 207 | + "3 Af (Fill) \n", |
| 208 | + "4 \n", |
| 209 | + "\n", |
| 210 | + " SITE_REM SITE_STAT SITE_REVW \n", |
| 211 | + "0 Industrial site near Yomoga River. Coordinate... 1 2 \n", |
| 212 | + "1 1 2 \n", |
| 213 | + "2 Gingery indicates the geology near the strong ... 1 2 \n", |
| 214 | + "3 A geologic map of the area (Geological Survey ... 1 2 \n", |
| 215 | + "4 Hanshin Expressway (Mylonakis et al. 2006) 1 2 \n" |
| 216 | + ] |
| 217 | + } |
| 218 | + ], |
107 | 219 | "source": [ |
108 | 220 | "## Database Example Usage (Using convenience variables)\n", |
109 | 221 | "if ngl: # Check if ngl variable was successfully created\n", |
|
123 | 235 | ], |
124 | 236 | "metadata": { |
125 | 237 | "kernelspec": { |
126 | | - "display_name": "dapi-ptztLUqK-py3.13", |
| 238 | + "display_name": "Python 3 (ipykernel)", |
127 | 239 | "language": "python", |
128 | 240 | "name": "python3" |
129 | 241 | }, |
|
137 | 249 | "name": "python", |
138 | 250 | "nbconvert_exporter": "python", |
139 | 251 | "pygments_lexer": "ipython3", |
140 | | - "version": "3.13.3" |
| 252 | + "version": "3.11.6" |
141 | 253 | } |
142 | 254 | }, |
143 | 255 | "nbformat": 4, |
|
0 commit comments