\n",
" \n",
" Name in the table | \n",
" Meaning | \n",
"
\n",
" \n",
" Stn_Name | \n",
" Station Name\n",
" |
\n",
" \n",
" Lat | \n",
" Latitude (North+, degrees) | \n",
"
\n",
" \n",
" Long | \n",
" Longitude (West - , degrees) | \n",
"
\n",
" \n",
" Prov | \n",
" Province | \n",
"
\n",
" \n",
" Tm | \n",
" Mean Temperature (°C) | \n",
"
\n",
" \n",
" DwTm | \n",
" Days without Valid Mean Temperature | \n",
"
\n",
" \n",
" D | \n",
" Mean Temperature difference from Normal (1981-2010) (°C) | \n",
"
\n",
" \n",
" Tx | \n",
" Highest Monthly Maximum Temperature (°C) | \n",
"
\n",
" \n",
" DwTx | \n",
" Days without Valid Maximum Temperature | \n",
"
\n",
" \n",
" Tn | \n",
" Lowest Monthly Minimum Temperature (°C) | \n",
"
\n",
" \n",
" DwTn | \n",
" Days without Valid Minimum Temperature | \n",
"
\n",
" \n",
" S | \n",
" Snowfall (cm) | \n",
"
\n",
" \n",
" DwS | \n",
" Days without Valid Snowfall | \n",
"
\n",
" \n",
" S%N | \n",
" Percent of Normal (1981-2010) Snowfall | \n",
"
\n",
" \n",
" P | \n",
" Total Precipitation (mm) | \n",
"
\n",
" \n",
" DwP | \n",
" Days without Valid Precipitation | \n",
"
\n",
" \n",
" P%N | \n",
" Percent of Normal (1981-2010) Precipitation | \n",
"
\n",
" \n",
" S_G | \n",
" Snow on the ground at the end of the month (cm) | \n",
"
\n",
" \n",
" Pd | \n",
" Number of days with Precipitation 1.0 mm or more | \n",
"
\n",
" \n",
" BS | \n",
" Bright Sunshine (hours) | \n",
"
\n",
" \n",
" DwBS | \n",
" Days without Valid Bright Sunshine | \n",
"
\n",
" \n",
" BS% | \n",
" Percent of Normal (1981-2010) Bright Sunshine | \n",
"
\n",
" \n",
" HDD | \n",
" Degree Days below 18 °C | \n",
"
\n",
" \n",
" CDD | \n",
" Degree Days above 18 °C | \n",
"
\n",
" \n",
" Stn_No | \n",
" Climate station identifier (first 3 digits indicate drainage basin, last 4 characters are for sorting alphabetically). | \n",
"
\n",
" \n",
" NA | \n",
" Not Available | \n",
"
\n",
"\n",
"
\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 1-Download data\n",
"\n",
"To download the data, we will use **`!wget`** to download it from IBM Object Storage.\\\n",
"**Did you know?** When it comes to Machine Learning, you will likely be working with large datasets. As a business, where can you host your data? IBM is offering a unique opportunity for businesses, with 10 Tb of IBM Cloud Object Storage: [Sign up now for free](http://cocl.us/ML0101EN-IBM-Offer-CC)\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"--2022-08-20 21:05:34-- https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBMDeveloperSkillsNetwork-ML0101EN-SkillsNetwork/labs/Module%204/data/weather-stations20140101-20141231.csv\n",
"Resolving cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud (cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud)... 169.63.118.104\n",
"Connecting to cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud (cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud)|169.63.118.104|:443... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 129821 (127K) [text/csv]\n",
"Saving to: ‘weather-stations20140101-20141231.csv’\n",
"\n",
"weather-stations201 100%[===================>] 126.78K --.-KB/s in 0.003s \n",
"\n",
"2022-08-20 21:05:34 (36.4 MB/s) - ‘weather-stations20140101-20141231.csv’ saved [129821/129821]\n",
"\n"
]
}
],
"source": [
"!wget -O weather-stations20140101-20141231.csv https://cf-courses-data.s3.us.cloud-object-storage.appdomain.cloud/IBMDeveloperSkillsNetwork-ML0101EN-SkillsNetwork/labs/Module%204/data/weather-stations20140101-20141231.csv"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 2- Load the dataset\n",
"\n",
"We will import the .csv then we creates the columns for year, month and day.\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"