{"id":15724434,"url":"https://github.com/cldellow/iem2parquet","last_synced_at":"2025-03-31T01:14:37.199Z","repository":{"id":140790707,"uuid":"165523918","full_name":"cldellow/iem2parquet","owner":"cldellow","description":"Export Iowa Environmental Mesonet data to Parquet files.","archived":false,"fork":false,"pushed_at":"2019-02-05T04:23:21.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T12:13:20.955Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cldellow.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-13T15:50:58.000Z","updated_at":"2019-02-05T04:23:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"657d55ff-373f-4841-a591-4bb3cf9e99c6","html_url":"https://github.com/cldellow/iem2parquet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldellow%2Fiem2parquet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldellow%2Fiem2parquet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldellow%2Fiem2parquet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldellow%2Fiem2parquet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cldellow","download_url":"https://codeload.github.com/cldellow/iem2parquet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246399798,"owners_count":20770908,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-03T22:16:38.828Z","updated_at":"2025-03-31T01:14:37.180Z","avatar_url":"https://github.com/cldellow.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iem2parquet\n\nThe [Iowa Environmental Mesonet](http://mesonet.agron.iastate.edu/) archives automated weather\nsensor data from stations around the world. They take raw data, published in the standard\n[METAR](https://en.wikipedia.org/wiki/METAR) format, do minimal processing and expose it\nvia a web service.\n\nThe web service is a bit pokey and exposes the data as a TSV. These scripts automate\nthe retrieval of data and conversion to a Parquet file, suitable for further processing\nwith a big data tool of your choice (or, y'know, [SQLite](https://github.com/cldellow/sqlite-parquet-vtable)).\n\nIf you use this, please be considerate of the remote server's capacity.\n\n## Prerequisites\n\nThis tool depends on the [`csv2parquet`](https://github.com/cldellow/csv2parquet) package. Install it via:\n\n```\npip install pyarrow csv2parquet\n```\n\n## Usage\n\n```\n# Download TSV for a period of time.\n./fetch CYKF 2018-1-1 2018-1-31 \u003e ykf.tsv\n\n# Convert to Parquet file.\n./pq ykf.tsv\n\n# Convert to Parquet file, retain the raw METAR field.\nINCLUDE_RAW_METAR=1 ./pq ykf.tsv\n```\n\n## Space savings\n\nThis table compares the uncompressed TSV size vs the Parquet size for my hometown's\ndata.\n\n| Duration | TSV size   | Parquet size (incl METAR / excl METAR) | Size decrease |\n|----------|------------|----------------------------------------|---------------|\n| 1 day    | 15,821     | 9,641 / 7,714                          | 39.1% / 51.2% |\n| 1 month  | 331,242    | 54,080 / 25,067                        | 83.7% / 92.4% |\n| 1 year   | 3,686,065  | 496,247 / 171,390                      | 86.5% / 95.4% |\n| 1 decade | 37,528,193 | 4,768,956 / 1,580,540                  | 87.3% / 95.8% |\n\n## Useful Links\n\n- [CSV of stations](https://mesonet.agron.iastate.edu/sites/networks.php?special=allasos\u0026format=csv\u0026nohtml)\n- [Field descriptions](http://mesonet.agron.iastate.edu/request/download.phtml) (scroll to bottom)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldellow%2Fiem2parquet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcldellow%2Fiem2parquet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldellow%2Fiem2parquet/lists"}