diff --git a/.buildinfo b/.buildinfo index 651afec..d6327c6 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 2aed400b29ffbdbe433a7a359668c4a3 +config: 9a0d458e0afe809c9eb6e506c8813824 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/_modules/dataretrieval/nadp.html b/_modules/dataretrieval/nadp.html index 3d9d130..9862ca7 100644 --- a/_modules/dataretrieval/nadp.html +++ b/_modules/dataretrieval/nadp.html @@ -3,7 +3,7 @@ - dataretrieval.nadp — dataretrieval 0.1.dev1+gbaa65e5 documentation + dataretrieval.nadp — dataretrieval 0.1.dev1+g103724b documentation @@ -14,7 +14,7 @@ - + diff --git a/_modules/dataretrieval/nwis.html b/_modules/dataretrieval/nwis.html index f96d462..c08edc9 100644 --- a/_modules/dataretrieval/nwis.html +++ b/_modules/dataretrieval/nwis.html @@ -3,7 +3,7 @@ - dataretrieval.nwis — dataretrieval 0.1.dev1+gbaa65e5 documentation + dataretrieval.nwis — dataretrieval 0.1.dev1+g103724b documentation @@ -14,7 +14,7 @@ - + diff --git a/_modules/dataretrieval/streamstats.html b/_modules/dataretrieval/streamstats.html index 81f0caa..abdcfe4 100644 --- a/_modules/dataretrieval/streamstats.html +++ b/_modules/dataretrieval/streamstats.html @@ -3,7 +3,7 @@ - dataretrieval.streamstats — dataretrieval 0.1.dev1+gbaa65e5 documentation + dataretrieval.streamstats — dataretrieval 0.1.dev1+g103724b documentation @@ -14,7 +14,7 @@ - + diff --git a/_modules/dataretrieval/utils.html b/_modules/dataretrieval/utils.html index efd35a5..21d13e4 100644 --- a/_modules/dataretrieval/utils.html +++ b/_modules/dataretrieval/utils.html @@ -3,7 +3,7 @@ - dataretrieval.utils — dataretrieval 0.1.dev1+gbaa65e5 documentation + dataretrieval.utils — dataretrieval 0.1.dev1+g103724b documentation @@ -14,7 +14,7 @@ - + diff --git a/_modules/dataretrieval/wqp.html b/_modules/dataretrieval/wqp.html index 63a3953..1074f3f 100644 --- a/_modules/dataretrieval/wqp.html +++ b/_modules/dataretrieval/wqp.html @@ -3,7 +3,7 @@ - dataretrieval.wqp — dataretrieval 0.1.dev1+gbaa65e5 documentation + dataretrieval.wqp — dataretrieval 0.1.dev1+g103724b documentation @@ -14,7 +14,7 @@ - + diff --git a/_modules/index.html b/_modules/index.html index 209dfea..0e84a74 100644 --- a/_modules/index.html +++ b/_modules/index.html @@ -3,7 +3,7 @@ - Overview: module code — dataretrieval 0.1.dev1+gbaa65e5 documentation + Overview: module code — dataretrieval 0.1.dev1+g103724b documentation @@ -14,7 +14,7 @@ - + diff --git a/_static/documentation_options.js b/_static/documentation_options.js index 55799d9..0eaceca 100644 --- a/_static/documentation_options.js +++ b/_static/documentation_options.js @@ -1,5 +1,5 @@ const DOCUMENTATION_OPTIONS = { - VERSION: '0.1.dev1+gbaa65e5', + VERSION: '0.1.dev1+g103724b', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/examples/USGS_dataretrieval_DailyValues_Examples.html b/examples/USGS_dataretrieval_DailyValues_Examples.html index 42888cb..5de8a6b 100644 --- a/examples/USGS_dataretrieval_DailyValues_Examples.html +++ b/examples/USGS_dataretrieval_DailyValues_Examples.html @@ -4,7 +4,7 @@ - USGS dataretrieval Python Package get_dv() Examples — dataretrieval 0.1.dev1+gbaa65e5 documentation + USGS dataretrieval Python Package get_dv() Examples — dataretrieval 0.1.dev1+g103724b documentation @@ -16,7 +16,7 @@ - + @@ -69,6 +69,8 @@
  • USGS dataretrieval Python Package get_pmcodes() Examples
  • USGS dataretrieval Python Package get_discharge_peaks() Examples
  • USGS dataretrieval Python Package get_ratings() Examples
  • +
  • USGS dataretrieval Python Package get_info() Examples
  • +
  • USGS dataretrieval Python Package what_sites() Examples
  • USGS dataretrieval Python Package get_stats() Examples
  • USGS dataretrieval Python Package get_iv() Examples
  • USGS dataretrieval Python Package get_qwdata() Examples
  • @@ -129,7 +131,7 @@

    Install the Package
     Defaulting to user installation because normal site-packages is not writeable
    -Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+gbaa65e5)
    +Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+g103724b)
     Requirement already satisfied: requests in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.32.3)
     Requirement already satisfied: pandas==2.* in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.2.3)
     Requirement already satisfied: numpy>=1.22.4 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.1.1)
    @@ -781,11 +783,180 @@ 

    Additional Examples
    [11]:
     
    +
    dailyMultiSites = nwis.get_dv(sites=["01491000", "01645000"], parameterCd=["00010", "00060"],
    +                              start="2012-01-01", end="2012-06-30", statCd=["00001","00003"],
    +                              multi_index=False)
    +display(dailyMultiSites[0])
    +
    +
    +

    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    site_no00010_discontinued_Maximum00010_discontinued_Maximum_cd00010_discontinued_Mean00010_discontinued_Mean_cd00060_Mean00060_Mean_cd
    datetime
    2012-01-01 00:00:00+00:00014910008.4A7.7A205.00A
    2012-01-01 00:00:00+00:0001645000NaNNaNNaNNaN175.00A
    2012-01-02 00:00:00+00:0001645000NaNNaNNaNNaN168.00A
    2012-01-02 00:00:00+00:00014910008.5A7.3A193.00A
    2012-01-03 00:00:00+00:00014910006.0A4.6A180.00A
    ........................
    2012-06-28 00:00:00+00:0001491000NaNNaNNaNNaN12.10A
    2012-06-29 00:00:00+00:0001645000NaNNaNNaNNaN53.10A
    2012-06-29 00:00:00+00:0001491000NaNNaNNaNNaN8.58A
    2012-06-30 00:00:00+00:0001491000NaNNaNNaNNaN7.15A
    2012-06-30 00:00:00+00:0001645000NaNNaNNaNNaN129.00A
    +

    364 rows × 7 columns

    +
    +
    +

    Example 4: Test for a site that is not active - returns an empty DataFrame.

    +
    +
    [12]:
    +
    +
    siteID = "05212700"
     notActive = nwis.get_dv(sites=siteID, parameterCd="00060", start="2014-01-01", end="2014-01-07")
     display(notActive[0])
    diff --git a/examples/USGS_dataretrieval_DailyValues_Examples.ipynb b/examples/USGS_dataretrieval_DailyValues_Examples.ipynb
    index d710490..68c4a60 100644
    --- a/examples/USGS_dataretrieval_DailyValues_Examples.ipynb
    +++ b/examples/USGS_dataretrieval_DailyValues_Examples.ipynb
    @@ -23,10 +23,10 @@
        "execution_count": 1,
        "metadata": {
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:40.822435Z",
    -     "iopub.status.busy": "2024-09-26T03:37:40.822260Z",
    -     "iopub.status.idle": "2024-09-26T03:37:41.569388Z",
    -     "shell.execute_reply": "2024-09-26T03:37:41.568654Z"
    +     "iopub.execute_input": "2024-10-04T14:14:35.211819Z",
    +     "iopub.status.busy": "2024-10-04T14:14:35.211434Z",
    +     "iopub.status.idle": "2024-10-04T14:14:35.911708Z",
    +     "shell.execute_reply": "2024-10-04T14:14:35.911116Z"
         },
         "pycharm": {
          "is_executing": true,
    @@ -45,15 +45,9 @@
          "name": "stdout",
          "output_type": "stream",
          "text": [
    -      "Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+gbaa65e5)\r\n",
    +      "Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+g103724b)\r\n",
           "Requirement already satisfied: requests in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.32.3)\r\n",
    -      "Requirement already satisfied: pandas==2.* in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.2.3)\r\n"
    -     ]
    -    },
    -    {
    -     "name": "stdout",
    -     "output_type": "stream",
    -     "text": [
    +      "Requirement already satisfied: pandas==2.* in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.2.3)\r\n",
           "Requirement already satisfied: numpy>=1.22.4 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.1.1)\r\n",
           "Requirement already satisfied: python-dateutil>=2.8.2 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.9.0.post0)\r\n",
           "Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3/dist-packages (from pandas==2.*->dataretrieval) (2022.1)\r\n",
    @@ -61,7 +55,13 @@
           "Requirement already satisfied: charset-normalizer<4,>=2 in /home/runner/.local/lib/python3.10/site-packages (from requests->dataretrieval) (3.3.2)\r\n",
           "Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests->dataretrieval) (3.3)\r\n",
           "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3/dist-packages (from requests->dataretrieval) (1.26.5)\r\n",
    -      "Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests->dataretrieval) (2020.6.20)\r\n",
    +      "Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests->dataretrieval) (2020.6.20)\r\n"
    +     ]
    +    },
    +    {
    +     "name": "stdout",
    +     "output_type": "stream",
    +     "text": [
           "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.2->pandas==2.*->dataretrieval) (1.16.0)\r\n"
          ]
         }
    @@ -82,10 +82,10 @@
        "execution_count": 2,
        "metadata": {
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:41.571722Z",
    -     "iopub.status.busy": "2024-09-26T03:37:41.571519Z",
    -     "iopub.status.idle": "2024-09-26T03:37:41.863232Z",
    -     "shell.execute_reply": "2024-09-26T03:37:41.862676Z"
    +     "iopub.execute_input": "2024-10-04T14:14:35.913683Z",
    +     "iopub.status.busy": "2024-10-04T14:14:35.913511Z",
    +     "iopub.status.idle": "2024-10-04T14:14:36.191412Z",
    +     "shell.execute_reply": "2024-10-04T14:14:36.190893Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -131,10 +131,10 @@
        "execution_count": 3,
        "metadata": {
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:41.865676Z",
    -     "iopub.status.busy": "2024-09-26T03:37:41.865255Z",
    -     "iopub.status.idle": "2024-09-26T03:37:42.043968Z",
    -     "shell.execute_reply": "2024-09-26T03:37:42.043427Z"
    +     "iopub.execute_input": "2024-10-04T14:14:36.193813Z",
    +     "iopub.status.busy": "2024-10-04T14:14:36.193386Z",
    +     "iopub.status.idle": "2024-10-04T14:14:36.356130Z",
    +     "shell.execute_reply": "2024-10-04T14:14:36.355641Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -177,10 +177,10 @@
        "execution_count": 4,
        "metadata": {
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:42.045718Z",
    -     "iopub.status.busy": "2024-09-26T03:37:42.045548Z",
    -     "iopub.status.idle": "2024-09-26T03:37:42.055231Z",
    -     "shell.execute_reply": "2024-09-26T03:37:42.054642Z"
    +     "iopub.execute_input": "2024-10-04T14:14:36.357886Z",
    +     "iopub.status.busy": "2024-10-04T14:14:36.357536Z",
    +     "iopub.status.idle": "2024-10-04T14:14:36.366552Z",
    +     "shell.execute_reply": "2024-10-04T14:14:36.366110Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -336,10 +336,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:42.057052Z",
    -     "iopub.status.busy": "2024-09-26T03:37:42.056691Z",
    -     "iopub.status.idle": "2024-09-26T03:37:42.059818Z",
    -     "shell.execute_reply": "2024-09-26T03:37:42.059363Z"
    +     "iopub.execute_input": "2024-10-04T14:14:36.368371Z",
    +     "iopub.status.busy": "2024-10-04T14:14:36.368013Z",
    +     "iopub.status.idle": "2024-10-04T14:14:36.371109Z",
    +     "shell.execute_reply": "2024-10-04T14:14:36.370650Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -378,10 +378,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:42.061423Z",
    -     "iopub.status.busy": "2024-09-26T03:37:42.061258Z",
    -     "iopub.status.idle": "2024-09-26T03:37:42.068681Z",
    -     "shell.execute_reply": "2024-09-26T03:37:42.068071Z"
    +     "iopub.execute_input": "2024-10-04T14:14:36.372727Z",
    +     "iopub.status.busy": "2024-10-04T14:14:36.372552Z",
    +     "iopub.status.idle": "2024-10-04T14:14:36.379719Z",
    +     "shell.execute_reply": "2024-10-04T14:14:36.379239Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -487,10 +487,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:42.070465Z",
    -     "iopub.status.busy": "2024-09-26T03:37:42.070284Z",
    -     "iopub.status.idle": "2024-09-26T03:37:42.580115Z",
    -     "shell.execute_reply": "2024-09-26T03:37:42.579535Z"
    +     "iopub.execute_input": "2024-10-04T14:14:36.381380Z",
    +     "iopub.status.busy": "2024-10-04T14:14:36.381101Z",
    +     "iopub.status.idle": "2024-10-04T14:14:36.852447Z",
    +     "shell.execute_reply": "2024-10-04T14:14:36.851844Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -536,10 +536,10 @@
        "execution_count": 8,
        "metadata": {
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:42.582021Z",
    -     "iopub.status.busy": "2024-09-26T03:37:42.581759Z",
    -     "iopub.status.idle": "2024-09-26T03:37:42.584876Z",
    -     "shell.execute_reply": "2024-09-26T03:37:42.584423Z"
    +     "iopub.execute_input": "2024-10-04T14:14:36.854367Z",
    +     "iopub.status.busy": "2024-10-04T14:14:36.853984Z",
    +     "iopub.status.idle": "2024-10-04T14:14:36.856739Z",
    +     "shell.execute_reply": "2024-10-04T14:14:36.856318Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -584,10 +584,10 @@
        "execution_count": 9,
        "metadata": {
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:42.586467Z",
    -     "iopub.status.busy": "2024-09-26T03:37:42.586292Z",
    -     "iopub.status.idle": "2024-09-26T03:37:42.982067Z",
    -     "shell.execute_reply": "2024-09-26T03:37:42.981452Z"
    +     "iopub.execute_input": "2024-10-04T14:14:36.858503Z",
    +     "iopub.status.busy": "2024-10-04T14:14:36.858128Z",
    +     "iopub.status.idle": "2024-10-04T14:14:37.213586Z",
    +     "shell.execute_reply": "2024-10-04T14:14:37.213142Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -806,10 +806,10 @@
        "execution_count": 10,
        "metadata": {
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:42.984218Z",
    -     "iopub.status.busy": "2024-09-26T03:37:42.983842Z",
    -     "iopub.status.idle": "2024-09-26T03:37:43.242774Z",
    -     "shell.execute_reply": "2024-09-26T03:37:43.242229Z"
    +     "iopub.execute_input": "2024-10-04T14:14:37.215310Z",
    +     "iopub.status.busy": "2024-10-04T14:14:37.214922Z",
    +     "iopub.status.idle": "2024-10-04T14:14:37.573353Z",
    +     "shell.execute_reply": "2024-10-04T14:14:37.572832Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -1052,7 +1052,7 @@
        "cell_type": "markdown",
        "metadata": {},
        "source": [
    -    "Example 4: Test for a site that is not active - returns an empty DataFrame."
    +    "The following example is the same as the previous example but with multi index turned off (multi_index=False)"
        ]
       },
       {
    @@ -1060,10 +1060,256 @@
        "execution_count": 11,
        "metadata": {
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:43.244620Z",
    -     "iopub.status.busy": "2024-09-26T03:37:43.244435Z",
    -     "iopub.status.idle": "2024-09-26T03:37:43.479518Z",
    -     "shell.execute_reply": "2024-09-26T03:37:43.479032Z"
    +     "iopub.execute_input": "2024-10-04T14:14:37.575084Z",
    +     "iopub.status.busy": "2024-10-04T14:14:37.574754Z",
    +     "iopub.status.idle": "2024-10-04T14:14:37.763331Z",
    +     "shell.execute_reply": "2024-10-04T14:14:37.762777Z"
    +    }
    +   },
    +   "outputs": [
    +    {
    +     "data": {
    +      "text/html": [
    +       "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    site_no00010_discontinued_Maximum00010_discontinued_Maximum_cd00010_discontinued_Mean00010_discontinued_Mean_cd00060_Mean00060_Mean_cd
    datetime
    2012-01-01 00:00:00+00:00014910008.4A7.7A205.00A
    2012-01-01 00:00:00+00:0001645000NaNNaNNaNNaN175.00A
    2012-01-02 00:00:00+00:0001645000NaNNaNNaNNaN168.00A
    2012-01-02 00:00:00+00:00014910008.5A7.3A193.00A
    2012-01-03 00:00:00+00:00014910006.0A4.6A180.00A
    ........................
    2012-06-28 00:00:00+00:0001491000NaNNaNNaNNaN12.10A
    2012-06-29 00:00:00+00:0001645000NaNNaNNaNNaN53.10A
    2012-06-29 00:00:00+00:0001491000NaNNaNNaNNaN8.58A
    2012-06-30 00:00:00+00:0001491000NaNNaNNaNNaN7.15A
    2012-06-30 00:00:00+00:0001645000NaNNaNNaNNaN129.00A
    \n", + "

    364 rows × 7 columns

    \n", + "
    " + ], + "text/plain": [ + " site_no 00010_discontinued_Maximum \\\n", + "datetime \n", + "2012-01-01 00:00:00+00:00 01491000 8.4 \n", + "2012-01-01 00:00:00+00:00 01645000 NaN \n", + "2012-01-02 00:00:00+00:00 01645000 NaN \n", + "2012-01-02 00:00:00+00:00 01491000 8.5 \n", + "2012-01-03 00:00:00+00:00 01491000 6.0 \n", + "... ... ... \n", + "2012-06-28 00:00:00+00:00 01491000 NaN \n", + "2012-06-29 00:00:00+00:00 01645000 NaN \n", + "2012-06-29 00:00:00+00:00 01491000 NaN \n", + "2012-06-30 00:00:00+00:00 01491000 NaN \n", + "2012-06-30 00:00:00+00:00 01645000 NaN \n", + "\n", + " 00010_discontinued_Maximum_cd \\\n", + "datetime \n", + "2012-01-01 00:00:00+00:00 A \n", + "2012-01-01 00:00:00+00:00 NaN \n", + "2012-01-02 00:00:00+00:00 NaN \n", + "2012-01-02 00:00:00+00:00 A \n", + "2012-01-03 00:00:00+00:00 A \n", + "... ... \n", + "2012-06-28 00:00:00+00:00 NaN \n", + "2012-06-29 00:00:00+00:00 NaN \n", + "2012-06-29 00:00:00+00:00 NaN \n", + "2012-06-30 00:00:00+00:00 NaN \n", + "2012-06-30 00:00:00+00:00 NaN \n", + "\n", + " 00010_discontinued_Mean 00010_discontinued_Mean_cd \\\n", + "datetime \n", + "2012-01-01 00:00:00+00:00 7.7 A \n", + "2012-01-01 00:00:00+00:00 NaN NaN \n", + "2012-01-02 00:00:00+00:00 NaN NaN \n", + "2012-01-02 00:00:00+00:00 7.3 A \n", + "2012-01-03 00:00:00+00:00 4.6 A \n", + "... ... ... \n", + "2012-06-28 00:00:00+00:00 NaN NaN \n", + "2012-06-29 00:00:00+00:00 NaN NaN \n", + "2012-06-29 00:00:00+00:00 NaN NaN \n", + "2012-06-30 00:00:00+00:00 NaN NaN \n", + "2012-06-30 00:00:00+00:00 NaN NaN \n", + "\n", + " 00060_Mean 00060_Mean_cd \n", + "datetime \n", + "2012-01-01 00:00:00+00:00 205.00 A \n", + "2012-01-01 00:00:00+00:00 175.00 A \n", + "2012-01-02 00:00:00+00:00 168.00 A \n", + "2012-01-02 00:00:00+00:00 193.00 A \n", + "2012-01-03 00:00:00+00:00 180.00 A \n", + "... ... ... \n", + "2012-06-28 00:00:00+00:00 12.10 A \n", + "2012-06-29 00:00:00+00:00 53.10 A \n", + "2012-06-29 00:00:00+00:00 8.58 A \n", + "2012-06-30 00:00:00+00:00 7.15 A \n", + "2012-06-30 00:00:00+00:00 129.00 A \n", + "\n", + "[364 rows x 7 columns]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "dailyMultiSites = nwis.get_dv(sites=[\"01491000\", \"01645000\"], parameterCd=[\"00010\", \"00060\"],\n", + " start=\"2012-01-01\", end=\"2012-06-30\", statCd=[\"00001\",\"00003\"],\n", + " multi_index=False)\n", + "display(dailyMultiSites[0])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Example 4: Test for a site that is not active - returns an empty DataFrame." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "execution": { + "iopub.execute_input": "2024-10-04T14:14:37.764995Z", + "iopub.status.busy": "2024-10-04T14:14:37.764695Z", + "iopub.status.idle": "2024-10-04T14:14:38.100023Z", + "shell.execute_reply": "2024-10-04T14:14:38.099454Z" }, "pycharm": { "name": "#%%\n" diff --git a/examples/USGS_dataretrieval_GroundwaterLevels_Examples.html b/examples/USGS_dataretrieval_GroundwaterLevels_Examples.html index 8f2934c..b4f1e1c 100644 --- a/examples/USGS_dataretrieval_GroundwaterLevels_Examples.html +++ b/examples/USGS_dataretrieval_GroundwaterLevels_Examples.html @@ -4,7 +4,7 @@ - USGS dataretrieval Python Package get_gwlevels() Examples — dataretrieval 0.1.dev1+gbaa65e5 documentation + USGS dataretrieval Python Package get_gwlevels() Examples — dataretrieval 0.1.dev1+g103724b documentation @@ -16,7 +16,7 @@ - + @@ -69,6 +69,8 @@
  • USGS dataretrieval Python Package get_pmcodes() Examples
  • USGS dataretrieval Python Package get_discharge_peaks() Examples
  • USGS dataretrieval Python Package get_ratings() Examples
  • +
  • USGS dataretrieval Python Package get_info() Examples
  • +
  • USGS dataretrieval Python Package what_sites() Examples
  • USGS dataretrieval Python Package get_stats() Examples
  • USGS dataretrieval Python Package get_iv() Examples
  • USGS dataretrieval Python Package get_qwdata() Examples
  • @@ -129,7 +131,7 @@

    Install the Package +
    +
    +
    +
    +
    +Retrieved 933 data values.
    +
    +
    +
    +
    +
    +
    +
    +/home/runner/.local/lib/python3.10/site-packages/dataretrieval/utils.py:90: UserWarning: Warning: 621 incomplete dates found, consider setting datetime_index to False.
    +  warnings.warn(
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    agency_cdsite_nosite_tp_cdlev_dtlev_tmlev_tz_cdlev_vasl_lev_vasl_datum_cdlev_status_cdlev_agency_cdlev_dt_acy_cdlev_acy_cdlev_src_cdlev_meth_cdlev_age_cdparameter_cd
    datetime
    1945-10-12 22:35:00+00:00USGS434400121275801GW1945-10-1222:35+0000NaN4192.65NGVD291USGSm2SOA62610
    1945-10-12 22:35:00+00:00USGS434400121275801GW1945-10-1222:35+0000NaN4196.67NAVD881USGSm2SOA62611
    1945-10-12 22:35:00+00:00USGS434400121275801GW1945-10-1222:35+000027.35NaNNaN1USGSm2SOA72019
    1999-06-04 18:00:00+00:00USGS434400121275801GW1999-06-0418:00+0000NaN4203.22NGVD291USGSm2SSA62610
    1999-06-04 18:00:00+00:00USGS434400121275801GW1999-06-0418:00+0000NaN4207.24NAVD881USGSm2SSA62611
    ......................................................
    NaTUSGS434400121275801GW1999-03-19NaNNaNNaN4204.97NAVD881NaND2NaNSA62611
    NaTUSGS434400121275801GW1999-03-19NaNNaN19.05NaNNaN1NaND2NaNSA72019
    NaTUSGS434400121275801GW1999-05-14NaNNaNNaN4201.99NGVD291USGSD2SSA62610
    NaTUSGS434400121275801GW1999-05-14NaNNaNNaN4206.01NAVD881USGSD2SSA62611
    NaTUSGS434400121275801GW1999-05-14NaNNaN18.01NaNNaN1USGSD2SSA72019
    +

    933 rows × 17 columns

    +
    +

    Some groundwater level data have dates that include only a year or a month and year, but no day.

    Example 3: Retrieve groundwater level data that have dates without a day.

    -
    [10]:
    +
    [11]:
     
    data3 = nwis.get_gwlevels(sites="425957088141001")
    @@ -951,7 +1269,7 @@ 

    Additional Examples -
    [11]:
    +
    [12]:
     
    # Print the URL used to retrieve the data
    @@ -970,7 +1288,7 @@ 

    Additional Examples -
    [12]:
    +
    [13]:
     
    data4 = nwis.get_gwlevels(sites=site_id, start="1980-01-01", end="2000-12-31")
    diff --git a/examples/USGS_dataretrieval_GroundwaterLevels_Examples.ipynb b/examples/USGS_dataretrieval_GroundwaterLevels_Examples.ipynb
    index d1dd9d1..d128d89 100644
    --- a/examples/USGS_dataretrieval_GroundwaterLevels_Examples.ipynb
    +++ b/examples/USGS_dataretrieval_GroundwaterLevels_Examples.ipynb
    @@ -31,10 +31,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:45.074133Z",
    -     "iopub.status.busy": "2024-09-26T03:37:45.073633Z",
    -     "iopub.status.idle": "2024-09-26T03:37:45.821190Z",
    -     "shell.execute_reply": "2024-09-26T03:37:45.820483Z"
    +     "iopub.execute_input": "2024-10-04T14:14:39.711433Z",
    +     "iopub.status.busy": "2024-10-04T14:14:39.711237Z",
    +     "iopub.status.idle": "2024-10-04T14:14:40.416569Z",
    +     "shell.execute_reply": "2024-10-04T14:14:40.415983Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -52,19 +52,19 @@
          "name": "stdout",
          "output_type": "stream",
          "text": [
    -      "Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+gbaa65e5)\r\n",
    +      "Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+g103724b)\r\n",
           "Requirement already satisfied: requests in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.32.3)\r\n",
    -      "Requirement already satisfied: pandas==2.* in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.2.3)\r\n"
    +      "Requirement already satisfied: pandas==2.* in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.2.3)\r\n",
    +      "Requirement already satisfied: numpy>=1.22.4 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.1.1)\r\n",
    +      "Requirement already satisfied: python-dateutil>=2.8.2 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.9.0.post0)\r\n",
    +      "Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3/dist-packages (from pandas==2.*->dataretrieval) (2022.1)\r\n",
    +      "Requirement already satisfied: tzdata>=2022.7 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2024.2)\r\n"
          ]
         },
         {
          "name": "stdout",
          "output_type": "stream",
          "text": [
    -      "Requirement already satisfied: numpy>=1.22.4 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.1.1)\r\n",
    -      "Requirement already satisfied: python-dateutil>=2.8.2 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.9.0.post0)\r\n",
    -      "Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3/dist-packages (from pandas==2.*->dataretrieval) (2022.1)\r\n",
    -      "Requirement already satisfied: tzdata>=2022.7 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2024.2)\r\n",
           "Requirement already satisfied: charset-normalizer<4,>=2 in /home/runner/.local/lib/python3.10/site-packages (from requests->dataretrieval) (3.3.2)\r\n",
           "Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests->dataretrieval) (3.3)\r\n",
           "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3/dist-packages (from requests->dataretrieval) (1.26.5)\r\n",
    @@ -92,10 +92,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:45.823524Z",
    -     "iopub.status.busy": "2024-09-26T03:37:45.823139Z",
    -     "iopub.status.idle": "2024-09-26T03:37:46.116135Z",
    -     "shell.execute_reply": "2024-09-26T03:37:46.115575Z"
    +     "iopub.execute_input": "2024-10-04T14:14:40.418569Z",
    +     "iopub.status.busy": "2024-10-04T14:14:40.418394Z",
    +     "iopub.status.idle": "2024-10-04T14:14:40.697826Z",
    +     "shell.execute_reply": "2024-10-04T14:14:40.697303Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -142,10 +142,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:46.118533Z",
    -     "iopub.status.busy": "2024-09-26T03:37:46.118105Z",
    -     "iopub.status.idle": "2024-09-26T03:37:46.724511Z",
    -     "shell.execute_reply": "2024-09-26T03:37:46.723876Z"
    +     "iopub.execute_input": "2024-10-04T14:14:40.700121Z",
    +     "iopub.status.busy": "2024-10-04T14:14:40.699701Z",
    +     "iopub.status.idle": "2024-10-04T14:14:41.708593Z",
    +     "shell.execute_reply": "2024-10-04T14:14:41.708013Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -208,10 +208,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:46.726542Z",
    -     "iopub.status.busy": "2024-09-26T03:37:46.726104Z",
    -     "iopub.status.idle": "2024-09-26T03:37:46.741557Z",
    -     "shell.execute_reply": "2024-09-26T03:37:46.741107Z"
    +     "iopub.execute_input": "2024-10-04T14:14:41.710400Z",
    +     "iopub.status.busy": "2024-10-04T14:14:41.710078Z",
    +     "iopub.status.idle": "2024-10-04T14:14:41.724467Z",
    +     "shell.execute_reply": "2024-10-04T14:14:41.724024Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -604,10 +604,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:46.743514Z",
    -     "iopub.status.busy": "2024-09-26T03:37:46.743051Z",
    -     "iopub.status.idle": "2024-09-26T03:37:46.746733Z",
    -     "shell.execute_reply": "2024-09-26T03:37:46.746162Z"
    +     "iopub.execute_input": "2024-10-04T14:14:41.726044Z",
    +     "iopub.status.busy": "2024-10-04T14:14:41.725750Z",
    +     "iopub.status.idle": "2024-10-04T14:14:41.729057Z",
    +     "shell.execute_reply": "2024-10-04T14:14:41.728534Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -661,10 +661,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:46.748393Z",
    -     "iopub.status.busy": "2024-09-26T03:37:46.748215Z",
    -     "iopub.status.idle": "2024-09-26T03:37:46.754457Z",
    -     "shell.execute_reply": "2024-09-26T03:37:46.753947Z"
    +     "iopub.execute_input": "2024-10-04T14:14:41.730752Z",
    +     "iopub.status.busy": "2024-10-04T14:14:41.730355Z",
    +     "iopub.status.idle": "2024-10-04T14:14:41.735882Z",
    +     "shell.execute_reply": "2024-10-04T14:14:41.735343Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -712,10 +712,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:46.756099Z",
    -     "iopub.status.busy": "2024-09-26T03:37:46.755901Z",
    -     "iopub.status.idle": "2024-09-26T03:37:47.145913Z",
    -     "shell.execute_reply": "2024-09-26T03:37:47.145272Z"
    +     "iopub.execute_input": "2024-10-04T14:14:41.737780Z",
    +     "iopub.status.busy": "2024-10-04T14:14:41.737399Z",
    +     "iopub.status.idle": "2024-10-04T14:14:42.095143Z",
    +     "shell.execute_reply": "2024-10-04T14:14:42.094684Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -767,10 +767,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:47.148137Z",
    -     "iopub.status.busy": "2024-09-26T03:37:47.147713Z",
    -     "iopub.status.idle": "2024-09-26T03:37:47.151160Z",
    -     "shell.execute_reply": "2024-09-26T03:37:47.150649Z"
    +     "iopub.execute_input": "2024-10-04T14:14:42.097042Z",
    +     "iopub.status.busy": "2024-10-04T14:14:42.096620Z",
    +     "iopub.status.idle": "2024-10-04T14:14:42.099641Z",
    +     "shell.execute_reply": "2024-10-04T14:14:42.099198Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -808,10 +808,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:47.152738Z",
    -     "iopub.status.busy": "2024-09-26T03:37:47.152563Z",
    -     "iopub.status.idle": "2024-09-26T03:37:48.051769Z",
    -     "shell.execute_reply": "2024-09-26T03:37:48.051170Z"
    +     "iopub.execute_input": "2024-10-04T14:14:42.101262Z",
    +     "iopub.status.busy": "2024-10-04T14:14:42.100966Z",
    +     "iopub.status.idle": "2024-10-04T14:14:43.047174Z",
    +     "shell.execute_reply": "2024-10-04T14:14:43.046714Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -1210,6 +1210,411 @@
         "display(data2[0])"
        ]
       },
    +  {
    +   "cell_type": "markdown",
    +   "metadata": {},
    +   "source": [
    +    "The following example is the same as the previous example but with multi index turned off (multi_index=False)"
    +   ]
    +  },
    +  {
    +   "cell_type": "code",
    +   "execution_count": 10,
    +   "metadata": {
    +    "execution": {
    +     "iopub.execute_input": "2024-10-04T14:14:43.048936Z",
    +     "iopub.status.busy": "2024-10-04T14:14:43.048559Z",
    +     "iopub.status.idle": "2024-10-04T14:14:44.043629Z",
    +     "shell.execute_reply": "2024-10-04T14:14:44.043159Z"
    +    }
    +   },
    +   "outputs": [
    +    {
    +     "name": "stdout",
    +     "output_type": "stream",
    +     "text": [
    +      "Retrieved 933 data values.\n"
    +     ]
    +    },
    +    {
    +     "name": "stderr",
    +     "output_type": "stream",
    +     "text": [
    +      "/home/runner/.local/lib/python3.10/site-packages/dataretrieval/utils.py:90: UserWarning: Warning: 621 incomplete dates found, consider setting datetime_index to False.\n",
    +      "  warnings.warn(\n"
    +     ]
    +    },
    +    {
    +     "data": {
    +      "text/html": [
    +       "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    agency_cdsite_nosite_tp_cdlev_dtlev_tmlev_tz_cdlev_vasl_lev_vasl_datum_cdlev_status_cdlev_agency_cdlev_dt_acy_cdlev_acy_cdlev_src_cdlev_meth_cdlev_age_cdparameter_cd
    datetime
    1945-10-12 22:35:00+00:00USGS434400121275801GW1945-10-1222:35+0000NaN4192.65NGVD291USGSm2SOA62610
    1945-10-12 22:35:00+00:00USGS434400121275801GW1945-10-1222:35+0000NaN4196.67NAVD881USGSm2SOA62611
    1945-10-12 22:35:00+00:00USGS434400121275801GW1945-10-1222:35+000027.35NaNNaN1USGSm2SOA72019
    1999-06-04 18:00:00+00:00USGS434400121275801GW1999-06-0418:00+0000NaN4203.22NGVD291USGSm2SSA62610
    1999-06-04 18:00:00+00:00USGS434400121275801GW1999-06-0418:00+0000NaN4207.24NAVD881USGSm2SSA62611
    ......................................................
    NaTUSGS434400121275801GW1999-03-19NaNNaNNaN4204.97NAVD881NaND2NaNSA62611
    NaTUSGS434400121275801GW1999-03-19NaNNaN19.05NaNNaN1NaND2NaNSA72019
    NaTUSGS434400121275801GW1999-05-14NaNNaNNaN4201.99NGVD291USGSD2SSA62610
    NaTUSGS434400121275801GW1999-05-14NaNNaNNaN4206.01NAVD881USGSD2SSA62611
    NaTUSGS434400121275801GW1999-05-14NaNNaN18.01NaNNaN1USGSD2SSA72019
    \n", + "

    933 rows × 17 columns

    \n", + "
    " + ], + "text/plain": [ + " agency_cd site_no site_tp_cd lev_dt \\\n", + "datetime \n", + "1945-10-12 22:35:00+00:00 USGS 434400121275801 GW 1945-10-12 \n", + "1945-10-12 22:35:00+00:00 USGS 434400121275801 GW 1945-10-12 \n", + "1945-10-12 22:35:00+00:00 USGS 434400121275801 GW 1945-10-12 \n", + "1999-06-04 18:00:00+00:00 USGS 434400121275801 GW 1999-06-04 \n", + "1999-06-04 18:00:00+00:00 USGS 434400121275801 GW 1999-06-04 \n", + "... ... ... ... ... \n", + "NaT USGS 434400121275801 GW 1999-03-19 \n", + "NaT USGS 434400121275801 GW 1999-03-19 \n", + "NaT USGS 434400121275801 GW 1999-05-14 \n", + "NaT USGS 434400121275801 GW 1999-05-14 \n", + "NaT USGS 434400121275801 GW 1999-05-14 \n", + "\n", + " lev_tm lev_tz_cd lev_va sl_lev_va sl_datum_cd \\\n", + "datetime \n", + "1945-10-12 22:35:00+00:00 22:35 +0000 NaN 4192.65 NGVD29 \n", + "1945-10-12 22:35:00+00:00 22:35 +0000 NaN 4196.67 NAVD88 \n", + "1945-10-12 22:35:00+00:00 22:35 +0000 27.35 NaN NaN \n", + "1999-06-04 18:00:00+00:00 18:00 +0000 NaN 4203.22 NGVD29 \n", + "1999-06-04 18:00:00+00:00 18:00 +0000 NaN 4207.24 NAVD88 \n", + "... ... ... ... ... ... \n", + "NaT NaN NaN NaN 4204.97 NAVD88 \n", + "NaT NaN NaN 19.05 NaN NaN \n", + "NaT NaN NaN NaN 4201.99 NGVD29 \n", + "NaT NaN NaN NaN 4206.01 NAVD88 \n", + "NaT NaN NaN 18.01 NaN NaN \n", + "\n", + " lev_status_cd lev_agency_cd lev_dt_acy_cd \\\n", + "datetime \n", + "1945-10-12 22:35:00+00:00 1 USGS m \n", + "1945-10-12 22:35:00+00:00 1 USGS m \n", + "1945-10-12 22:35:00+00:00 1 USGS m \n", + "1999-06-04 18:00:00+00:00 1 USGS m \n", + "1999-06-04 18:00:00+00:00 1 USGS m \n", + "... ... ... ... \n", + "NaT 1 NaN D \n", + "NaT 1 NaN D \n", + "NaT 1 USGS D \n", + "NaT 1 USGS D \n", + "NaT 1 USGS D \n", + "\n", + " lev_acy_cd lev_src_cd lev_meth_cd lev_age_cd \\\n", + "datetime \n", + "1945-10-12 22:35:00+00:00 2 S O A \n", + "1945-10-12 22:35:00+00:00 2 S O A \n", + "1945-10-12 22:35:00+00:00 2 S O A \n", + "1999-06-04 18:00:00+00:00 2 S S A \n", + "1999-06-04 18:00:00+00:00 2 S S A \n", + "... ... ... ... ... \n", + "NaT 2 NaN S A \n", + "NaT 2 NaN S A \n", + "NaT 2 S S A \n", + "NaT 2 S S A \n", + "NaT 2 S S A \n", + "\n", + " parameter_cd \n", + "datetime \n", + "1945-10-12 22:35:00+00:00 62610 \n", + "1945-10-12 22:35:00+00:00 62611 \n", + "1945-10-12 22:35:00+00:00 72019 \n", + "1999-06-04 18:00:00+00:00 62610 \n", + "1999-06-04 18:00:00+00:00 62611 \n", + "... ... \n", + "NaT 62611 \n", + "NaT 72019 \n", + "NaT 62610 \n", + "NaT 62611 \n", + "NaT 72019 \n", + "\n", + "[933 rows x 17 columns]" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "site_ids = [\"434400121275801\", \"375907091432201\"]\n", + "data2 = nwis.get_gwlevels(sites=site_ids, multi_index=False)\n", + "print(\"Retrieved \" + str(len(data2[0])) + \" data values.\")\n", + "display(data2[0])" + ] + }, { "cell_type": "markdown", "metadata": { @@ -1226,14 +1631,14 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": { "collapsed": false, "execution": { - "iopub.execute_input": "2024-09-26T03:37:48.053632Z", - "iopub.status.busy": "2024-09-26T03:37:48.053447Z", - "iopub.status.idle": "2024-09-26T03:37:48.898384Z", - "shell.execute_reply": "2024-09-26T03:37:48.897821Z" + "iopub.execute_input": "2024-10-04T14:14:44.045339Z", + "iopub.status.busy": "2024-10-04T14:14:44.044932Z", + "iopub.status.idle": "2024-10-04T14:14:44.957165Z", + "shell.execute_reply": "2024-10-04T14:14:44.956635Z" }, "pycharm": { "name": "#%%\n" @@ -1285,14 +1690,14 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": { "collapsed": false, "execution": { - "iopub.execute_input": "2024-09-26T03:37:48.900138Z", - "iopub.status.busy": "2024-09-26T03:37:48.899930Z", - "iopub.status.idle": "2024-09-26T03:37:48.902719Z", - "shell.execute_reply": "2024-09-26T03:37:48.902278Z" + "iopub.execute_input": "2024-10-04T14:14:44.958981Z", + "iopub.status.busy": "2024-10-04T14:14:44.958666Z", + "iopub.status.idle": "2024-10-04T14:14:44.961160Z", + "shell.execute_reply": "2024-10-04T14:14:44.960732Z" }, "pycharm": { "name": "#%%\n" @@ -1328,14 +1733,14 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 13, "metadata": { "collapsed": false, "execution": { - "iopub.execute_input": "2024-09-26T03:37:48.904305Z", - "iopub.status.busy": "2024-09-26T03:37:48.904131Z", - "iopub.status.idle": "2024-09-26T03:37:49.545277Z", - "shell.execute_reply": "2024-09-26T03:37:49.544683Z" + "iopub.execute_input": "2024-10-04T14:14:44.962825Z", + "iopub.status.busy": "2024-10-04T14:14:44.962517Z", + "iopub.status.idle": "2024-10-04T14:14:45.815952Z", + "shell.execute_reply": "2024-10-04T14:14:45.815480Z" }, "pycharm": { "name": "#%%\n" diff --git a/examples/USGS_dataretrieval_Measurements_Examples.html b/examples/USGS_dataretrieval_Measurements_Examples.html index b80ead5..6d4a3ff 100644 --- a/examples/USGS_dataretrieval_Measurements_Examples.html +++ b/examples/USGS_dataretrieval_Measurements_Examples.html @@ -4,7 +4,7 @@ - USGS dataretrieval Python Package get_discharge_measurements() Examples — dataretrieval 0.1.dev1+gbaa65e5 documentation + USGS dataretrieval Python Package get_discharge_measurements() Examples — dataretrieval 0.1.dev1+g103724b documentation @@ -16,7 +16,7 @@ - + @@ -69,6 +69,8 @@
  • USGS dataretrieval Python Package get_pmcodes() Examples
  • USGS dataretrieval Python Package get_discharge_peaks() Examples
  • USGS dataretrieval Python Package get_ratings() Examples
  • +
  • USGS dataretrieval Python Package get_info() Examples
  • +
  • USGS dataretrieval Python Package what_sites() Examples
  • USGS dataretrieval Python Package get_stats() Examples
  • USGS dataretrieval Python Package get_iv() Examples
  • USGS dataretrieval Python Package get_qwdata() Examples
  • @@ -129,7 +131,7 @@

    Install the Package
     Defaulting to user installation because normal site-packages is not writeable
    -Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+gbaa65e5)
    +Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+g103724b)
     Requirement already satisfied: requests in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.32.3)
     Requirement already satisfied: pandas==2.* in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.2.3)
     Requirement already satisfied: numpy>=1.22.4 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.1.1)
    diff --git a/examples/USGS_dataretrieval_Measurements_Examples.ipynb b/examples/USGS_dataretrieval_Measurements_Examples.ipynb
    index 08c51b7..39a5b71 100644
    --- a/examples/USGS_dataretrieval_Measurements_Examples.ipynb
    +++ b/examples/USGS_dataretrieval_Measurements_Examples.ipynb
    @@ -31,10 +31,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:51.407096Z",
    -     "iopub.status.busy": "2024-09-26T03:37:51.406664Z",
    -     "iopub.status.idle": "2024-09-26T03:37:52.153683Z",
    -     "shell.execute_reply": "2024-09-26T03:37:52.153010Z"
    +     "iopub.execute_input": "2024-10-04T14:14:47.673627Z",
    +     "iopub.status.busy": "2024-10-04T14:14:47.673227Z",
    +     "iopub.status.idle": "2024-10-04T14:14:48.384348Z",
    +     "shell.execute_reply": "2024-10-04T14:14:48.383644Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -52,7 +52,7 @@
          "name": "stdout",
          "output_type": "stream",
          "text": [
    -      "Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+gbaa65e5)\r\n",
    +      "Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+g103724b)\r\n",
           "Requirement already satisfied: requests in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.32.3)\r\n",
           "Requirement already satisfied: pandas==2.* in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.2.3)\r\n"
          ]
    @@ -92,10 +92,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:52.156262Z",
    -     "iopub.status.busy": "2024-09-26T03:37:52.155859Z",
    -     "iopub.status.idle": "2024-09-26T03:37:52.452548Z",
    -     "shell.execute_reply": "2024-09-26T03:37:52.452029Z"
    +     "iopub.execute_input": "2024-10-04T14:14:48.386584Z",
    +     "iopub.status.busy": "2024-10-04T14:14:48.386231Z",
    +     "iopub.status.idle": "2024-10-04T14:14:48.664228Z",
    +     "shell.execute_reply": "2024-10-04T14:14:48.663707Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -139,10 +139,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:52.454823Z",
    -     "iopub.status.busy": "2024-09-26T03:37:52.454566Z",
    -     "iopub.status.idle": "2024-09-26T03:37:52.928463Z",
    -     "shell.execute_reply": "2024-09-26T03:37:52.927874Z"
    +     "iopub.execute_input": "2024-10-04T14:14:48.666714Z",
    +     "iopub.status.busy": "2024-10-04T14:14:48.666265Z",
    +     "iopub.status.idle": "2024-10-04T14:14:49.379163Z",
    +     "shell.execute_reply": "2024-10-04T14:14:49.378719Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -193,10 +193,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:52.930544Z",
    -     "iopub.status.busy": "2024-09-26T03:37:52.930110Z",
    -     "iopub.status.idle": "2024-09-26T03:37:52.945488Z",
    -     "shell.execute_reply": "2024-09-26T03:37:52.944977Z"
    +     "iopub.execute_input": "2024-10-04T14:14:49.380679Z",
    +     "iopub.status.busy": "2024-10-04T14:14:49.380524Z",
    +     "iopub.status.idle": "2024-10-04T14:14:49.394573Z",
    +     "shell.execute_reply": "2024-10-04T14:14:49.394125Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -524,10 +524,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:52.947204Z",
    -     "iopub.status.busy": "2024-09-26T03:37:52.947021Z",
    -     "iopub.status.idle": "2024-09-26T03:37:52.950665Z",
    -     "shell.execute_reply": "2024-09-26T03:37:52.950191Z"
    +     "iopub.execute_input": "2024-10-04T14:14:49.396030Z",
    +     "iopub.status.busy": "2024-10-04T14:14:49.395870Z",
    +     "iopub.status.idle": "2024-10-04T14:14:49.399232Z",
    +     "shell.execute_reply": "2024-10-04T14:14:49.398769Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -576,10 +576,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:52.952333Z",
    -     "iopub.status.busy": "2024-09-26T03:37:52.952154Z",
    -     "iopub.status.idle": "2024-09-26T03:37:52.955318Z",
    -     "shell.execute_reply": "2024-09-26T03:37:52.954820Z"
    +     "iopub.execute_input": "2024-10-04T14:14:49.400901Z",
    +     "iopub.status.busy": "2024-10-04T14:14:49.400738Z",
    +     "iopub.status.idle": "2024-10-04T14:14:49.403778Z",
    +     "shell.execute_reply": "2024-10-04T14:14:49.403309Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -615,10 +615,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:52.957058Z",
    -     "iopub.status.busy": "2024-09-26T03:37:52.956771Z",
    -     "iopub.status.idle": "2024-09-26T03:37:53.380755Z",
    -     "shell.execute_reply": "2024-09-26T03:37:53.380252Z"
    +     "iopub.execute_input": "2024-10-04T14:14:49.405346Z",
    +     "iopub.status.busy": "2024-10-04T14:14:49.405162Z",
    +     "iopub.status.idle": "2024-10-04T14:14:49.896228Z",
    +     "shell.execute_reply": "2024-10-04T14:14:49.895791Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -911,10 +911,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:53.382529Z",
    -     "iopub.status.busy": "2024-09-26T03:37:53.382348Z",
    -     "iopub.status.idle": "2024-09-26T03:37:53.912245Z",
    -     "shell.execute_reply": "2024-09-26T03:37:53.911671Z"
    +     "iopub.execute_input": "2024-10-04T14:14:49.897751Z",
    +     "iopub.status.busy": "2024-10-04T14:14:49.897577Z",
    +     "iopub.status.idle": "2024-10-04T14:14:50.542865Z",
    +     "shell.execute_reply": "2024-10-04T14:14:50.542432Z"
         },
         "pycharm": {
          "name": "#%%\n"
    diff --git a/examples/USGS_dataretrieval_ParameterCodes_Examples.html b/examples/USGS_dataretrieval_ParameterCodes_Examples.html
    index ba81a92..0cc7425 100644
    --- a/examples/USGS_dataretrieval_ParameterCodes_Examples.html
    +++ b/examples/USGS_dataretrieval_ParameterCodes_Examples.html
    @@ -4,7 +4,7 @@
       
     
       
    -  USGS dataretrieval Python Package get_pmcodes() Examples — dataretrieval 0.1.dev1+gbaa65e5 documentation
    +  USGS dataretrieval Python Package get_pmcodes() Examples — dataretrieval 0.1.dev1+g103724b documentation
           
           
           
    @@ -16,7 +16,7 @@
       
             
             
    -        
    +        
             
             
             
    @@ -68,6 +68,8 @@
     
     
  • USGS dataretrieval Python Package get_discharge_peaks() Examples
  • USGS dataretrieval Python Package get_ratings() Examples
  • +
  • USGS dataretrieval Python Package get_info() Examples
  • +
  • USGS dataretrieval Python Package what_sites() Examples
  • USGS dataretrieval Python Package get_stats() Examples
  • USGS dataretrieval Python Package get_iv() Examples
  • USGS dataretrieval Python Package get_qwdata() Examples
  • @@ -129,7 +131,7 @@

    Install the Package
     Defaulting to user installation because normal site-packages is not writeable
    -Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+gbaa65e5)
    +Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+g103724b)
     Requirement already satisfied: requests in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.32.3)
     Requirement already satisfied: pandas==2.* in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.2.3)
     Requirement already satisfied: numpy>=1.22.4 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.1.1)
    diff --git a/examples/USGS_dataretrieval_ParameterCodes_Examples.ipynb b/examples/USGS_dataretrieval_ParameterCodes_Examples.ipynb
    index 18ff3f5..4e47be9 100644
    --- a/examples/USGS_dataretrieval_ParameterCodes_Examples.ipynb
    +++ b/examples/USGS_dataretrieval_ParameterCodes_Examples.ipynb
    @@ -34,10 +34,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:55.356562Z",
    -     "iopub.status.busy": "2024-09-26T03:37:55.356377Z",
    -     "iopub.status.idle": "2024-09-26T03:37:56.105122Z",
    -     "shell.execute_reply": "2024-09-26T03:37:56.104413Z"
    +     "iopub.execute_input": "2024-10-04T14:14:52.149948Z",
    +     "iopub.status.busy": "2024-10-04T14:14:52.149569Z",
    +     "iopub.status.idle": "2024-10-04T14:14:52.852655Z",
    +     "shell.execute_reply": "2024-10-04T14:14:52.852073Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -55,15 +55,9 @@
          "name": "stdout",
          "output_type": "stream",
          "text": [
    -      "Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+gbaa65e5)\r\n",
    +      "Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+g103724b)\r\n",
           "Requirement already satisfied: requests in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.32.3)\r\n",
    -      "Requirement already satisfied: pandas==2.* in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.2.3)\r\n"
    -     ]
    -    },
    -    {
    -     "name": "stdout",
    -     "output_type": "stream",
    -     "text": [
    +      "Requirement already satisfied: pandas==2.* in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.2.3)\r\n",
           "Requirement already satisfied: numpy>=1.22.4 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.1.1)\r\n",
           "Requirement already satisfied: python-dateutil>=2.8.2 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.9.0.post0)\r\n",
           "Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3/dist-packages (from pandas==2.*->dataretrieval) (2022.1)\r\n",
    @@ -71,7 +65,13 @@
           "Requirement already satisfied: charset-normalizer<4,>=2 in /home/runner/.local/lib/python3.10/site-packages (from requests->dataretrieval) (3.3.2)\r\n",
           "Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests->dataretrieval) (3.3)\r\n",
           "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3/dist-packages (from requests->dataretrieval) (1.26.5)\r\n",
    -      "Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests->dataretrieval) (2020.6.20)\r\n",
    +      "Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests->dataretrieval) (2020.6.20)\r\n"
    +     ]
    +    },
    +    {
    +     "name": "stdout",
    +     "output_type": "stream",
    +     "text": [
           "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.2->pandas==2.*->dataretrieval) (1.16.0)\r\n"
          ]
         }
    @@ -95,10 +95,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:56.107578Z",
    -     "iopub.status.busy": "2024-09-26T03:37:56.107185Z",
    -     "iopub.status.idle": "2024-09-26T03:37:56.400281Z",
    -     "shell.execute_reply": "2024-09-26T03:37:56.399738Z"
    +     "iopub.execute_input": "2024-10-04T14:14:52.854882Z",
    +     "iopub.status.busy": "2024-10-04T14:14:52.854567Z",
    +     "iopub.status.idle": "2024-10-04T14:14:53.133742Z",
    +     "shell.execute_reply": "2024-10-04T14:14:53.133192Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -140,10 +140,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:56.402610Z",
    -     "iopub.status.busy": "2024-09-26T03:37:56.402191Z",
    -     "iopub.status.idle": "2024-09-26T03:37:56.774032Z",
    -     "shell.execute_reply": "2024-09-26T03:37:56.773452Z"
    +     "iopub.execute_input": "2024-10-04T14:14:53.136080Z",
    +     "iopub.status.busy": "2024-10-04T14:14:53.135649Z",
    +     "iopub.status.idle": "2024-10-04T14:14:53.564090Z",
    +     "shell.execute_reply": "2024-10-04T14:14:53.563633Z"
         },
         "pycharm": {
          "name": "#%%\n"
    @@ -182,10 +182,10 @@
        "metadata": {
         "collapsed": false,
         "execution": {
    -     "iopub.execute_input": "2024-09-26T03:37:56.776176Z",
    -     "iopub.status.busy": "2024-09-26T03:37:56.775775Z",
    -     "iopub.status.idle": "2024-09-26T03:37:56.787030Z",
    -     "shell.execute_reply": "2024-09-26T03:37:56.786432Z"
    +     "iopub.execute_input": "2024-10-04T14:14:53.565752Z",
    +     "iopub.status.busy": "2024-10-04T14:14:53.565439Z",
    +     "iopub.status.idle": "2024-10-04T14:14:53.575571Z",
    +     "shell.execute_reply": "2024-10-04T14:14:53.575127Z"
         },
         "pycharm": {
          "name": "#%%\n"
    diff --git a/examples/USGS_dataretrieval_Peaks_Examples.html b/examples/USGS_dataretrieval_Peaks_Examples.html
    index 1b7827a..b6a3db5 100644
    --- a/examples/USGS_dataretrieval_Peaks_Examples.html
    +++ b/examples/USGS_dataretrieval_Peaks_Examples.html
    @@ -4,7 +4,7 @@
       
     
       
    -  USGS dataretrieval Python Package get_discharge_peaks() Examples — dataretrieval 0.1.dev1+gbaa65e5 documentation
    +  USGS dataretrieval Python Package get_discharge_peaks() Examples — dataretrieval 0.1.dev1+g103724b documentation
           
           
           
    @@ -16,7 +16,7 @@
       
             
             
    -        
    +        
             
             
             
    @@ -69,6 +69,8 @@
     
     
     
  • USGS dataretrieval Python Package get_ratings() Examples
  • +
  • USGS dataretrieval Python Package get_info() Examples
  • +
  • USGS dataretrieval Python Package what_sites() Examples
  • USGS dataretrieval Python Package get_stats() Examples
  • USGS dataretrieval Python Package get_iv() Examples
  • USGS dataretrieval Python Package get_qwdata() Examples
  • @@ -129,7 +131,7 @@

    Install the Package

    +

    The following example is the same as the previous example but with multi index turned off (multi_index=False)

    +
    +
    [7]:
    +
    +
    +
    site_ids = ['01594440', '040851325']
    +peak_data = nwis.get_discharge_peaks(site_ids, multi_index=False)
    +print("Retrieved " + str(len(peak_data[0])) + " data values.")
    +
    +
    +
    +
    +
    +
    +
    +
    +Retrieved 55 data values.
    +
    +

    Additional Examples

    Example 2: Retrieve discharge peaks for a single site.

    diff --git a/examples/USGS_dataretrieval_Peaks_Examples.ipynb b/examples/USGS_dataretrieval_Peaks_Examples.ipynb index bd66c55..77b5f78 100644 --- a/examples/USGS_dataretrieval_Peaks_Examples.ipynb +++ b/examples/USGS_dataretrieval_Peaks_Examples.ipynb @@ -28,10 +28,10 @@ "metadata": { "collapsed": false, "execution": { - "iopub.execute_input": "2024-09-26T03:37:58.060134Z", - "iopub.status.busy": "2024-09-26T03:37:58.059935Z", - "iopub.status.idle": "2024-09-26T03:37:58.807353Z", - "shell.execute_reply": "2024-09-26T03:37:58.806581Z" + "iopub.execute_input": "2024-10-04T14:14:54.988796Z", + "iopub.status.busy": "2024-10-04T14:14:54.988640Z", + "iopub.status.idle": "2024-10-04T14:14:55.694999Z", + "shell.execute_reply": "2024-10-04T14:14:55.694317Z" }, "jupyter": { "outputs_hidden": false @@ -52,16 +52,16 @@ "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+gbaa65e5)\r\n", + "Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+g103724b)\r\n", "Requirement already satisfied: requests in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.32.3)\r\n", - "Requirement already satisfied: pandas==2.* in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.2.3)\r\n" + "Requirement already satisfied: pandas==2.* in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.2.3)\r\n", + "Requirement already satisfied: numpy>=1.22.4 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.1.1)\r\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: numpy>=1.22.4 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.1.1)\r\n", "Requirement already satisfied: python-dateutil>=2.8.2 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.9.0.post0)\r\n", "Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3/dist-packages (from pandas==2.*->dataretrieval) (2022.1)\r\n", "Requirement already satisfied: tzdata>=2022.7 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2024.2)\r\n", @@ -90,10 +90,10 @@ "metadata": { "collapsed": false, "execution": { - "iopub.execute_input": "2024-09-26T03:37:58.809751Z", - "iopub.status.busy": "2024-09-26T03:37:58.809359Z", - "iopub.status.idle": "2024-09-26T03:37:59.103084Z", - "shell.execute_reply": "2024-09-26T03:37:59.102553Z" + "iopub.execute_input": "2024-10-04T14:14:55.697481Z", + "iopub.status.busy": "2024-10-04T14:14:55.697037Z", + "iopub.status.idle": "2024-10-04T14:14:55.972585Z", + "shell.execute_reply": "2024-10-04T14:14:55.972081Z" }, "jupyter": { "outputs_hidden": false @@ -136,10 +136,10 @@ "metadata": { "collapsed": false, "execution": { - "iopub.execute_input": "2024-09-26T03:37:59.105247Z", - "iopub.status.busy": "2024-09-26T03:37:59.104991Z", - "iopub.status.idle": "2024-09-26T03:37:59.415276Z", - "shell.execute_reply": "2024-09-26T03:37:59.414646Z" + "iopub.execute_input": "2024-10-04T14:14:55.974778Z", + "iopub.status.busy": "2024-10-04T14:14:55.974387Z", + "iopub.status.idle": "2024-10-04T14:14:56.525672Z", + "shell.execute_reply": "2024-10-04T14:14:56.525174Z" }, "jupyter": { "outputs_hidden": false @@ -182,10 +182,10 @@ "metadata": { "collapsed": false, "execution": { - "iopub.execute_input": "2024-09-26T03:37:59.417357Z", - "iopub.status.busy": "2024-09-26T03:37:59.417013Z", - "iopub.status.idle": "2024-09-26T03:37:59.440686Z", - "shell.execute_reply": "2024-09-26T03:37:59.440187Z" + "iopub.execute_input": "2024-10-04T14:14:56.527311Z", + "iopub.status.busy": "2024-10-04T14:14:56.526991Z", + "iopub.status.idle": "2024-10-04T14:14:56.548948Z", + "shell.execute_reply": "2024-10-04T14:14:56.548448Z" }, "jupyter": { "outputs_hidden": false @@ -1277,10 +1277,10 @@ "metadata": { "collapsed": false, "execution": { - "iopub.execute_input": "2024-09-26T03:37:59.442699Z", - "iopub.status.busy": "2024-09-26T03:37:59.442189Z", - "iopub.status.idle": "2024-09-26T03:37:59.445460Z", - "shell.execute_reply": "2024-09-26T03:37:59.444994Z" + "iopub.execute_input": "2024-10-04T14:14:56.550680Z", + "iopub.status.busy": "2024-10-04T14:14:56.550375Z", + "iopub.status.idle": "2024-10-04T14:14:56.553749Z", + "shell.execute_reply": "2024-10-04T14:14:56.553165Z" }, "jupyter": { "outputs_hidden": false @@ -1326,10 +1326,10 @@ "metadata": { "collapsed": false, "execution": { - "iopub.execute_input": "2024-09-26T03:37:59.447301Z", - "iopub.status.busy": "2024-09-26T03:37:59.446825Z", - "iopub.status.idle": "2024-09-26T03:37:59.449786Z", - "shell.execute_reply": "2024-09-26T03:37:59.449324Z" + "iopub.execute_input": "2024-10-04T14:14:56.555353Z", + "iopub.status.busy": "2024-10-04T14:14:56.555035Z", + "iopub.status.idle": "2024-10-04T14:14:56.557909Z", + "shell.execute_reply": "2024-10-04T14:14:56.557404Z" }, "jupyter": { "outputs_hidden": false @@ -1351,6 +1351,39 @@ "print(\"The query URL used to retrieve the data from NWIS was: \" + peak_data[1].url)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The following example is the same as the previous example but with multi index turned off (multi_index=False)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "execution": { + "iopub.execute_input": "2024-10-04T14:14:56.559572Z", + "iopub.status.busy": "2024-10-04T14:14:56.559250Z", + "iopub.status.idle": "2024-10-04T14:14:57.151666Z", + "shell.execute_reply": "2024-10-04T14:14:57.151125Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Retrieved 55 data values.\n" + ] + } + ], + "source": [ + "site_ids = ['01594440', '040851325']\n", + "peak_data = nwis.get_discharge_peaks(site_ids, multi_index=False)\n", + "print(\"Retrieved \" + str(len(peak_data[0])) + \" data values.\")" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -1362,14 +1395,14 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": { "collapsed": false, "execution": { - "iopub.execute_input": "2024-09-26T03:37:59.451529Z", - "iopub.status.busy": "2024-09-26T03:37:59.451206Z", - "iopub.status.idle": "2024-09-26T03:37:59.740734Z", - "shell.execute_reply": "2024-09-26T03:37:59.740238Z" + "iopub.execute_input": "2024-10-04T14:14:57.153425Z", + "iopub.status.busy": "2024-10-04T14:14:57.153094Z", + "iopub.status.idle": "2024-10-04T14:14:57.688795Z", + "shell.execute_reply": "2024-10-04T14:14:57.688264Z" }, "jupyter": { "outputs_hidden": false @@ -1972,14 +2005,14 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": { "collapsed": false, "execution": { - "iopub.execute_input": "2024-09-26T03:37:59.742553Z", - "iopub.status.busy": "2024-09-26T03:37:59.742207Z", - "iopub.status.idle": "2024-09-26T03:38:00.158026Z", - "shell.execute_reply": "2024-09-26T03:38:00.157489Z" + "iopub.execute_input": "2024-10-04T14:14:57.690565Z", + "iopub.status.busy": "2024-10-04T14:14:57.690379Z", + "iopub.status.idle": "2024-10-04T14:14:58.204565Z", + "shell.execute_reply": "2024-10-04T14:14:58.203970Z" }, "jupyter": { "outputs_hidden": false @@ -2171,13 +2204,6 @@ "data4 = nwis.get_discharge_peaks(stations, start='1953-01-01', end='1960-01-01')\n", "display(data4[0])" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/examples/USGS_dataretrieval_Ratings_Examples.html b/examples/USGS_dataretrieval_Ratings_Examples.html index 678e26c..9902ed3 100644 --- a/examples/USGS_dataretrieval_Ratings_Examples.html +++ b/examples/USGS_dataretrieval_Ratings_Examples.html @@ -4,7 +4,7 @@ - USGS dataretrieval Python Package get_ratings() Examples — dataretrieval 0.1.dev1+gbaa65e5 documentation + USGS dataretrieval Python Package get_ratings() Examples — dataretrieval 0.1.dev1+g103724b documentation @@ -16,7 +16,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -68,6 +68,8 @@
  • Interpreting the Result
  • +
  • USGS dataretrieval Python Package get_info() Examples
  • +
  • USGS dataretrieval Python Package what_sites() Examples
  • USGS dataretrieval Python Package get_stats() Examples
  • USGS dataretrieval Python Package get_iv() Examples
  • USGS dataretrieval Python Package get_qwdata() Examples
  • @@ -128,7 +130,7 @@

    Install the Package
     Defaulting to user installation because normal site-packages is not writeable
    -Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+gbaa65e5)
    +Requirement already satisfied: dataretrieval in /home/runner/.local/lib/python3.10/site-packages (0.1.dev1+g103724b)
     Requirement already satisfied: requests in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.32.3)
     Requirement already satisfied: pandas==2.* in /home/runner/.local/lib/python3.10/site-packages (from dataretrieval) (2.2.3)
     Requirement already satisfied: numpy>=1.22.4 in /home/runner/.local/lib/python3.10/site-packages (from pandas==2.*->dataretrieval) (2.1.1)
    @@ -378,7 +380,7 @@ 

    Interpreting the Result