{"id":28546329,"url":"https://github.com/astrowonk/ncei_county_series_convert","last_synced_at":"2025-10-29T16:40:26.717Z","repository":{"id":247780431,"uuid":"826830830","full_name":"astrowonk/ncei_county_series_convert","owner":"astrowonk","description":"Convert bulk county times series NCEI data to CSV","archived":false,"fork":false,"pushed_at":"2024-07-13T00:31:27.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-07T06:43:06.901Z","etag":null,"topics":["climate","county","ncei","noaa","temperature","time-series"],"latest_commit_sha":null,"homepage":"","language":"Python","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/astrowonk.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":"2024-07-10T13:13:08.000Z","updated_at":"2024-07-13T00:31:30.000Z","dependencies_parsed_at":"2024-07-10T15:52:31.071Z","dependency_job_id":null,"html_url":"https://github.com/astrowonk/ncei_county_series_convert","commit_stats":null,"previous_names":["astrowonk/ncei_county_series_convert"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/astrowonk/ncei_county_series_convert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrowonk%2Fncei_county_series_convert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrowonk%2Fncei_county_series_convert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrowonk%2Fncei_county_series_convert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrowonk%2Fncei_county_series_convert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astrowonk","download_url":"https://codeload.github.com/astrowonk/ncei_county_series_convert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrowonk%2Fncei_county_series_convert/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266580298,"owners_count":23951193,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["climate","county","ncei","noaa","temperature","time-series"],"created_at":"2025-06-09T23:38:55.606Z","updated_at":"2025-10-29T16:40:21.672Z","avatar_url":"https://github.com/astrowonk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Convert NOAA County Time Series Climate Data to CSV\n\nThis code works on the [bulk NCEI climate division files](https://www.ncei.noaa.gov/pub/data/cirs/climdiv/) at the NCEI for **counties**. For an interactive way to view this data, try the [County Time Series page](https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/county/time-series).\n\nThis is not a particularly hard script to write, but it was somewhat tedious so hopefully this saves someone some time. I needed historical average temperatures for US counties, and I found the data but had to write this to get it into a useful dataframe.\n\nIt should convert files in that link that have the filenames:\n\n```\nclimdiv-pcpncy-vx.y.z-YYYYMMDD\nclimdiv-tmaxcy-vx.y.z-YYYYMMDD\nclimdiv-tmincy-vx.y.z-YYYYMMDD\nclimdiv-tmpccy-vx.y.z-YYYYMMDD\nclimdiv-cddccy-vx.y.z-YYYYMMDD\nclimdiv-hddccy-vx.y.z-YYYYMMDD\n```\n\nIn addition to converting from a fixed width formation to CSV, the script creates a 5 digit FIPS that combines state FIPS and county FIPS. This is available as an integer (4 or 5 digits) as FIPS_int (5001) as as five character string with leading zeros (\"05001\") in FIPS_str. The combined state+county FIPS code should make it easier to merge into other data sources that have a five digit FIPS.\n\nThe element (and other columns) are described in the [county readme](https://www.ncei.noaa.gov/pub/data/cirs/climdiv/county-readme.txt), but is generally the same for every row for the same filename (`tmpccy` files wil be all be a \"2\" element code, for example.)\n\n```\n01 = Precipitation\n02 = Average Temperature\n25 = Heating Degree Days\n26 = Cooling Degree Days\n27 = Maximum Temperature\n28 = Minimum Temperature\n```\n\nThe script requires [pandas](https://pandas.pydata.org). If you want to export to parquet, you'll need something like pyarrow or a parquet backend for pandas.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrowonk%2Fncei_county_series_convert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrowonk%2Fncei_county_series_convert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrowonk%2Fncei_county_series_convert/lists"}