{"id":40346731,"url":"https://github.com/t-sagara/jageocoder","last_synced_at":"2026-04-02T18:50:25.213Z","repository":{"id":37036603,"uuid":"340603337","full_name":"t-sagara/jageocoder","owner":"t-sagara","description":"Japanese address geocoder that works both offline and online.","archived":false,"fork":false,"pushed_at":"2026-03-30T03:48:36.000Z","size":9402,"stargazers_count":95,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-30T05:57:19.969Z","etag":null,"topics":["address","geocoding","python"],"latest_commit_sha":null,"homepage":"https://t-sagara.github.io/jageocoder/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/t-sagara.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-02-20T08:31:55.000Z","updated_at":"2026-03-30T03:34:35.000Z","dependencies_parsed_at":"2024-03-29T08:32:26.852Z","dependency_job_id":"fcd339a4-2522-441f-8e69-63a3923ba424","html_url":"https://github.com/t-sagara/jageocoder","commit_stats":{"total_commits":110,"total_committers":2,"mean_commits":55.0,"dds":0.009090909090909038,"last_synced_commit":"44e3622cb58ee43e5efc0d45325fe2ca4b1a3d34"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/t-sagara/jageocoder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-sagara%2Fjageocoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-sagara%2Fjageocoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-sagara%2Fjageocoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-sagara%2Fjageocoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t-sagara","download_url":"https://codeload.github.com/t-sagara/jageocoder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-sagara%2Fjageocoder/sbom","scorecard":{"id":864583,"data":{"date":"2025-08-11","repo":{"name":"github.com/t-sagara/jageocoder","commit":"3062a45668a3cad9e6a3a8b9fbf294352bf8e4e9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"20 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":4,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Warn: no linked content found","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Code-Review","score":0,"reason":"Found 0/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'","Warn: branch protection not enabled for branch 'v1'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-43qf-4rqw-9q2g","Warn: Project is vulnerable to: GHSA-7rxf-gvfg-47g4","Warn: Project is vulnerable to: GHSA-84pr-m4jr-85g5","Warn: Project is vulnerable to: GHSA-8vgw-p6qm-5gr7","Warn: Project is vulnerable to: PYSEC-2024-71 / GHSA-hxwh-jpp2-84pm","Warn: Project is vulnerable to: PYSEC-2020-43 / GHSA-xc3p-ff3m-f46v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T02:19:57.434Z","repository_id":37036603,"created_at":"2025-08-24T02:19:57.434Z","updated_at":"2025-08-24T02:19:57.434Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31313434,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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"}},"keywords":["address","geocoding","python"],"created_at":"2026-01-20T09:30:28.944Z","updated_at":"2026-04-02T18:50:25.182Z","avatar_url":"https://github.com/t-sagara.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jageocoder - A Python Japanese geocoder\n\n日本語版は README_ja.md をお読みください。\n\nThis is a Python port of the Japanese-address geocoder `DAMS` used in CSIS at the University of Tokyo's [\"Address Matching Service\"](https://newspat.csis.u-tokyo.ac.jp/geocode/modules/addmatch/index.php?content_id=1) and [GSI Maps](https://maps.gsi.go.jp/).\n\n# Getting Started\n\nThis package provides address-geocoding and reverse-geocoding functionality for Python programs. The basic usage is to specify a dictionary with `init()` then call `search()` to get geocoding results.\n\n```python\n\u003e\u003e\u003e import jageocoder\n\u003e\u003e\u003e jageocoder.init(url='https://jageocoder.info-proto.com/jsonrpc')\n\u003e\u003e\u003e jageocoder.search('新宿区西新宿2-8-1')\n{'matched': '新宿区西新宿2-8-', 'candidates': [{'id': 5961406, 'name': '8番', 'x': 139.691778, 'y': 35.689627, 'level': 7, 'note': None, 'fullname': ['東京都', '新宿区', '西新宿', '二丁目', '8番']}]}\n```\n\n# How to install\n\n## Prerequisites\n\nRequires Python 3.9.2 or later.\n\nAll other required packages will be installed automatically.\n\n## Install instructions\n\n- Install the package with `pip install jageocoder`\n\nTo use Jageocoder, you need to install the \"Dictionary Database\" on the same machine or connect to the RPC service provided by [jageocoder-server](https://t-sagara.github.io/jageocoder/server/) .\n\n### Install Dictionary Database\n\nWhen a dictionary database is installed, large amounts of data can be processed at high speed. A database covering addresses in Japan requires 20 GB or more of storage.\n\n- Download an address database file compatible with that version from [here](https://www.info-proto.com/static/jageocoder/latest/v2/)\n\n      jageocoder download-dictionary https://www.info-proto.com/static/jageocoder/20250423/v2/jukyo_all_20250423_v22.zip \n\n- Install the dictionary with `install-dictionary` command\n\n      jageocoder install-dictionary jukyo_all_20250423_v22.zip\n\nIf you need to know the location of the dictionary directory, perform `get-db-dir` command as follows. (Or call `jageocoder.get_db_dir()` in your script)\n\n```bash\njageocoder get-db-dir\n```\n\nIf you prefer to create the database in another location, set the environment variable `JAGEOCODER_DB2_DIR` before executing `install_dictionary` to specify the directory.\n\n```bash\nexport JAGEOCODER_DB2_DIR='/usr/local/share/jageocoder/db2'\ninstall-dictionary \u003cdb-file\u003e\n```\n\n### Connect to the Jageocoder server\n\nSince dictionary databases are large in size, installing them on multiple machines consumes storage and requires time and effort to update them. Instead of installing a dictionary database on each machine, you can connect to a Jageocoder server to perform the search process.\n\nIf you want to use a server, specify the server endpoint in the environment variable `JAGEOCODER_SERVER_URL`. For a public demonstration server, use the following\n\n```bash\nexport JAGEOCODER_SERVER_URL=https://jageocoder.info-proto.com/jsonrpc\n```\n\nHowever, the server for public demos cannot handle heavy traffic, so we have set a limit on the number of requests per second. If you want to process a large number of requests, please refer to [here](https://t-sagara.github.io/jageocoder/server/) to set up your own Jageocoder server. The endpoint is '/jsonrpc' on the server.\n\n## Uninstall instructions\n\nRemove the directory containing the database, or perform `uninstall-dictionary` command as follows.\n\n```bash\njageocoder uninstall-dictionary\n```\n\nThen, uninstall the package with `pip` command.\n\n```bash\npip uninstall jageocoder\n```\n\n# How to use\n\n## Use from the command line\n\nJageocoder is intended to be embedded in applications as a library and used by calling the API, but a simple command line interface is also provided.\n\nFor example, to geocode an address, execute the following command.\n\n```bash\njageocoder search 新宿区西新宿２－８－１\n```\n\nYou can check the list of available commands with `--help`.\n\n```bash\njageocoder --help\n```\n\n## Using API\n\nFirst, import jageocoder and initialize it with `init()`.\n\n```python\n\u003e\u003e\u003e import jageocoder\n\u003e\u003e\u003e jageocoder.init()\n```\n\nThe parameter `db_dir` of `init()` can be used to specify the directory where the address database is installed. Alternatively, you can specify the endpoint URL of the Jageocoder server with `url`. If it is omitted, the value of the environment variable is used.\n\n### Search for latitude and longitude by address\n\nUse `search()` to search for the address you want to check the longitude and latitude of.\n\nThe `search()` function returns a dict with `matched` as\nthe matched string and `candidates` as the list of search results.\n(The results are formatted for better viewing)\n\nEach element of `candidates` contains the information of an address node (AddressNode).\n\n```python\n\u003e\u003e\u003e jageocoder.search('新宿区西新宿２－８－１')\n{\n  'matched': '新宿区西新宿２－８－',\n  'candidates': [{\n    'id': 12299846, 'name': '8番',\n    'x': 139.691778, 'y': 35.689627, 'level': 7, 'note': None,\n    'fullname': ['東京都', '新宿区', '西新宿', '二丁目', '8番']\n  }]\n}\n```\n\nThe meaning of the items is as follows\n\n- id: ID in the database\n- name: Address notation\n- x: longitude\n- y: latitude\n- level: Address level (1:Prefecture, 2:County, 3:City and 23 district,\n    4:Ward, 5:Oaza, 6:Aza and Chome, 7:Block, 8:Building)\n- note: Notes such as city codes\n- fullname: List of address notations from the prefecture level to this node\n\n### Search for addresses by longitude and latitude\n\nYou can specify the latitude and longitude of a point and look up the address of that point (so-called reverse geocoding).\n\nWhen you pass the longitude and latitude of the point you wish to look up to `reverse()`, you can retrieve up to three address nodes surrounding the specified point.\n\n```python\n\u003e\u003e\u003e import jageocoder\n\u003e\u003e\u003e jageocoder.init()\n\u003e\u003e\u003e triangle = jageocoder.reverse(139.6917, 35.6896, level=7)\n\u003e\u003e\u003e if len(triangle) \u003e 0:\n...     print(triangle[0]['candidate']['fullname'])\n...\n['東京都', '新宿区', '西新宿', '二丁目', '8番']\n```\n\nIn the example above, the ``level`` optional parameter is set to 7 to search down to the block (街区・地番) level.\n\n\u003e [!NOTE]\n\u003e\n\u003e Indexes for reverse geocoding are automatically created the first time you perform reverse geocoding. Note that this process can take a long time.\n\n### Explore the attribute information of an address\n\nUse `searchNode()` to retrieve information about an address.\n\nThis function returns a list of type `jageocoder.result.Result` .\nYou can access the address node from node element of the Result object.\n\n```python\n\u003e\u003e\u003e results = jageocoder.searchNode('新宿区西新宿２－８－１')\n\u003e\u003e\u003e len(results)\n1\n\u003e\u003e\u003e results[0].matched\n'新宿区西新宿２－８－'\n\u003e\u003e\u003e type(results[0].node)\n\u003cclass 'jageocoder.node.AddressNode'\u003e\n\u003e\u003e\u003e node = results[0].node\n\u003e\u003e\u003e node.get_fullname()\n['東京都', '新宿区', '西新宿', '二丁目', '8番']\n```\n\n#### Get GeoJSON representation\n\nYou can use the `as_geojson()` method of the Result and AddressNode\nobjects to obtain the GeoJSON representation.\n\n```python\n\u003e\u003e\u003e results[0].as_geojson()\n{'type': 'Feature', 'geometry': {'type': 'Point', 'coordinates': [139.6917724609375, 35.68962860107422]}, 'properties': {'id': 80223284, 'name': '8番', 'level': 7, 'priority': 3, 'note': '', 'parent_id': 80223179, 'sibling_id': 80223285, 'fullname': ['東京都', '新宿区', '西新宿', '二丁目', '8番'], 'matched': '新宿区西 新宿２－８－'}}\n\u003e\u003e\u003e results[0].node.as_geojson()\n{'type': 'Feature', 'geometry': {'type': 'Point', 'coordinates': [139.6917724609375, 35.68962860107422]}, 'properties': {'id': 80223284, 'name': '8番', 'level': 7, 'priority': 3, 'note': '', 'parent_id': 80223179, 'sibling_id': 80223285, 'fullname': ['東京都', '新宿区', '西新宿', '二丁目', '8番']}}\n```\n\n#### Get the local government codes\n\nThere are two types of local government codes: JISX0402 (5-digit) and Local Government Code (6-digit).\n\nYou can also obtain the prefecture code JISX0401 (2 digits).\n\n```python\n\u003e\u003e\u003e node.get_city_jiscode()  # 5-digit code\n'13104'\n\u003e\u003e\u003e node.get_city_local_authority_code() # 6-digit code\n'131041'\n\u003e\u003e\u003e node.get_pref_jiscode()  # prefecture code\n'13'\n```\n\n#### Get link URLs to maps\n\nGenerate URLs to link to GSI and Google maps.\n\n```python\n\u003e\u003e\u003e node.get_gsimap_link()\n'https://maps.gsi.go.jp/#16/35.689627/139.691778/'\n\u003e\u003e\u003e node.get_googlemap_link()\n'https://maps.google.com/maps?q=35.689627,139.691778\u0026z=16'\n```\n\n#### Traverse the parent node\n\nA \"parent node\" is a node that represents a level above the address.\nGet the node by attribute `parent`.\n\nNow the `node` points to '8番', so the parent node will be '二丁目'.\n\n```python\n\u003e\u003e\u003e parent = node.parent\n\u003e\u003e\u003e parent.get_fullname()\n['東京都', '新宿区', '西新宿', '二丁目']\n\u003e\u003e\u003e parent.x, parent.y\n(139.691774, 35.68945)\n```\n\n#### Traverse the child nodes\n\nA \"child node\" is a node that represents a level below the address. Get the node by attribute `children`.\n\nThere is always only one parent node, but there can be multiple child nodes. Therefore, `children` returns a list of address nodes.\n\nNow the `parent` points to '二丁目', so the child node will be the block number (○番, △番地) contained therein.\n\n```python\n\u003e\u003e\u003e type(parent.children)\n\u003cclass 'list'\u003e\n\u003e\u003e\u003e len(parent.children)\n50\n\u003e\u003e\u003e [child.name for child in parent.children]\n['1番', '1番地', '10番', '10番地', '11番', '11番地', '12番地', '134番地', '135番地', '136番地', '139番地', '140番地', '141番地', '145番地', '158番地', '174番地', '178番地', '181番地', '2番', '2番地', '3番', '3番地', '308番地', '309番地', '310番地', '311番地', '313番地', '314番地', '315番地', '318番地', '4番', '4番地', '5番', '5番地', '6番', '6番地', '673番地', '674番地', '7番', '7番地', '705番地', '708番地', '710番地', '733番地', '734番地', '735番地', '8番', '8番地', '9番', '9番地']\n```\n\n# For developers\n\n## Documentation\n\nTutorials and references are [here](https://jageocoder.readthedocs.io/ja/latest/).\n\n## Create your own dictionary\n\nConsider using [jageocoder-converter](https://github.com/t-sagara/jageocoder-converter).\n\n## Tests\n\nRun `pytest` for unit tests, `pytest jageocoder/ --doctest-modules` for testing sample codes in comments and `pytest docs/source/ --doctest-glob=*.rst` for testing codes in the online manual document.\n\n## Contributing\n\nAddress notation varies. So suggestions for logic improvements are welcome.\nPlease submit an issue with examples of address notations in use and how they should be parsed.\n\n## Authors\n\n* **Takeshi SAGARA** - [Info-proto Co.,Ltd.](https://www.info-proto.com/)\n\n## License\n\nThis project is licensed under [the MIT License](https://opensource.org/licenses/mit-license.php).\n\nThis is not the scope of the dictionary data license. Please follow the license of the respective dictionary data.\n\n## Acknowledgements\n\nWe would like to thank CSIS for allowing us to provide address matching services on their institutional website for over 20 years.\n\nWe would also like to thank Professor Asanobu Kitamoto of NII for providing us with a large sample of areas using the older address system and for his many help in confirming the results of our analysis.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-sagara%2Fjageocoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft-sagara%2Fjageocoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-sagara%2Fjageocoder/lists"}