{"id":22445396,"url":"https://github.com/anas436/weather-station-clustering-using-dbscan-and-scikit-learn-with-python","last_synced_at":"2026-04-12T03:01:53.108Z","repository":{"id":110394509,"uuid":"534327499","full_name":"Anas436/Weather-Station-Clustering-using-DBSCAN-and-Scikit-learn-with-Python","owner":"Anas436","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-08T17:52:55.000Z","size":1643,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T10:48:07.724Z","etag":null,"topics":["basemap","cluster","csv","dbscan","density-based-clustering","jupyterlab","matplotlib","numpy","pandas","pylab","python3","rcparams","scikit-learn","sklearn","warnings"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anas436.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-08T17:44:47.000Z","updated_at":"2022-09-08T17:56:54.000Z","dependencies_parsed_at":"2023-04-23T13:34:31.205Z","dependency_job_id":null,"html_url":"https://github.com/Anas436/Weather-Station-Clustering-using-DBSCAN-and-Scikit-learn-with-Python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Anas436/Weather-Station-Clustering-using-DBSCAN-and-Scikit-learn-with-Python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anas436%2FWeather-Station-Clustering-using-DBSCAN-and-Scikit-learn-with-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anas436%2FWeather-Station-Clustering-using-DBSCAN-and-Scikit-learn-with-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anas436%2FWeather-Station-Clustering-using-DBSCAN-and-Scikit-learn-with-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anas436%2FWeather-Station-Clustering-using-DBSCAN-and-Scikit-learn-with-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anas436","download_url":"https://codeload.github.com/Anas436/Weather-Station-Clustering-using-DBSCAN-and-Scikit-learn-with-Python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anas436%2FWeather-Station-Clustering-using-DBSCAN-and-Scikit-learn-with-Python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31702581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T21:17:31.016Z","status":"online","status_checked_at":"2026-04-12T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["basemap","cluster","csv","dbscan","density-based-clustering","jupyterlab","matplotlib","numpy","pandas","pylab","python3","rcparams","scikit-learn","sklearn","warnings"],"created_at":"2024-12-06T03:14:07.860Z","updated_at":"2026-04-12T03:01:53.077Z","avatar_url":"https://github.com/Anas436.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weather-Station-Clustering-using-DBSCAN-and-Scikit-learn-with-Python\n\n\n\n## Objectives\n\nAfter completing this lab you will be able to:\n\n*   Use DBSCAN to do Density based clustering\n*   Use Matplotlib to plot clusters\n\nMost of the traditional clustering techniques, such as k-means, hierarchical and fuzzy clustering, can be used to group data without supervision.\n\nHowever, when applied to tasks with arbitrary shape clusters, or clusters within a cluster, the traditional techniques might be unable to achieve good results. That is, elements in the same cluster might not share enough similarity or the performance may be poor.\nAdditionally, Density-based clustering locates regions of high density that are separated from one another by regions of low density. Density, in this context, is defined as the number of points within a specified radius.\n\nIn this section, the main focus will be manipulating the data and properties of DBSCAN and observing the resulting clustering.\n\n\u003ch1 align=center\u003e Weather Station Clustering using DBSCAN \u0026 scikit-learn \u003c/h1\u003e\n\u003chr\u003e\n\nDBSCAN is especially very good for tasks like class identification in a spatial context. The wonderful attribute of DBSCAN algorithm is that it can find out any arbitrary shape cluster without getting affected by noise. For example, this following example cluster the location of weather stations in Canada.\n\\\u003cClick 1\u003e\nDBSCAN can be used here, for instance, to find the group of stations which show the same weather condition. As you can see, it not only finds different arbitrary shaped clusters, can find the denser part of data-centered samples by ignoring less-dense areas or noises.\n\nLet's start playing with the data. We will be working according to the following workflow: \u003c/font\u003e\n\n1.  Loading data\n\n*   Overview data\n*   Data cleaning\n*   Data selection\n*   Clusteing\n\u003cbr\u003e \u003c/br\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eName in the table\u003c/th\u003e\n    \u003cth\u003eMeaning\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cfont color = \"green\"\u003e\u003cstrong\u003eStn_Name\u003c/font\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cfont color = \"green\"\u003e\u003cstrong\u003eStation Name\u003c/font\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cfont color = \"green\"\u003e\u003cstrong\u003eLat\u003c/font\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cfont color = \"green\"\u003e\u003cstrong\u003eLatitude (North+, degrees)\u003c/font\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cfont color = \"green\"\u003e\u003cstrong\u003eLong\u003c/font\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cfont color = \"green\"\u003e\u003cstrong\u003eLongitude (West - , degrees)\u003c/font\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eProv\u003c/td\u003e\n    \u003ctd\u003eProvince\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eTm\u003c/td\u003e\n    \u003ctd\u003eMean Temperature (°C)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDwTm\u003c/td\u003e\n    \u003ctd\u003eDays without Valid Mean Temperature\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eD\u003c/td\u003e\n    \u003ctd\u003eMean Temperature difference from Normal (1981-2010) (°C)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cfont color = \"black\"\u003eTx\u003c/font\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cfont color = \"black\"\u003eHighest Monthly Maximum Temperature (°C)\u003c/font\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDwTx\u003c/td\u003e\n    \u003ctd\u003eDays without Valid Maximum Temperature\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cfont color = \"black\"\u003eTn\u003c/font\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cfont color = \"black\"\u003eLowest Monthly Minimum Temperature (°C)\u003c/font\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDwTn\u003c/td\u003e\n    \u003ctd\u003eDays without Valid Minimum Temperature\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eS\u003c/td\u003e\n    \u003ctd\u003eSnowfall (cm)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDwS\u003c/td\u003e\n    \u003ctd\u003eDays without Valid Snowfall\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eS%N\u003c/td\u003e\n    \u003ctd\u003ePercent of Normal (1981-2010) Snowfall\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cfont color = \"green\"\u003e\u003cstrong\u003eP\u003c/font\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cfont color = \"green\"\u003e\u003cstrong\u003eTotal Precipitation (mm)\u003c/font\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDwP\u003c/td\u003e\n    \u003ctd\u003eDays without Valid Precipitation\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eP%N\u003c/td\u003e\n    \u003ctd\u003ePercent of Normal (1981-2010) Precipitation\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eS_G\u003c/td\u003e\n    \u003ctd\u003eSnow on the ground at the end of the month (cm)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ePd\u003c/td\u003e\n    \u003ctd\u003eNumber of days with Precipitation 1.0 mm or more\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eBS\u003c/td\u003e\n    \u003ctd\u003eBright Sunshine (hours)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDwBS\u003c/td\u003e\n    \u003ctd\u003eDays without Valid Bright Sunshine\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eBS%\u003c/td\u003e\n    \u003ctd\u003ePercent of Normal (1981-2010) Bright Sunshine\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eHDD\u003c/td\u003e\n    \u003ctd\u003eDegree Days below 18 °C\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eCDD\u003c/td\u003e\n    \u003ctd\u003eDegree Days above 18 °C\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eStn_No\u003c/td\u003e\n    \u003ctd\u003eClimate station identifier (first 3 digits indicate   drainage basin, last 4 characters are for sorting alphabetically).\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eNA\u003c/td\u003e\n    \u003ctd\u003eNot Available\u003c/td\u003e\n  \u003c/tr\u003e\n\n\u003c/table\u003e\n\n\u003c/body\u003e\n\u003c/html\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanas436%2Fweather-station-clustering-using-dbscan-and-scikit-learn-with-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanas436%2Fweather-station-clustering-using-dbscan-and-scikit-learn-with-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanas436%2Fweather-station-clustering-using-dbscan-and-scikit-learn-with-python/lists"}