{"id":16691744,"url":"https://github.com/michael-spengler/cities","last_synced_at":"2025-04-10T01:06:18.217Z","repository":{"id":62421592,"uuid":"275665144","full_name":"michael-spengler/cities","owner":"michael-spengler","description":"🦕    module provides information about cities on earth + mars ","archived":false,"fork":false,"pushed_at":"2023-12-28T17:02:07.000Z","size":550,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T14:02:15.032Z","etag":null,"topics":["geography","population"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/michael-spengler.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}},"created_at":"2020-06-28T20:44:27.000Z","updated_at":"2024-04-19T07:38:50.000Z","dependencies_parsed_at":"2024-01-04T19:05:47.367Z","dependency_job_id":"d82bb8e1-2229-43cf-ab2a-8f70fae3e02d","html_url":"https://github.com/michael-spengler/cities","commit_stats":{"total_commits":24,"total_committers":2,"mean_commits":12.0,"dds":0.04166666666666663,"last_synced_commit":"dd355174cff6093bb23fe05d54c670415a722bd9"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-spengler%2Fcities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-spengler%2Fcities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-spengler%2Fcities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-spengler%2Fcities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michael-spengler","download_url":"https://codeload.github.com/michael-spengler/cities/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947805,"owners_count":21023067,"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":["geography","population"],"created_at":"2024-10-12T16:09:43.946Z","updated_at":"2025-04-10T01:06:18.193Z","avatar_url":"https://github.com/michael-spengler.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cities Module\n\nProvides data about cities with a population of about 40000+ inhabitants.\nIncluding smaller Cities soon. Performance Trade Of? Feedback = welcome\n\n## Usage example for your code\n\n```\nimport { CityService } from \"https://deno.land/x/cities/cityservice.ts\"\n\nconst cityName = 'Heidelberg'\nconst countryCode = 'DE'\n\nconst cityInfo = CityService.getCityInfo(countryCode, cityName)\n\nconsole.log(`\\nI found the following info for ${cityName} in ${countryCode}: \\n${JSON.stringify(cityInfo)}\\n`)\n\nconst minInhabitants = 50000\nconst maxInhabitants = 200000\nconst specificCitiesInCountry = CityService.getCitiesByCountryCode(countryCode, minInhabitants, maxInhabitants)\nconsole.log(`\\nI found ${specificCitiesInCountry.length} cities with the Country Code ${countryCode} matching your criteria\\n`)\n\nconst specificCities = CityService.getCitiesByPopulation(minInhabitants, maxInhabitants)\nconsole.log(`\\nI found ${specificCities.length} cities matching your criteria\\n`)\n\nconst placeOnEarth = {\n    latitude: 49.488462,\n    longitude: 8.5412433\n}\n\nconst closestCity = CityService.getClosestCity(placeOnEarth.latitude, placeOnEarth.longitude, minInhabitants)\n\nconsole.log(`\\nThe closest city to this place with at least ${minInhabitants} inhabitants is: \\n${JSON.stringify(closestCity)}\\n`)\n```\n\n## Test it via command line\n```\ndeno run https://deno.land/x/cities/test-it.ts\n```\n\n## Donations\nThanks to [Freedom Cash](https://FreedomCash.org), we are already free.  \nIf you want to donate, you might consider donating to the [otherparty.co.uk](https://www.otherparty.co.uk/donate-crypto-the-other-party) to ensure people do not need to donate to victims but rather donate successfully to problem solvers.   \n  \n![direct-democracy](https://github.com/michael-spengler/sleep/assets/145258627/fe97b7da-62b4-4cf6-9be0-7b03b2f3095a)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichael-spengler%2Fcities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichael-spengler%2Fcities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichael-spengler%2Fcities/lists"}