{ "cells": [ { "cell_type": "markdown", "metadata": { "lines_to_next_cell": 0, "toc": true }, "source": [ "

Table of Contents

\n", "
" ] }, { "cell_type": "markdown", "metadata": { "lines_to_next_cell": 0 }, "source": [ "# Download Environment Canada Daily Data" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from pathlib import Path\n", "\n", "import pandas as pd\n", "import requests" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Set the context for this notebook\n", "\n", "Importing the context module will check to see whether\n", "`data/processed` and `data/raw` exist and complain if\n", "it can't find them" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "in context.py, setting root_dir to /Users/phil/repos/eosc213_students/notebooks/pandas\n", "******************************\n", "context imported. Front of path:\n", "/Users/phil/repos/eosc213_students/notebooks/pandas\n", "/Users/phil/mini37/lib/python36.zip\n", "******************************\n", "\n" ] } ], "source": [ "import context" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Station Inventory\n", "\n", "* Instructions: copy and paste this url into a browser: (ftp://client_climate@ftp.tor.ec.gc.ca/Pub/Get_More_Data_Plus_de_donnees/)\n", "\n", "* To get the station inventory (1.3 Mbyte csv file), copy and paste this url into\n", " a browser (`%20` is the blank space character)\n", "\n", " ftp://client_climate@ftp.tor.ec.gc.ca/Pub/Get_More_Data_Plus_de_donnees/Station%20Inventory%20EN.csv\n", "\n", " We have saved a copy in `data/Station Inventory EN .csv`" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "lines_to_next_cell": 2 }, "outputs": [], "source": [ "#\n", "# note that whitespace (blanks, tabs, newlines) in a tuple are discarded\n", "# so we can split a long string up like this:\n", "#\n", "f = (\n", " \"ftp://client_climate@ftp.tor.ec.gc.ca/Pub/\"\n", " \"Get_More_Data_Plus_de_donnees/Station%20Inventory%20EN.csv\"\n", ")" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(8756, 19)\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", "
NameProvinceClimate IDEnv Canada IDWMO IDAirport CodeLatitude (deg)Longitude (deg)LatitudeLongitudeElevation (m)First YearLast YearHLY First YearHLY Last YearDLY First YearDLY Last YearMLY First YearMLY Last Year
0ACTIVE PASSBRITISH COLUMBIA101006614NaNNaN48.87-123.28485200000-12317000004.019841996NaNNaN1984.01996.01984.01996.0
1ALBERT HEADBRITISH COLUMBIA101023515NaNNaN48.40-123.48482400000-123290000017.019711995NaNNaN1971.01995.01971.01995.0
2BAMBERTON OCEAN CEMENTBRITISH COLUMBIA101059516NaNNaN48.58-123.52483500000-123310000085.319611980NaNNaN1961.01980.01961.01980.0
3BEAR CREEKBRITISH COLUMBIA101072017NaNNaN48.50-124.00483000000-1240000000350.519101971NaNNaN1910.01971.01910.01971.0
4BEAVER LAKEBRITISH COLUMBIA101077418NaNNaN48.50-123.35483000000-123210000061.018941952NaNNaN1894.01952.01894.01952.0
\n", "
" ], "text/plain": [ " Name Province Climate ID Env Canada ID WMO ID \\\n", "0 ACTIVE PASS BRITISH COLUMBIA 1010066 14 NaN \n", "1 ALBERT HEAD BRITISH COLUMBIA 1010235 15 NaN \n", "2 BAMBERTON OCEAN CEMENT BRITISH COLUMBIA 1010595 16 NaN \n", "3 BEAR CREEK BRITISH COLUMBIA 1010720 17 NaN \n", "4 BEAVER LAKE BRITISH COLUMBIA 1010774 18 NaN \n", "\n", " Airport Code Latitude (deg) Longitude (deg) Latitude Longitude \\\n", "0 NaN 48.87 -123.28 485200000 -1231700000 \n", "1 NaN 48.40 -123.48 482400000 -1232900000 \n", "2 NaN 48.58 -123.52 483500000 -1233100000 \n", "3 NaN 48.50 -124.00 483000000 -1240000000 \n", "4 NaN 48.50 -123.35 483000000 -1232100000 \n", "\n", " Elevation (m) First Year Last Year HLY First Year HLY Last Year \\\n", "0 4.0 1984 1996 NaN NaN \n", "1 17.0 1971 1995 NaN NaN \n", "2 85.3 1961 1980 NaN NaN \n", "3 350.5 1910 1971 NaN NaN \n", "4 61.0 1894 1952 NaN NaN \n", "\n", " DLY First Year DLY Last Year MLY First Year MLY Last Year \n", "0 1984.0 1996.0 1984.0 1996.0 \n", "1 1971.0 1995.0 1971.0 1995.0 \n", "2 1961.0 1980.0 1961.0 1980.0 \n", "3 1910.0 1971.0 1910.0 1971.0 \n", "4 1894.0 1952.0 1894.0 1952.0 " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "inventory_file = context.data_dir / \"Station Inventory EN.csv\"\n", "inventory = pd.read_csv(inventory_file, skiprows=3)\n", "\n", "# Rename some of the columns to more convenient labels\n", "cols_dict = {\n", " \"TC ID\": \"Airport Code\",\n", " \"Station ID\": \"Env Canada ID\",\n", " \"Latitude (Decimal Degrees)\": \"Latitude (deg)\",\n", " \"Longitude (Decimal Degrees)\": \"Longitude (deg)\",\n", "}\n", "inventory = inventory.rename(columns=cols_dict)\n", "\n", "print(inventory.shape)\n", "inventory.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Info for Selected Station\n", "\n", "To download data for Vancouver Airport station (airport code YVR), we need the ID codes used by Environment Canada for this station. Here is how we find the numerical code 'YVR'.\n", "Note that it has changed at some point from 889 to 51442" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "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", "
NameProvinceClimate IDEnv Canada IDWMO IDAirport CodeLatitude (deg)Longitude (deg)LatitudeLongitudeElevation (m)First YearLast YearHLY First YearHLY Last YearDLY First YearDLY Last YearMLY First YearMLY Last Year
996VANCOUVER INTL ABRITISH COLUMBIA11083955144271892.0YVR49.19-123.18491141000-12311020004.3201320192013.02019.02013.02019.0NaNNaN
1008VANCOUVER INT'L ABRITISH COLUMBIA1108447889NaNYVR49.20-123.18491142000-12310550004.3193720131953.02013.01937.02013.01937.02013.0
\n", "
" ], "text/plain": [ " Name Province Climate ID Env Canada ID WMO ID \\\n", "996 VANCOUVER INTL A BRITISH COLUMBIA 1108395 51442 71892.0 \n", "1008 VANCOUVER INT'L A BRITISH COLUMBIA 1108447 889 NaN \n", "\n", " Airport Code Latitude (deg) Longitude (deg) Latitude Longitude \\\n", "996 YVR 49.19 -123.18 491141000 -1231102000 \n", "1008 YVR 49.20 -123.18 491142000 -1231055000 \n", "\n", " Elevation (m) First Year Last Year HLY First Year HLY Last Year \\\n", "996 4.3 2013 2019 2013.0 2019.0 \n", "1008 4.3 1937 2013 1953.0 2013.0 \n", "\n", " DLY First Year DLY Last Year MLY First Year MLY Last Year \n", "996 2013.0 2019.0 NaN NaN \n", "1008 1937.0 2013.0 1937.0 2013.0 " ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "station = \"YVR\"\n", "\n", "# Extract the inventory row(s) corresponding to this station\n", "station_info = inventory[inventory[\"Airport Code\"] == station]\n", "station_info" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Download Data\n", "\n", "First, define a function to download the CSV data using the Environment Canada API:" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "def download_daily_raw(env_canada_id, year, savefile=\"test.csv\", verbose=True):\n", " \"\"\"Download CSV file of daily data for selected station and year\"\"\"\n", "\n", " # URL endpoint and query parameters\n", " url_endpoint = \"http://climate.weather.gc.ca/climate_data/bulk_data_e.html\"\n", " params = {\n", " \"format\": \"csv\",\n", " \"stationID\": env_canada_id,\n", " \"Year\": year,\n", " \"Month\": \"01\",\n", " \"Day\": \"01\",\n", " \"timeframe\": \"2\",\n", " \"submit\": \" Download Data\",\n", " }\n", "\n", " # Send GET request\n", " response = requests.get(url_endpoint, params=params)\n", "\n", " # Download CSV file\n", " if verbose:\n", " print(f\"Saving to {savefile}\")\n", " with open(savefile, \"wb\") as f:\n", " f.write(response.content)\n", "\n", " return None" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "*Note: The code below uses [f-strings](https://realpython.com/python-f-strings/) to substitute variable values into a string*" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1937.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1938.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1939.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1940.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1941.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1942.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1943.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1944.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1945.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1946.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1947.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1948.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1949.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1950.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1951.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1952.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1953.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1954.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1955.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1956.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1957.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1958.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1959.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1960.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1961.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1962.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1963.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1964.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1965.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1966.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1967.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1968.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1969.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1970.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1971.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1972.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1973.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1974.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1975.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1976.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1977.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1978.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1979.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1980.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1981.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1982.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1983.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1984.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1985.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1986.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1987.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1988.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1989.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1990.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1991.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1992.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1993.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1994.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1995.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1996.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1997.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1998.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_1999.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2000.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2001.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2002.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2003.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2004.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2005.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2006.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2007.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2008.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2009.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2010.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2011.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2012.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_889_2013.csv\n" ] } ], "source": [ "# Early data (1937 to mid 2013)\n", "stn_id_early = 889 # station id for YVR airport\n", "years_early = range(1937, 2014)\n", "\n", "for year in years_early:\n", " savefile = context.raw_dir / Path(f\"weather_daily_{station}_{stn_id_early}_{year}.csv\")\n", " download_daily_raw(stn_id_early, year, savefile=savefile)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_51442_2013.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_51442_2014.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_51442_2015.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_51442_2016.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_51442_2017.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_51442_2018.csv\n", "Saving to /Users/phil/repos/eosc213_students/notebooks/pandas/data/raw/weather_daily_YVR_51442_2019.csv\n" ] } ], "source": [ "# Recent data (mid 2013 to 2019)\n", "stn_id_recent = 51442\n", "years_recent = range(2013, 2020)\n", "\n", "for year in years_recent:\n", " savefile = (context.raw_dir / \n", " Path(f\"weather_daily_{station}_{stn_id_recent}_{year}.csv\"))\n", " download_daily_raw(stn_id_recent, year, savefile=savefile)" ] } ], "metadata": { "jupytext": { "cell_metadata_filter": "all", "notebook_metadata_filter": "-language_info", "text_representation": { "extension": ".py", "format_name": "percent", "format_version": "1.2", "jupytext_version": "1.0.3" } }, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.7" }, "nbsphinx": { "execute": "never" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": true, "toc_position": {}, "toc_section_display": true, "toc_window_display": true } }, "nbformat": 4, "nbformat_minor": 2 }