Skip to content

Commit db42a1e

Browse files
authored
Merge pull request #93 from gperdrizet/dev
Updated lesson 12 notebooks to load data directly from URL.
2 parents 4ea647c + 4b4c230 commit db42a1e

File tree

3 files changed

+134
-16
lines changed

3 files changed

+134
-16
lines changed

notebooks/unit2/lesson_12/Lesson_12_activity.ipynb

Lines changed: 129 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,124 @@
2929
},
3030
{
3131
"cell_type": "code",
32-
"execution_count": null,
33-
"id": "9eb120c9",
32+
"execution_count": 1,
33+
"id": "8de14613",
3434
"metadata": {},
3535
"outputs": [],
36+
"source": [
37+
"import pandas as pd"
38+
]
39+
},
40+
{
41+
"cell_type": "code",
42+
"execution_count": 2,
43+
"id": "9eb120c9",
44+
"metadata": {},
45+
"outputs": [
46+
{
47+
"data": {
48+
"text/html": [
49+
"<div>\n",
50+
"<style scoped>\n",
51+
" .dataframe tbody tr th:only-of-type {\n",
52+
" vertical-align: middle;\n",
53+
" }\n",
54+
"\n",
55+
" .dataframe tbody tr th {\n",
56+
" vertical-align: top;\n",
57+
" }\n",
58+
"\n",
59+
" .dataframe thead th {\n",
60+
" text-align: right;\n",
61+
" }\n",
62+
"</style>\n",
63+
"<table border=\"1\" class=\"dataframe\">\n",
64+
" <thead>\n",
65+
" <tr style=\"text-align: right;\">\n",
66+
" <th></th>\n",
67+
" <th>weather_condition</th>\n",
68+
" <th>wind_strength</th>\n",
69+
" <th>temperature_c</th>\n",
70+
" <th>rainfall_inches</th>\n",
71+
" <th>humidity_percent</th>\n",
72+
" <th>pressure_hpa</th>\n",
73+
" </tr>\n",
74+
" </thead>\n",
75+
" <tbody>\n",
76+
" <tr>\n",
77+
" <th>0</th>\n",
78+
" <td>Sunny</td>\n",
79+
" <td>Light Breeze</td>\n",
80+
" <td>8.2</td>\n",
81+
" <td>0.13</td>\n",
82+
" <td>48.8</td>\n",
83+
" <td>1016.5</td>\n",
84+
" </tr>\n",
85+
" <tr>\n",
86+
" <th>1</th>\n",
87+
" <td>Snowy</td>\n",
88+
" <td>Gale</td>\n",
89+
" <td>1.6</td>\n",
90+
" <td>0.29</td>\n",
91+
" <td>89.6</td>\n",
92+
" <td>1009.4</td>\n",
93+
" </tr>\n",
94+
" <tr>\n",
95+
" <th>2</th>\n",
96+
" <td>Rainy</td>\n",
97+
" <td>Strong Wind</td>\n",
98+
" <td>7.3</td>\n",
99+
" <td>0.01</td>\n",
100+
" <td>100.0</td>\n",
101+
" <td>1003.3</td>\n",
102+
" </tr>\n",
103+
" <tr>\n",
104+
" <th>3</th>\n",
105+
" <td>Cloudy</td>\n",
106+
" <td>Light Breeze</td>\n",
107+
" <td>21.6</td>\n",
108+
" <td>0.62</td>\n",
109+
" <td>49.3</td>\n",
110+
" <td>1006.9</td>\n",
111+
" </tr>\n",
112+
" <tr>\n",
113+
" <th>4</th>\n",
114+
" <td>Sunny</td>\n",
115+
" <td>Calm</td>\n",
116+
" <td>12.0</td>\n",
117+
" <td>1.09</td>\n",
118+
" <td>38.6</td>\n",
119+
" <td>1016.0</td>\n",
120+
" </tr>\n",
121+
" </tbody>\n",
122+
"</table>\n",
123+
"</div>"
124+
],
125+
"text/plain": [
126+
" weather_condition wind_strength temperature_c rainfall_inches \\\n",
127+
"0 Sunny Light Breeze 8.2 0.13 \n",
128+
"1 Snowy Gale 1.6 0.29 \n",
129+
"2 Rainy Strong Wind 7.3 0.01 \n",
130+
"3 Cloudy Light Breeze 21.6 0.62 \n",
131+
"4 Sunny Calm 12.0 1.09 \n",
132+
"\n",
133+
" humidity_percent pressure_hpa \n",
134+
"0 48.8 1016.5 \n",
135+
"1 89.6 1009.4 \n",
136+
"2 100.0 1003.3 \n",
137+
"3 49.3 1006.9 \n",
138+
"4 38.6 1016.0 "
139+
]
140+
},
141+
"execution_count": 2,
142+
"metadata": {},
143+
"output_type": "execute_result"
144+
}
145+
],
36146
"source": [
37147
"# Load the weather dataset\n",
38-
"df = pd.read_csv('weather.csv')\n",
148+
"url = 'https://gperdrizet.github.io/FSA_devops/assets/data/unit2/weather.csv'\n",
149+
"df = pd.read_csv(url)\n",
39150
"df.head()"
40151
]
41152
},
@@ -224,8 +335,22 @@
224335
}
225336
],
226337
"metadata": {
338+
"kernelspec": {
339+
"display_name": "Python 3",
340+
"language": "python",
341+
"name": "python3"
342+
},
227343
"language_info": {
228-
"name": "python"
344+
"codemirror_mode": {
345+
"name": "ipython",
346+
"version": 3
347+
},
348+
"file_extension": ".py",
349+
"mimetype": "text/x-python",
350+
"name": "python",
351+
"nbconvert_exporter": "python",
352+
"pygments_lexer": "ipython3",
353+
"version": "3.12.12"
229354
}
230355
},
231356
"nbformat": 4,

notebooks/unit2/lesson_12/Lesson_12_linear_algebra_demo.ipynb

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,10 @@
1212
},
1313
{
1414
"cell_type": "code",
15-
"execution_count": null,
15+
"execution_count": 1,
1616
"id": "4b544dfa",
1717
"metadata": {},
1818
"outputs": [
19-
{
20-
"name": "stdout",
21-
"output_type": "stream",
22-
"text": [
23-
"Dataset shape: (500, 6)\n",
24-
"\n",
25-
"First few rows:\n"
26-
]
27-
},
2819
{
2920
"data": {
3021
"text/html": [
@@ -125,7 +116,8 @@
125116
"import pandas as pd\n",
126117
"\n",
127118
"# Display dataset info\n",
128-
"df = pd.read_csv('fitness.csv')\n",
119+
"url = 'https://gperdrizet.github.io/FSA_devops/assets/data/unit2/fitness.csv'\n",
120+
"df = pd.read_csv(url)\n",
129121
"df.head()"
130122
]
131123
},

notebooks/unit2/lesson_12/Lesson_12_statistics_demo.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@
136136
}
137137
],
138138
"source": [
139-
"df = pd.read_csv('weather.csv')\n",
139+
"url = 'https://gperdrizet.github.io/FSA_devops/assets/data/unit2/weather.csv'\n",
140+
"df = pd.read_csv(url)\n",
140141
"df.head()"
141142
]
142143
},

0 commit comments

Comments
 (0)