{"cells":[{"cell_type":"code","source":["import pandas as pd\n\nimport requests\nimport json\nimport os\nimport datetime\nimport time\n\nimport pyspark.sql.functions as F"],"metadata":{"application/vnd.databricks.v1+cell":{"showTitle":false,"cellMetadata":{"rowLimit":10000,"byteLimit":2048000},"nuid":"846224e6-4452-43f8-9dad-a26705ff4f8c","inputWidgets":{},"title":""}},"outputs":[],"execution_count":0},{"cell_type":"markdown","source":["You will need to create a notebook with your keys in it in a notebook called `keys`. The next two lines provide examples of how to reference that notebook."],"metadata":{"application/vnd.databricks.v1+cell":{"showTitle":false,"cellMetadata":{},"nuid":"4d2b789e-2bd8-44f8-b24a-f03704d54eb9","inputWidgets":{},"title":""}}},{"cell_type":"code","source":["%run ./keys"],"metadata":{"application/vnd.databricks.v1+cell":{"showTitle":false,"cellMetadata":{"rowLimit":10000,"byteLimit":2048000},"nuid":"9fd037a7-d183-4e6a-bae7-0a657742bbbf","inputWidgets":{},"title":""}},"outputs":[],"execution_count":0},{"cell_type":"code","source":["%run ../sp23/keys"],"metadata":{"application/vnd.databricks.v1+cell":{"showTitle":false,"cellMetadata":{"rowLimit":10000,"byteLimit":2048000},"nuid":"bd674fa8-daa5-4317-9a57-6d5dc7e5a4c0","inputWidgets":{},"title":""}},"outputs":[{"output_type":"stream","output_type":"stream","name":"stdout","text":["ow_key is the variable\nd8a\n"]}],"execution_count":0},{"cell_type":"code","source":["# https://openweathermap.org/forecast16\napi_key = ow_key\n# https://api.openweathermap.org/data/2.5/forecast?lat=43.825386&lon=-111.792824&appid=d8aa64c57714e98a56057fa3bd9f478a&units=imperial&cnt=5\nlat = \"43.825386\"\nlon = \"-111.792824\"\nurl = \"https://api.openweathermap.org/data/2.5/forecast?lat=%s&lon=%s&appid=%s&units=imperial&cnt=5\" % (lat, lon, api_key)\nprint(url[0:85] + \"\" + url[117:])\n"],"metadata":{"application/vnd.databricks.v1+cell":{"showTitle":false,"cellMetadata":{"rowLimit":10000,"byteLimit":2048000},"nuid":"a7760181-3c8b-4183-bd40-9cd0a649fef2","inputWidgets":{},"title":""}},"outputs":[{"output_type":"stream","output_type":"stream","name":"stdout","text":["https://api.openweathermap.org/data/2.5/forecast?lat=43.825386&lon=-111.792824&appid=&units=imperial&cnt=5\n"]},{"output_type":"stream","output_type":"stream","name":"stdout","text":["ow_key is the variable\nd8a\n"]}],"execution_count":0},{"cell_type":"code","source":["# 200 is a good sign, #400 is a bad sign\nresponse = requests.get(url)\nresponse"],"metadata":{"application/vnd.databricks.v1+cell":{"showTitle":false,"cellMetadata":{"rowLimit":10000,"byteLimit":2048000},"nuid":"bac2a982-906a-446f-84df-aab0745a4780","inputWidgets":{},"title":""}},"outputs":[{"output_type":"stream","output_type":"stream","name":"stdout","text":["Out[51]: "]}],"execution_count":0},{"cell_type":"code","source":["data = json.loads(response.text)\ndata"],"metadata":{"application/vnd.databricks.v1+cell":{"showTitle":false,"cellMetadata":{"rowLimit":10000,"byteLimit":2048000},"nuid":"4ec007c0-c8c7-4643-8436-33d09a8dd25c","inputWidgets":{},"title":""}},"outputs":[{"output_type":"stream","output_type":"stream","name":"stdout","text":["Out[52]: {'cod': '200',\n 'message': 0,\n 'cnt': 5,\n 'list': [{'dt': 1685394000,\n 'main': {'temp': 72.14,\n 'feels_like': 70.7,\n 'temp_min': 69.12,\n 'temp_max': 72.14,\n 'pressure': 1015,\n 'sea_level': 1015,\n 'grnd_level': 852,\n 'humidity': 35,\n 'temp_kf': 1.68},\n 'weather': [{'id': 800,\n 'main': 'Clear',\n 'description': 'clear sky',\n 'icon': '01d'}],\n 'clouds': {'all': 0},\n 'wind': {'speed': 11.14, 'deg': 217, 'gust': 14.92},\n 'visibility': 10000,\n 'pop': 0.31,\n 'sys': {'pod': 'd'},\n 'dt_txt': '2023-05-29 21:00:00'},\n {'dt': 1685404800,\n 'main': {'temp': 71.44,\n 'feels_like': 70.07,\n 'temp_min': 70.03,\n 'temp_max': 71.44,\n 'pressure': 1012,\n 'sea_level': 1012,\n 'grnd_level': 850,\n 'humidity': 38,\n 'temp_kf': 0.78},\n 'weather': [{'id': 801,\n 'main': 'Clouds',\n 'description': 'few clouds',\n 'icon': '02d'}],\n 'clouds': {'all': 18},\n 'wind': {'speed': 10.94, 'deg': 213, 'gust': 14.47},\n 'visibility': 10000,\n 'pop': 0.34,\n 'sys': {'pod': 'd'},\n 'dt_txt': '2023-05-30 00:00:00'},\n {'dt': 1685415600,\n 'main': {'temp': 62.2,\n 'feels_like': 60.89,\n 'temp_min': 57.24,\n 'temp_max': 62.2,\n 'pressure': 1012,\n 'sea_level': 1012,\n 'grnd_level': 850,\n 'humidity': 59,\n 'temp_kf': 2.76},\n 'weather': [{'id': 500,\n 'main': 'Rain',\n 'description': 'light rain',\n 'icon': '10n'}],\n 'clouds': {'all': 56},\n 'wind': {'speed': 8.81, 'deg': 209, 'gust': 17.58},\n 'visibility': 10000,\n 'pop': 0.71,\n 'rain': {'3h': 0.13},\n 'sys': {'pod': 'n'},\n 'dt_txt': '2023-05-30 03:00:00'},\n {'dt': 1685426400,\n 'main': {'temp': 50.13,\n 'feels_like': 48.79,\n 'temp_min': 50.13,\n 'temp_max': 50.13,\n 'pressure': 1012,\n 'sea_level': 1012,\n 'grnd_level': 849,\n 'humidity': 84,\n 'temp_kf': 0},\n 'weather': [{'id': 803,\n 'main': 'Clouds',\n 'description': 'broken clouds',\n 'icon': '04n'}],\n 'clouds': {'all': 68},\n 'wind': {'speed': 7.38, 'deg': 135, 'gust': 10.76},\n 'visibility': 10000,\n 'pop': 0.42,\n 'sys': {'pod': 'n'},\n 'dt_txt': '2023-05-30 06:00:00'},\n {'dt': 1685437200,\n 'main': {'temp': 48.56,\n 'feels_like': 46.87,\n 'temp_min': 48.56,\n 'temp_max': 48.56,\n 'pressure': 1012,\n 'sea_level': 1012,\n 'grnd_level': 848,\n 'humidity': 82,\n 'temp_kf': 0},\n 'weather': [{'id': 804,\n 'main': 'Clouds',\n 'description': 'overcast clouds',\n 'icon': '04n'}],\n 'clouds': {'all': 99},\n 'wind': {'speed': 4.47, 'deg': 71, 'gust': 4.76},\n 'visibility': 10000,\n 'pop': 0.05,\n 'sys': {'pod': 'n'},\n 'dt_txt': '2023-05-30 09:00:00'}],\n 'city': {'id': 5605242,\n 'name': 'Rexburg',\n 'coord': {'lat': 43.8254, 'lon': -111.7928},\n 'country': 'US',\n 'population': 25484,\n 'timezone': -21600,\n 'sunrise': 1685360996,\n 'sunset': 1685415573}}"]}],"execution_count":0},{"cell_type":"code","source":["# Google: python print json.loads object -> https://www.digitalocean.com/community/tutorials/python-pretty-print-json\njson_formatted_str = json.dumps(data, indent=3)\nprint(json_formatted_str)"],"metadata":{"application/vnd.databricks.v1+cell":{"showTitle":false,"cellMetadata":{"rowLimit":10000,"byteLimit":2048000},"nuid":"edec49b8-ef94-422b-af64-691090a95d1b","inputWidgets":{},"title":""}},"outputs":[{"output_type":"stream","output_type":"stream","name":"stdout","text":["{\n \"cod\": \"200\",\n \"message\": 0,\n \"cnt\": 5,\n \"list\": [\n {\n \"dt\": 1685394000,\n \"main\": {\n \"temp\": 72.14,\n \"feels_like\": 70.7,\n \"temp_min\": 69.12,\n \"temp_max\": 72.14,\n \"pressure\": 1015,\n \"sea_level\": 1015,\n \"grnd_level\": 852,\n \"humidity\": 35,\n \"temp_kf\": 1.68\n },\n \"weather\": [\n {\n \"id\": 800,\n \"main\": \"Clear\",\n \"description\": \"clear sky\",\n \"icon\": \"01d\"\n }\n ],\n \"clouds\": {\n \"all\": 0\n },\n \"wind\": {\n \"speed\": 11.14,\n \"deg\": 217,\n \"gust\": 14.92\n },\n \"visibility\": 10000,\n \"pop\": 0.31,\n \"sys\": {\n \"pod\": \"d\"\n },\n \"dt_txt\": \"2023-05-29 21:00:00\"\n },\n {\n \"dt\": 1685404800,\n \"main\": {\n \"temp\": 71.44,\n \"feels_like\": 70.07,\n \"temp_min\": 70.03,\n \"temp_max\": 71.44,\n \"pressure\": 1012,\n \"sea_level\": 1012,\n \"grnd_level\": 850,\n \"humidity\": 38,\n \"temp_kf\": 0.78\n },\n \"weather\": [\n {\n \"id\": 801,\n \"main\": \"Clouds\",\n \"description\": \"few clouds\",\n \"icon\": \"02d\"\n }\n ],\n \"clouds\": {\n \"all\": 18\n },\n \"wind\": {\n \"speed\": 10.94,\n \"deg\": 213,\n \"gust\": 14.47\n },\n \"visibility\": 10000,\n \"pop\": 0.34,\n \"sys\": {\n \"pod\": \"d\"\n },\n \"dt_txt\": \"2023-05-30 00:00:00\"\n },\n {\n \"dt\": 1685415600,\n \"main\": {\n \"temp\": 62.2,\n \"feels_like\": 60.89,\n \"temp_min\": 57.24,\n \"temp_max\": 62.2,\n \"pressure\": 1012,\n \"sea_level\": 1012,\n \"grnd_level\": 850,\n \"humidity\": 59,\n \"temp_kf\": 2.76\n },\n \"weather\": [\n {\n \"id\": 500,\n \"main\": \"Rain\",\n \"description\": \"light rain\",\n \"icon\": \"10n\"\n }\n ],\n \"clouds\": {\n \"all\": 56\n },\n \"wind\": {\n \"speed\": 8.81,\n \"deg\": 209,\n \"gust\": 17.58\n },\n \"visibility\": 10000,\n \"pop\": 0.71,\n \"rain\": {\n \"3h\": 0.13\n },\n \"sys\": {\n \"pod\": \"n\"\n },\n \"dt_txt\": \"2023-05-30 03:00:00\"\n },\n {\n \"dt\": 1685426400,\n \"main\": {\n \"temp\": 50.13,\n \"feels_like\": 48.79,\n \"temp_min\": 50.13,\n \"temp_max\": 50.13,\n \"pressure\": 1012,\n \"sea_level\": 1012,\n \"grnd_level\": 849,\n \"humidity\": 84,\n \"temp_kf\": 0\n },\n \"weather\": [\n {\n \"id\": 803,\n \"main\": \"Clouds\",\n \"description\": \"broken clouds\",\n \"icon\": \"04n\"\n }\n ],\n \"clouds\": {\n \"all\": 68\n },\n \"wind\": {\n \"speed\": 7.38,\n \"deg\": 135,\n \"gust\": 10.76\n },\n \"visibility\": 10000,\n \"pop\": 0.42,\n \"sys\": {\n \"pod\": \"n\"\n },\n \"dt_txt\": \"2023-05-30 06:00:00\"\n },\n {\n \"dt\": 1685437200,\n \"main\": {\n \"temp\": 48.56,\n \"feels_like\": 46.87,\n \"temp_min\": 48.56,\n \"temp_max\": 48.56,\n \"pressure\": 1012,\n \"sea_level\": 1012,\n \"grnd_level\": 848,\n \"humidity\": 82,\n \"temp_kf\": 0\n },\n \"weather\": [\n {\n \"id\": 804,\n \"main\": \"Clouds\",\n \"description\": \"overcast clouds\",\n \"icon\": \"04n\"\n }\n ],\n \"clouds\": {\n \"all\": 99\n },\n \"wind\": {\n \"speed\": 4.47,\n \"deg\": 71,\n \"gust\": 4.76\n },\n \"visibility\": 10000,\n \"pop\": 0.05,\n \"sys\": {\n \"pod\": \"n\"\n },\n \"dt_txt\": \"2023-05-30 09:00:00\"\n }\n ],\n \"city\": {\n \"id\": 5605242,\n \"name\": \"Rexburg\",\n \"coord\": {\n \"lat\": 43.8254,\n \"lon\": -111.7928\n },\n \"country\": \"US\",\n \"population\": 25484,\n \"timezone\": -21600,\n \"sunrise\": 1685360996,\n \"sunset\": 1685415573\n }\n}\n"]}],"execution_count":0},{"cell_type":"code","source":["rdd = spark.sparkContext.parallelize([response.text])\ndf = spark.read.json(rdd)\ndisplay(df)"],"metadata":{"application/vnd.databricks.v1+cell":{"showTitle":false,"cellMetadata":{"rowLimit":10000,"byteLimit":2048000},"nuid":"c5f049d1-f2c8-417c-ac22-129eec2425d8","inputWidgets":{},"title":""}},"outputs":[{"output_type":"display_data","metadata":{"application/vnd.databricks.v1+output":{"overflow":false,"datasetInfos":[],"data":[[[[43.8254,-111.7928],"US",5605242,"Rexburg",25484,1685360996,1685415573,-21600],5,"200",[[[0],1685394000,"2023-05-29 21:00:00",[70.7,852,35,1015,1015,72.14,1.68,72.14,69.12],0.31,null,["d"],10000,[["clear sky","01d",800,"Clear"]],[217,14.92,11.14]],[[18],1685404800,"2023-05-30 00:00:00",[70.07,850,38,1012,1012,71.44,0.78,71.44,70.03],0.34,null,["d"],10000,[["few clouds","02d",801,"Clouds"]],[213,14.47,10.94]],[[56],1685415600,"2023-05-30 03:00:00",[60.89,850,59,1012,1012,62.2,2.76,62.2,57.24],0.71,[0.13],["n"],10000,[["light rain","10n",500,"Rain"]],[209,17.58,8.81]],[[68],1685426400,"2023-05-30 06:00:00",[48.79,849,84,1012,1012,50.13,0.0,50.13,50.13],0.42,null,["n"],10000,[["broken clouds","04n",803,"Clouds"]],[135,10.76,7.38]],[[99],1685437200,"2023-05-30 09:00:00",[46.87,848,82,1012,1012,48.56,0.0,48.56,48.56],0.05,null,["n"],10000,[["overcast clouds","04n",804,"Clouds"]],[71,4.76,4.47]]],0]],"plotOptions":{"displayType":"table","customPlotOptions":{},"pivotColumns":null,"pivotAggregation":null,"xColumns":null,"yColumns":null},"columnCustomDisplayInfos":{},"aggType":"","isJsonSchema":true,"removedWidgets":[],"aggSchema":[],"schema":[{"name":"city","type":"{\"type\":\"struct\",\"fields\":[{\"name\":\"coord\",\"type\":{\"type\":\"struct\",\"fields\":[{\"name\":\"lat\",\"type\":\"double\",\"nullable\":true,\"metadata\":{}},{\"name\":\"lon\",\"type\":\"double\",\"nullable\":true,\"metadata\":{}}]},\"nullable\":true,\"metadata\":{}},{\"name\":\"country\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}},{\"name\":\"id\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}},{\"name\":\"name\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}},{\"name\":\"population\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}},{\"name\":\"sunrise\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}},{\"name\":\"sunset\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}},{\"name\":\"timezone\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}}]}","metadata":"{}"},{"name":"cnt","type":"\"long\"","metadata":"{}"},{"name":"cod","type":"\"string\"","metadata":"{}"},{"name":"list","type":"{\"type\":\"array\",\"elementType\":{\"type\":\"struct\",\"fields\":[{\"name\":\"clouds\",\"type\":{\"type\":\"struct\",\"fields\":[{\"name\":\"all\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}}]},\"nullable\":true,\"metadata\":{}},{\"name\":\"dt\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}},{\"name\":\"dt_txt\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}},{\"name\":\"main\",\"type\":{\"type\":\"struct\",\"fields\":[{\"name\":\"feels_like\",\"type\":\"double\",\"nullable\":true,\"metadata\":{}},{\"name\":\"grnd_level\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}},{\"name\":\"humidity\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}},{\"name\":\"pressure\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}},{\"name\":\"sea_level\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}},{\"name\":\"temp\",\"type\":\"double\",\"nullable\":true,\"metadata\":{}},{\"name\":\"temp_kf\",\"type\":\"double\",\"nullable\":true,\"metadata\":{}},{\"name\":\"temp_max\",\"type\":\"double\",\"nullable\":true,\"metadata\":{}},{\"name\":\"temp_min\",\"type\":\"double\",\"nullable\":true,\"metadata\":{}}]},\"nullable\":true,\"metadata\":{}},{\"name\":\"pop\",\"type\":\"double\",\"nullable\":true,\"metadata\":{}},{\"name\":\"rain\",\"type\":{\"type\":\"struct\",\"fields\":[{\"name\":\"3h\",\"type\":\"double\",\"nullable\":true,\"metadata\":{}}]},\"nullable\":true,\"metadata\":{}},{\"name\":\"sys\",\"type\":{\"type\":\"struct\",\"fields\":[{\"name\":\"pod\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}}]},\"nullable\":true,\"metadata\":{}},{\"name\":\"visibility\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}},{\"name\":\"weather\",\"type\":{\"type\":\"array\",\"elementType\":{\"type\":\"struct\",\"fields\":[{\"name\":\"description\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}},{\"name\":\"icon\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}},{\"name\":\"id\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}},{\"name\":\"main\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}}]},\"containsNull\":true},\"nullable\":true,\"metadata\":{}},{\"name\":\"wind\",\"type\":{\"type\":\"struct\",\"fields\":[{\"name\":\"deg\",\"type\":\"long\",\"nullable\":true,\"metadata\":{}},{\"name\":\"gust\",\"type\":\"double\",\"nullable\":true,\"metadata\":{}},{\"name\":\"speed\",\"type\":\"double\",\"nullable\":true,\"metadata\":{}}]},\"nullable\":true,\"metadata\":{}}]},\"containsNull\":true}","metadata":"{}"},{"name":"message","type":"\"long\"","metadata":"{}"}],"aggError":"","aggData":[],"addedWidgets":{},"metadata":{},"dbfsResultPath":null,"type":"table","aggOverflow":false,"aggSeriesLimitReached":false,"arguments":{}}},"output_type":"display_data","data":{"text/html":["
citycntcodlistmessage
List(List(43.8254, -111.7928), US, 5605242, Rexburg, 25484, 1685360996, 1685415573, -21600)5200List(List(List(0), 1685394000, 2023-05-29 21:00:00, List(70.7, 852, 35, 1015, 1015, 72.14, 1.68, 72.14, 69.12), 0.31, null, List(d), 10000, List(List(clear sky, 01d, 800, Clear)), List(217, 14.92, 11.14)), List(List(18), 1685404800, 2023-05-30 00:00:00, List(70.07, 850, 38, 1012, 1012, 71.44, 0.78, 71.44, 70.03), 0.34, null, List(d), 10000, List(List(few clouds, 02d, 801, Clouds)), List(213, 14.47, 10.94)), List(List(56), 1685415600, 2023-05-30 03:00:00, List(60.89, 850, 59, 1012, 1012, 62.2, 2.76, 62.2, 57.24), 0.71, List(0.13), List(n), 10000, List(List(light rain, 10n, 500, Rain)), List(209, 17.58, 8.81)), List(List(68), 1685426400, 2023-05-30 06:00:00, List(48.79, 849, 84, 1012, 1012, 50.13, 0.0, 50.13, 50.13), 0.42, null, List(n), 10000, List(List(broken clouds, 04n, 803, Clouds)), List(135, 10.76, 7.38)), List(List(99), 1685437200, 2023-05-30 09:00:00, List(46.87, 848, 82, 1012, 1012, 48.56, 0.0, 48.56, 48.56), 0.05, null, List(n), 10000, List(List(overcast clouds, 04n, 804, Clouds)), List(71, 4.76, 4.47)))0
"]}}],"execution_count":0},{"cell_type":"code","source":["df.printSchema()"],"metadata":{"application/vnd.databricks.v1+cell":{"showTitle":false,"cellMetadata":{"rowLimit":10000,"byteLimit":2048000},"nuid":"de7ca8e6-1e75-4461-bd45-310cabbc3bfb","inputWidgets":{},"title":""}},"outputs":[{"output_type":"stream","output_type":"stream","name":"stdout","text":["root\n |-- city: struct (nullable = true)\n | |-- coord: struct (nullable = true)\n | | |-- lat: double (nullable = true)\n | | |-- lon: double (nullable = true)\n | |-- country: string (nullable = true)\n | |-- id: long (nullable = true)\n | |-- name: string (nullable = true)\n | |-- population: long (nullable = true)\n | |-- sunrise: long (nullable = true)\n | |-- sunset: long (nullable = true)\n | |-- timezone: long (nullable = true)\n |-- cnt: long (nullable = true)\n |-- cod: string (nullable = true)\n |-- list: array (nullable = true)\n | |-- element: struct (containsNull = true)\n | | |-- clouds: struct (nullable = true)\n | | | |-- all: long (nullable = true)\n | | |-- dt: long (nullable = true)\n | | |-- dt_txt: string (nullable = true)\n | | |-- main: struct (nullable = true)\n | | | |-- feels_like: double (nullable = true)\n | | | |-- grnd_level: long (nullable = true)\n | | | |-- humidity: long (nullable = true)\n | | | |-- pressure: long (nullable = true)\n | | | |-- sea_level: long (nullable = true)\n | | | |-- temp: double (nullable = true)\n | | | |-- temp_kf: double (nullable = true)\n | | | |-- temp_max: double (nullable = true)\n | | | |-- temp_min: double (nullable = true)\n | | |-- pop: double (nullable = true)\n | | |-- rain: struct (nullable = true)\n | | | |-- 3h: double (nullable = true)\n | | |-- sys: struct (nullable = true)\n | | | |-- pod: string (nullable = true)\n | | |-- visibility: long (nullable = true)\n | | |-- weather: array (nullable = true)\n | | | |-- element: struct (containsNull = true)\n | | | | |-- description: string (nullable = true)\n | | | | |-- icon: string (nullable = true)\n | | | | |-- id: long (nullable = true)\n | | | | |-- main: string (nullable = true)\n | | |-- wind: struct (nullable = true)\n | | | |-- deg: long (nullable = true)\n | | | |-- gust: double (nullable = true)\n | | | |-- speed: double (nullable = true)\n |-- message: long (nullable = true)\n\n"]}],"execution_count":0}],"metadata":{"application/vnd.databricks.v1+notebook":{"notebookName":"example_api","dashboards":[],"notebookMetadata":{"pythonIndentUnit":2},"language":"python","widgets":{}}},"nbformat":4,"nbformat_minor":0}