{"id":123991,"name":"get-station-data","description":"A set of Python tools to make it easier to extract weather station data (e.g., temperature, precipitation) from the Global Historical Climatology Network Daily.","url":"https://github.com/scotthosking/get-station-data","last_synced_at":"2026-04-11T21:00:39.196Z","repository":{"id":90306561,"uuid":"83478285","full_name":"scotthosking/get-station-data","owner":"scotthosking","description":"Easily grab weather station data from around the globe (e.g. GHCN)","archived":false,"fork":false,"pushed_at":"2023-10-31T17:29:27.000Z","size":1082,"stargazers_count":29,"open_issues_count":1,"forks_count":11,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-05T18:02:45.618Z","etag":null,"topics":["python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scotthosking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-02-28T20:56:10.000Z","updated_at":"2025-09-23T10:30:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b6491f1-27c3-4b81-9593-a0daf45f112f","html_url":"https://github.com/scotthosking/get-station-data","commit_stats":{"total_commits":87,"total_committers":5,"mean_commits":17.4,"dds":"0.25287356321839083","last_synced_commit":"7fecc17af7d7bfd2ddd88fe9b8475f4bee400dac"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/scotthosking/get-station-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotthosking%2Fget-station-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotthosking%2Fget-station-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotthosking%2Fget-station-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotthosking%2Fget-station-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scotthosking","download_url":"https://codeload.github.com/scotthosking/get-station-data/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotthosking%2Fget-station-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31695165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T20:18:30.949Z","status":"ssl_error","status_checked_at":"2026-04-11T20:18:29.982Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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"}},"owner":{"login":"scotthosking","name":"Scott Hosking","uuid":"10783052","kind":"user","description":"Environmental AI, British Antarctic Survey \u0026 The Alan Turing Institute","email":"","website":"https://scotthosking.com","location":"Cambridge, UK","twitter":"scotthosking","company":null,"icon_url":"https://avatars.githubusercontent.com/u/10783052?u=5dcf6a6816bd735f9e34c322676927228989ac48\u0026v=4","repositories_count":3,"last_synced_at":"2023-02-28T01:05:19.373Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/scotthosking","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-11T06:26:31.545Z","updated_at":"2023-02-28T01:05:19.375Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scotthosking","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scotthosking/repositories"},"packages":[],"commits":{"id":1422324,"full_name":"scotthosking/get-station-data","default_branch":"main","total_commits":97,"total_committers":6,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":16.166666666666668,"dds":0.3298969072164949,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-04-09T20:22:05.602Z","last_synced_commit":"f7eaa50823ff75117b577b370e67d194c3d342a1","created_at":"2023-10-26T00:15:08.474Z","updated_at":"2026-04-09T20:21:50.304Z","committers":[{"name":"Scott Hosking","email":"jshosking@gmail.com","login":"scotthosking","count":65},{"name":"Magnus","email":"magnusaross@gmail.com","login":"magnusross","count":14},{"name":"Tom Andersson","email":"tomand@bas.ac.uk","login":"tom-andersson","count":10},{"name":"Scott Hosking","email":"scott@Scotts-MBP.home","login":null,"count":5},{"name":"Scott Hosking","email":"scott@Scotts-MacBook-Pro.local","login":"scottconrad","count":2},{"name":"Alejandro ©","email":"acocac@gmail.com","login":"acocac","count":1}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotthosking%2Fget-station-data/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-09T00:00:23.197Z","repositories_count":6212742,"commits_count":905231682,"contributors_count":34959233,"owners_count":1143750,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"scotthosking/get-station-data","html_url":"https://github.com/scotthosking/get-station-data","last_synced_at":"2025-09-01T08:04:17.589Z","status":"error","issues_count":4,"pull_requests_count":6,"avg_time_to_close_issue":11337842.333333334,"avg_time_to_close_pull_request":554858.0,"issues_closed_count":3,"pull_requests_closed_count":6,"pull_request_authors_count":4,"issue_authors_count":3,"avg_comments_per_issue":3.0,"avg_comments_per_pull_request":1.0,"merged_pull_requests_count":5,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":1,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":1,"past_year_avg_comments_per_issue":0.0,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2023-10-26T00:15:10.158Z","updated_at":"2025-09-02T11:30:34.071Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotthosking%2Fget-station-data","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/scotthosking%2Fget-station-data/issues","issue_labels_count":{},"pull_request_labels_count":{},"issue_author_associations_count":{"NONE":2,"OWNER":1,"COLLABORATOR":1},"pull_request_author_associations_count":{"COLLABORATOR":3,"CONTRIBUTOR":2,"OWNER":1},"issue_authors":{"manmeet3591":1,"scotthosking":1,"magnusross":1,"lpeJhrrby":1},"pull_request_authors":{"magnusross":3,"tom-andersson":1,"scotthosking":1,"acocac":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-03T00:00:08.051Z","repositories_count":14065016,"issues_count":34433358,"pull_requests_count":112491235,"authors_count":11220102,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[{"login":"magnusross","count":4,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/magnusross"},{"login":"scotthosking","count":2,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/scotthosking"}],"active_maintainers":[]},"events":{"total":{"WatchEvent":4},"last_year":{"WatchEvent":2}},"keywords":["python"],"dependencies":[],"score":5.19295685089021,"created_at":"2023-10-26T00:00:22.273Z","updated_at":"2026-04-11T21:00:39.198Z","avatar_url":"https://github.com/scotthosking.png","language":"Jupyter Notebook","category":"Climate Change","sub_category":"Climate Data Access and Visualization","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# Get daily weather station data (Global)\n\n\u003c!-- [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/scotthosking/get-station-data/master?filepath=ghcn_monthly_data.ipynb) --\u003e\n\nA set of Python tools to make it easier to extract weather station data (e.g., temperature, precipitation) from the [Global Historical Climatology Network - Daily (GHCND)](https://www.ncei.noaa.gov/products/land-based-station/global-historical-climatology-network-daily)\n\n\u003e *\"The Global Historical Climatology Network daily (GHCNd) is an integrated database of daily climate summaries from land surface stations across the globe. GHCNd is made up of daily climate records from numerous sources that have been integrated and subjected to a common suite of quality assurance reviews. GHCNd contains records from more than 100,000 stations in 180 countries and territories. NCEI provides numerous daily variables, including maximum and minimum temperature, total daily precipitation, snowfall, and snow depth. About half the stations only report precipitation. Both record length and period of record vary by station and cover intervals ranging from less than a year to more than 175 years.\"* [source](https://www.ncei.noaa.gov/products/land-based-station/global-historical-climatology-network-daily)\n\nMore information on the data can be found [here](https://www.ncei.noaa.gov/pub/data/ghcn/daily/readme.txt)\n\n\u003c!-- See Examples:\n\n* [Get daily data](https://scotthosking.com/notebooks/ghcn_daily/)\n* [Get monthly data](https://scotthosking.com/notebooks/ghcn_monthly/) --\u003e\n\n## Installation\n\n\u003c!-- 1. **Install the package via [PyPi](https://pypi.org/project/get-station-data/)**: which tends to be the most user-friendly option:\n\n    ```bash\n    pip install get-station-data\n    ``` --\u003e\n\n1. **Install from the source code**:\n\n* Clone the repository source code:\n\n```bash\ngit clone https://github.com/scotthosking/get-station-data.git \n```\n\n* Install along with its dependencies:\n\n```bash\ncd /path/to/my/get-station-data\npip install -v -e .\n```\n\n## Worked through example\n\n```python\nfrom get_station_data import ghcnd\nfrom get_station_data.util import nearest_stn\n\n%matplotlib inline \n```\n\n### Read station metadata\n\n```python\nstn_md = ghcnd.get_stn_metadata()\n```\n\n### Choose a location (lon/lat) and number of nearest neighbours\n\n```python\nlondon_lon_lat = -0.1278, 51.5074\nmy_stns = nearest_stn(stn_md, \n                        london_lon_lat[0], london_lon_lat[1], \n                        n_neighbours=5 )\nmy_stns\n```\n\n\n\n\n\u003cdiv\u003e\n\u003ctable border=\"1\" class=\"dataframe\"\u003e\n  \u003cthead\u003e\n    \u003ctr style=\"text-align: right;\"\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003estation\u003c/th\u003e\n      \u003cth\u003elat\u003c/th\u003e\n      \u003cth\u003elon\u003c/th\u003e\n      \u003cth\u003eelev\u003c/th\u003e\n      \u003cth\u003ename\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003e52113\u003c/th\u003e\n      \u003ctd\u003eUKE00105915\u003c/td\u003e\n      \u003ctd\u003e51.5608\u003c/td\u003e\n      \u003ctd\u003e0.1789\u003c/td\u003e\n      \u003ctd\u003e137.0\u003c/td\u003e\n      \u003ctd\u003eHAMPSTEAD\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e52165\u003c/th\u003e\n      \u003ctd\u003eUKM00003772\u003c/td\u003e\n      \u003ctd\u003e51.4780\u003c/td\u003e\n      \u003ctd\u003e-0.4610\u003c/td\u003e\n      \u003ctd\u003e25.3\u003c/td\u003e\n      \u003ctd\u003eHEATHROW\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e52098\u003c/th\u003e\n      \u003ctd\u003eUKE00105900\u003c/td\u003e\n      \u003ctd\u003e51.8067\u003c/td\u003e\n      \u003ctd\u003e0.3581\u003c/td\u003e\n      \u003ctd\u003e128.0\u003c/td\u003e\n      \u003ctd\u003eROTHAMSTED\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e52191\u003c/th\u003e\n      \u003ctd\u003eUKW00035054\u003c/td\u003e\n      \u003ctd\u003e51.2833\u003c/td\u003e\n      \u003ctd\u003e0.4000\u003c/td\u003e\n      \u003ctd\u003e91.1\u003c/td\u003e\n      \u003ctd\u003eWEST MALLING\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e52131\u003c/th\u003e\n      \u003ctd\u003eUKE00107650\u003c/td\u003e\n      \u003ctd\u003e51.4789\u003c/td\u003e\n      \u003ctd\u003e0.4489\u003c/td\u003e\n      \u003ctd\u003e25.0\u003c/td\u003e\n      \u003ctd\u003eHEATHROW\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n\n\n### Download and extract data into a pandas DataFrame\n\n\n```python\ndf = ghcnd.get_data(my_stns)\n\ndf.head()\n```\n\n\n\n\n\u003cdiv\u003e\n\u003ctable border=\"1\" class=\"dataframe\"\u003e\n  \u003cthead\u003e\n    \u003ctr style=\"text-align: right;\"\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003estation\u003c/th\u003e\n      \u003cth\u003eyear\u003c/th\u003e\n      \u003cth\u003emonth\u003c/th\u003e\n      \u003cth\u003eday\u003c/th\u003e\n      \u003cth\u003eelement\u003c/th\u003e\n      \u003cth\u003evalue\u003c/th\u003e\n      \u003cth\u003emflag\u003c/th\u003e\n      \u003cth\u003eqflag\u003c/th\u003e\n      \u003cth\u003esflag\u003c/th\u003e\n      \u003cth\u003edate\u003c/th\u003e\n      \u003cth\u003elon\u003c/th\u003e\n      \u003cth\u003elat\u003c/th\u003e\n      \u003cth\u003eelev\u003c/th\u003e\n      \u003cth\u003ename\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003e0\u003c/th\u003e\n      \u003ctd\u003eUKE00105915\u003c/td\u003e\n      \u003ctd\u003e1959\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003eTMAX\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e1959-12-01\u003c/td\u003e\n      \u003ctd\u003e0.1789\u003c/td\u003e\n      \u003ctd\u003e51.5608\u003c/td\u003e\n      \u003ctd\u003e137.0\u003c/td\u003e\n      \u003ctd\u003eHAMPSTEAD\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e1\u003c/th\u003e\n      \u003ctd\u003eUKE00105915\u003c/td\u003e\n      \u003ctd\u003e1959\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e2\u003c/td\u003e\n      \u003ctd\u003eTMAX\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e1959-12-02\u003c/td\u003e\n      \u003ctd\u003e0.1789\u003c/td\u003e\n      \u003ctd\u003e51.5608\u003c/td\u003e\n      \u003ctd\u003e137.0\u003c/td\u003e\n      \u003ctd\u003eHAMPSTEAD\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e2\u003c/th\u003e\n      \u003ctd\u003eUKE00105915\u003c/td\u003e\n      \u003ctd\u003e1959\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e3\u003c/td\u003e\n      \u003ctd\u003eTMAX\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e1959-12-03\u003c/td\u003e\n      \u003ctd\u003e0.1789\u003c/td\u003e\n      \u003ctd\u003e51.5608\u003c/td\u003e\n      \u003ctd\u003e137.0\u003c/td\u003e\n      \u003ctd\u003eHAMPSTEAD\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e3\u003c/th\u003e\n      \u003ctd\u003eUKE00105915\u003c/td\u003e\n      \u003ctd\u003e1959\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e4\u003c/td\u003e\n      \u003ctd\u003eTMAX\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e1959-12-04\u003c/td\u003e\n      \u003ctd\u003e0.1789\u003c/td\u003e\n      \u003ctd\u003e51.5608\u003c/td\u003e\n      \u003ctd\u003e137.0\u003c/td\u003e\n      \u003ctd\u003eHAMPSTEAD\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e4\u003c/th\u003e\n      \u003ctd\u003eUKE00105915\u003c/td\u003e\n      \u003ctd\u003e1959\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e5\u003c/td\u003e\n      \u003ctd\u003eTMAX\u003c/td\u003e\n      \u003ctd\u003eNaN\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e1959-12-05\u003c/td\u003e\n      \u003ctd\u003e0.1789\u003c/td\u003e\n      \u003ctd\u003e51.5608\u003c/td\u003e\n      \u003ctd\u003e137.0\u003c/td\u003e\n      \u003ctd\u003eHAMPSTEAD\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n\n\n### Filter data for, e.g., a single variable\n\n```python\nvar = 'PRCP'   # precipitation\ndf = df[ df['element'] == var ]\n\n### Tidy up columns\ndf = df.rename(index=str, columns={\"value\": var})\ndf = df.drop(['element'], axis=1)\n\ndf.head()\n```\n\n\n\n\n\u003cdiv\u003e\n\u003ctable border=\"1\" class=\"dataframe\"\u003e\n  \u003cthead\u003e\n    \u003ctr style=\"text-align: right;\"\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003estation\u003c/th\u003e\n      \u003cth\u003eyear\u003c/th\u003e\n      \u003cth\u003emonth\u003c/th\u003e\n      \u003cth\u003eday\u003c/th\u003e\n      \u003cth\u003ePRCP\u003c/th\u003e\n      \u003cth\u003emflag\u003c/th\u003e\n      \u003cth\u003eqflag\u003c/th\u003e\n      \u003cth\u003esflag\u003c/th\u003e\n      \u003cth\u003edate\u003c/th\u003e\n      \u003cth\u003elon\u003c/th\u003e\n      \u003cth\u003elat\u003c/th\u003e\n      \u003cth\u003eelev\u003c/th\u003e\n      \u003cth\u003ename\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003e93\u003c/th\u003e\n      \u003ctd\u003eUKE00105915\u003c/td\u003e\n      \u003ctd\u003e1960\u003c/td\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e2.5\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eE\u003c/td\u003e\n      \u003ctd\u003e1960-01-01\u003c/td\u003e\n      \u003ctd\u003e0.1789\u003c/td\u003e\n      \u003ctd\u003e51.5608\u003c/td\u003e\n      \u003ctd\u003e137.0\u003c/td\u003e\n      \u003ctd\u003eHAMPSTEAD\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e94\u003c/th\u003e\n      \u003ctd\u003eUKE00105915\u003c/td\u003e\n      \u003ctd\u003e1960\u003c/td\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e2\u003c/td\u003e\n      \u003ctd\u003e1.5\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eE\u003c/td\u003e\n      \u003ctd\u003e1960-01-02\u003c/td\u003e\n      \u003ctd\u003e0.1789\u003c/td\u003e\n      \u003ctd\u003e51.5608\u003c/td\u003e\n      \u003ctd\u003e137.0\u003c/td\u003e\n      \u003ctd\u003eHAMPSTEAD\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e95\u003c/th\u003e\n      \u003ctd\u003eUKE00105915\u003c/td\u003e\n      \u003ctd\u003e1960\u003c/td\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e3\u003c/td\u003e\n      \u003ctd\u003e1.0\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eE\u003c/td\u003e\n      \u003ctd\u003e1960-01-03\u003c/td\u003e\n      \u003ctd\u003e0.1789\u003c/td\u003e\n      \u003ctd\u003e51.5608\u003c/td\u003e\n      \u003ctd\u003e137.0\u003c/td\u003e\n      \u003ctd\u003eHAMPSTEAD\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e96\u003c/th\u003e\n      \u003ctd\u003eUKE00105915\u003c/td\u003e\n      \u003ctd\u003e1960\u003c/td\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e4\u003c/td\u003e\n      \u003ctd\u003e0.8\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eE\u003c/td\u003e\n      \u003ctd\u003e1960-01-04\u003c/td\u003e\n      \u003ctd\u003e0.1789\u003c/td\u003e\n      \u003ctd\u003e51.5608\u003c/td\u003e\n      \u003ctd\u003e137.0\u003c/td\u003e\n      \u003ctd\u003eHAMPSTEAD\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e97\u003c/th\u003e\n      \u003ctd\u003eUKE00105915\u003c/td\u003e\n      \u003ctd\u003e1960\u003c/td\u003e\n      \u003ctd\u003e1\u003c/td\u003e\n      \u003ctd\u003e5\u003c/td\u003e\n      \u003ctd\u003e0.0\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eE\u003c/td\u003e\n      \u003ctd\u003e1960-01-05\u003c/td\u003e\n      \u003ctd\u003e0.1789\u003c/td\u003e\n      \u003ctd\u003e51.5608\u003c/td\u003e\n      \u003ctd\u003e137.0\u003c/td\u003e\n      \u003ctd\u003eHAMPSTEAD\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n\n\n\n```python\ndf.drop(columns=['mflag','qflag','sflag']).tail(n=10)\n```\n\n\n\n\n\u003cdiv\u003e\n\u003ctable border=\"1\" class=\"dataframe\"\u003e\n  \u003cthead\u003e\n    \u003ctr style=\"text-align: right;\"\u003e\n      \u003cth\u003e\u003c/th\u003e\n      \u003cth\u003estation\u003c/th\u003e\n      \u003cth\u003eyear\u003c/th\u003e\n      \u003cth\u003emonth\u003c/th\u003e\n      \u003cth\u003eday\u003c/th\u003e\n      \u003cth\u003ePRCP\u003c/th\u003e\n      \u003cth\u003edate\u003c/th\u003e\n      \u003cth\u003elon\u003c/th\u003e\n      \u003cth\u003elat\u003c/th\u003e\n      \u003cth\u003eelev\u003c/th\u003e\n      \u003cth\u003ename\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003e83938\u003c/th\u003e\n      \u003ctd\u003eUKE00107650\u003c/td\u003e\n      \u003ctd\u003e2016\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e22\u003c/td\u003e\n      \u003ctd\u003e0.0\u003c/td\u003e\n      \u003ctd\u003e2016-12-22\u003c/td\u003e\n      \u003ctd\u003e0.4489\u003c/td\u003e\n      \u003ctd\u003e51.4789\u003c/td\u003e\n      \u003ctd\u003e25.0\u003c/td\u003e\n      \u003ctd\u003eHEATHROW\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e83939\u003c/th\u003e\n      \u003ctd\u003eUKE00107650\u003c/td\u003e\n      \u003ctd\u003e2016\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e23\u003c/td\u003e\n      \u003ctd\u003e1.4\u003c/td\u003e\n      \u003ctd\u003e2016-12-23\u003c/td\u003e\n      \u003ctd\u003e0.4489\u003c/td\u003e\n      \u003ctd\u003e51.4789\u003c/td\u003e\n      \u003ctd\u003e25.0\u003c/td\u003e\n      \u003ctd\u003eHEATHROW\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e83940\u003c/th\u003e\n      \u003ctd\u003eUKE00107650\u003c/td\u003e\n      \u003ctd\u003e2016\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e24\u003c/td\u003e\n      \u003ctd\u003e0.0\u003c/td\u003e\n      \u003ctd\u003e2016-12-24\u003c/td\u003e\n      \u003ctd\u003e0.4489\u003c/td\u003e\n      \u003ctd\u003e51.4789\u003c/td\u003e\n      \u003ctd\u003e25.0\u003c/td\u003e\n      \u003ctd\u003eHEATHROW\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e83941\u003c/th\u003e\n      \u003ctd\u003eUKE00107650\u003c/td\u003e\n      \u003ctd\u003e2016\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e25\u003c/td\u003e\n      \u003ctd\u003e1.0\u003c/td\u003e\n      \u003ctd\u003e2016-12-25\u003c/td\u003e\n      \u003ctd\u003e0.4489\u003c/td\u003e\n      \u003ctd\u003e51.4789\u003c/td\u003e\n      \u003ctd\u003e25.0\u003c/td\u003e\n      \u003ctd\u003eHEATHROW\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e83942\u003c/th\u003e\n      \u003ctd\u003eUKE00107650\u003c/td\u003e\n      \u003ctd\u003e2016\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e26\u003c/td\u003e\n      \u003ctd\u003e0.0\u003c/td\u003e\n      \u003ctd\u003e2016-12-26\u003c/td\u003e\n      \u003ctd\u003e0.4489\u003c/td\u003e\n      \u003ctd\u003e51.4789\u003c/td\u003e\n      \u003ctd\u003e25.0\u003c/td\u003e\n      \u003ctd\u003eHEATHROW\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e83943\u003c/th\u003e\n      \u003ctd\u003eUKE00107650\u003c/td\u003e\n      \u003ctd\u003e2016\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e27\u003c/td\u003e\n      \u003ctd\u003e0.0\u003c/td\u003e\n      \u003ctd\u003e2016-12-27\u003c/td\u003e\n      \u003ctd\u003e0.4489\u003c/td\u003e\n      \u003ctd\u003e51.4789\u003c/td\u003e\n      \u003ctd\u003e25.0\u003c/td\u003e\n      \u003ctd\u003eHEATHROW\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e83944\u003c/th\u003e\n      \u003ctd\u003eUKE00107650\u003c/td\u003e\n      \u003ctd\u003e2016\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e28\u003c/td\u003e\n      \u003ctd\u003e0.2\u003c/td\u003e\n      \u003ctd\u003e2016-12-28\u003c/td\u003e\n      \u003ctd\u003e0.4489\u003c/td\u003e\n      \u003ctd\u003e51.4789\u003c/td\u003e\n      \u003ctd\u003e25.0\u003c/td\u003e\n      \u003ctd\u003eHEATHROW\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e83945\u003c/th\u003e\n      \u003ctd\u003eUKE00107650\u003c/td\u003e\n      \u003ctd\u003e2016\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e29\u003c/td\u003e\n      \u003ctd\u003e0.4\u003c/td\u003e\n      \u003ctd\u003e2016-12-29\u003c/td\u003e\n      \u003ctd\u003e0.4489\u003c/td\u003e\n      \u003ctd\u003e51.4789\u003c/td\u003e\n      \u003ctd\u003e25.0\u003c/td\u003e\n      \u003ctd\u003eHEATHROW\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e83946\u003c/th\u003e\n      \u003ctd\u003eUKE00107650\u003c/td\u003e\n      \u003ctd\u003e2016\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e30\u003c/td\u003e\n      \u003ctd\u003e0.0\u003c/td\u003e\n      \u003ctd\u003e2016-12-30\u003c/td\u003e\n      \u003ctd\u003e0.4489\u003c/td\u003e\n      \u003ctd\u003e51.4789\u003c/td\u003e\n      \u003ctd\u003e25.0\u003c/td\u003e\n      \u003ctd\u003eHEATHROW\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e83947\u003c/th\u003e\n      \u003ctd\u003eUKE00107650\u003c/td\u003e\n      \u003ctd\u003e2016\u003c/td\u003e\n      \u003ctd\u003e12\u003c/td\u003e\n      \u003ctd\u003e31\u003c/td\u003e\n      \u003ctd\u003e0.4\u003c/td\u003e\n      \u003ctd\u003e2016-12-31\u003c/td\u003e\n      \u003ctd\u003e0.4489\u003c/td\u003e\n      \u003ctd\u003e51.4789\u003c/td\u003e\n      \u003ctd\u003e25.0\u003c/td\u003e\n      \u003ctd\u003eHEATHROW\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\n\n\n### Save to file\n\n```python\ndf.to_csv('London_5stns_GHCN-D.csv', index=False)\n```\n\n### Plot histogram of all data\n\n```python\ndf['PRCP'].plot.hist(bins=40)\n```\n    \u003cmatplotlib.axes._subplots.AxesSubplot at 0x11ae36898\u003e\n\n![png](http://scotthosking.com/images/notebooks/ghcn_daily_data/output_14_1.png)\n\n\n### Plot time series for one station\n\n```python\nheathrow = df[ df['name'] == 'HEATHROW' ]\nheathrow['PRCP'].plot()\n```\n\n    \u003cmatplotlib.axes._subplots.AxesSubplot at 0x81f0d7240\u003e\n\n![png](http://scotthosking.com/images/notebooks/ghcn_daily_data/output_16_1.png)\n\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":["cmip6","climate-science"],"project_url":"https://ost.ecosyste.ms/api/v1/projects/123991","html_url":"https://ost.ecosyste.ms/projects/123991"}