Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and martibosch committed May 27, 2024
1 parent dc5ae02 commit cf2fc7e
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions tutorials/00-key-concepts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "0be3bfce",
"id": "0",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -19,7 +19,7 @@
},
{
"cell_type": "markdown",
"id": "799b1bdc",
"id": "1",
"metadata": {},
"source": [
"# Key Concepts\n",
Expand All @@ -30,7 +30,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "450d2db3",
"id": "2",
"metadata": {
"tags": [
"parameters"
Expand All @@ -44,7 +44,7 @@
},
{
"cell_type": "markdown",
"id": "fb35543a",
"id": "3",
"metadata": {},
"source": [
"The time series file contains the following columns:\n",
Expand All @@ -57,7 +57,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4e684437",
"id": "4",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -200,7 +200,7 @@
},
{
"cell_type": "markdown",
"id": "e1043825",
"id": "5",
"metadata": {},
"source": [
"## Time series\n",
Expand All @@ -211,7 +211,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "066d2f50",
"id": "6",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -353,7 +353,7 @@
},
{
"cell_type": "markdown",
"id": "1d37b066",
"id": "7",
"metadata": {},
"source": [
"In order to have a proper time series data structure, we can pivot the data to have each variable as a column and each observation as a row (see more details in the [data forms section below](#data-forms)):"
Expand All @@ -362,7 +362,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2e22df91",
"id": "8",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -503,7 +503,7 @@
},
{
"cell_type": "markdown",
"id": "9da5d2a4",
"id": "9",
"metadata": {},
"source": [
"The time series above can be encapsulated in a `TS` object:"
Expand All @@ -512,7 +512,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d1de0a6d",
"id": "10",
"metadata": {},
"outputs": [
{
Expand All @@ -533,7 +533,7 @@
},
{
"cell_type": "markdown",
"id": "b3032d0c",
"id": "11",
"metadata": {},
"source": [
"Why would we need such an encapsulation? Let us get the data for two stations and pivot it to have each variable *for each station* as a column and each observation as a row:"
Expand All @@ -542,7 +542,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "edee00ba",
"id": "12",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -780,7 +780,7 @@
},
{
"cell_type": "markdown",
"id": "de0a4298",
"id": "13",
"metadata": {},
"source": [
"Note now that each station has several missing values, therefore aligning the time index would result in many nan values:"
Expand All @@ -789,7 +789,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "0ec08b34",
"id": "14",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -817,7 +817,7 @@
},
{
"cell_type": "markdown",
"id": "3af368a9",
"id": "15",
"metadata": {},
"source": [
"Instead, we can create a `TS` object for each station and put them in a pandas object. Let us first transform it into a long data frame:"
Expand All @@ -826,7 +826,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "612ab962",
"id": "16",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -999,7 +999,7 @@
},
{
"cell_type": "markdown",
"id": "0b41b946",
"id": "17",
"metadata": {},
"source": [
"We can now transform the above data frame into a series of `TS` objects:"
Expand All @@ -1008,7 +1008,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e36afee0",
"id": "18",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1036,7 +1036,7 @@
},
{
"cell_type": "markdown",
"id": "6edf7385",
"id": "19",
"metadata": {},
"source": [
"Note that a `TSArray` is [a pandas `ExtensionArray` which is used to support custom data types](https://pandas.pydata.org/docs/reference/api/pandas.api.extensions.ExtensionArray.html), in this case, `TS` objects.\n",
Expand All @@ -1049,7 +1049,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "26e70ec1",
"id": "20",
"metadata": {
"lines_to_next_cell": 2
},
Expand Down Expand Up @@ -1312,7 +1312,7 @@
},
{
"cell_type": "markdown",
"id": "73959a1e",
"id": "21",
"metadata": {},
"source": [
"Note that we have many nan values. Finally, it is also possible to have a single `TS` object per module and station, in which case the `TS` objects of the first and third module would have multiple variables, all of which would be aligned in time:"
Expand All @@ -1321,7 +1321,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b0a543a2",
"id": "22",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1502,7 +1502,7 @@
},
{
"cell_type": "markdown",
"id": "1a5ed90a",
"id": "23",
"metadata": {},
"source": [
"TODO: geospatial example\n",
Expand All @@ -1520,7 +1520,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8cdc44f1",
"id": "24",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1727,7 +1727,7 @@
},
{
"cell_type": "markdown",
"id": "9ccb3d70",
"id": "25",
"metadata": {
"lines_to_next_cell": 2
},
Expand All @@ -1738,7 +1738,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "48a03544",
"id": "26",
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit cf2fc7e

Please sign in to comment.