{"id":16161964,"url":"https://github.com/jessedp/timegeopack","last_synced_at":"2025-08-05T16:07:41.905Z","repository":{"id":101652126,"uuid":"141788851","full_name":"jessedp/timegeopack","owner":"jessedp","description":"Eases playing with geographic and time data","archived":false,"fork":false,"pushed_at":"2018-07-22T04:13:34.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T08:19:38.720Z","etag":null,"topics":["geonames","iana-tzdb","python3","timzone"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/jessedp.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":"2018-07-21T06:53:08.000Z","updated_at":"2022-08-27T02:01:51.000Z","dependencies_parsed_at":"2023-06-07T06:15:21.252Z","dependency_job_id":null,"html_url":"https://github.com/jessedp/timegeopack","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedp%2Ftimegeopack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedp%2Ftimegeopack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedp%2Ftimegeopack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedp%2Ftimegeopack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jessedp","download_url":"https://codeload.github.com/jessedp/timegeopack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247587990,"owners_count":20962837,"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":["geonames","iana-tzdb","python3","timzone"],"created_at":"2024-10-10T02:28:28.672Z","updated_at":"2025-04-07T03:44:42.390Z","avatar_url":"https://github.com/jessedp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/jessedp/timegeopack.svg?branch=master)](https://travis-ci.org/jessedp/timegeopack)\n\n### TimeGeoPack\nSemi-automatically gather public geographic and time-related data together \nto provide a quick start for mashing up various combinations of the data \nor playing with non directly queryable data sets to suit your needs \n(see the sample). \n\nNothing here is intended to assist with date/time calculations because **that**\nwould be **super** redundant.\n\n\nRun the script:\n```angular2html\n# python3 timegeopack.py\n```\nand it will:\n* download the most recent versions of the supported data soures (below) \n* parse/process the data and stick it into a sqlite3 database\n* run a sample script to generate a custom data set\n\nAlternately! Everything mentioned here is available zipped up in the [current release](https://github.com/jessedp/timegeopack/releases/latest) including:\n* the generated sqlite db\n* the sample top cities (by timezone and cat'd together ... plus some summary)\n\n\n#### requirements\n* python 3 (developed using 3.6.5)\n* _suggested_ - a db browser/editor/etc gui [DB Browser for SQLite](http://sqlitebrowser.org/) is pretty handy\n\n\n#### data sources used\n* [GeoNames](http://www.geonames.org/) - a huge amount of geographical data that also\nincludes most of the timezone relate info needed. Currently pulled:\n    * **cities15000.txt** - a subset of the full main data file the only contains cities with populations over 15k\n    * **admin1CodesASCII.txt** - admin divisions - think states, provinces, and the such\n    * **countryInfo.txt** - the full country name plus tons of other country specific data\n    * these are in the _geonames_, _admin1codes_, and _countryinfo_ tables, respectively\n    * timeZones.txt is not include b/c IANA was already there and the DST values are awkward\n    to update (columns contain the year name)\n* [IANA Time Zone Database](https://www.iana.org/time-zones) - parsed out into the _timezones_ table.\n    * most of this is in the GeoNames database\n    * _rules_ still neeed to be included\n* Abbreviations - the _Human_ versions that everyone knows and references (EST, PDT, Central European Time, Mountain Time, etc.).\n    * currently from [TimeTemperature.com](https://www.timetemperature.com/abbreviations/world_time_zone_abbreviations.shtml)\n    \n    \n#### Why? Or, examples, please?\n1. Say using Abbreviations (let someone pick 'Eastern Standard Time') \nso you can store 'America/New_York' in your application.  \n2. Take that a step further and allow someone to also search for a city to do the same.\n    * Yes, that's a fairly direct lookup but will require an ajax/whatever call \n    (even the 15k geonames data is \u003e6mb, you're not doing that server side)\n3. Be creative even if the majority of it is combining the geonames data you may not \n    have know about together\n    \n#### A sample - _topcities.py_\nConsider **#2** above and let's do that client-side. There's a [javascript here](https://github.com/thejohnhoffer/ttzc) that does what we need\nand, as linked there, a working version of it can be fouond at [The Time Zone Converter](http://www.thetimezoneconverter.com/).\n\nGreat, use that. But, where does that data come from??? Check out the source - \nthere are some crazy datasets involved. I have no idea where they got it \nfrom, but the data here (actually just the geonames) will get it for you. \nAnd, say you started using that and wanted to keep it updated, easily tweak\nwhat can be searched, or maybe limit the data avaiable to a certain country,\ncontinent, etc.\n\nSo - the included **topcities.py** gets you pretty close to a programatically \ncurated base to generate the dataset off of. It basically:\n* Ensures the Capital is always included. This is weird b/c it's the capital for the nation, \nbut only if it's in the time zone you're looking at.\n    * Example: Washington DC shows as a Capital in America/New_York - \n    America/Chicago, America/Denver, etc. show no _main_ capital\n* Picks up to 30 of the largest cities per zone.            \n    \n    \n\n\n##### Thanks:\n* makes used of a slightly modified version of [tz2js](https://github.com/nzlosh/tz2js) by nzlosh\n* and, you know, all the data sources menetioned","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessedp%2Ftimegeopack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjessedp%2Ftimegeopack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessedp%2Ftimegeopack/lists"}