{"id":14702241,"url":"https://github.com/ajl2718/whereabouts","last_synced_at":"2025-08-26T20:51:34.967Z","repository":{"id":189437904,"uuid":"675180969","full_name":"ajl2718/whereabouts","owner":"ajl2718","description":"Fast, accurate, open-source geocoding in Python","archived":false,"fork":false,"pushed_at":"2025-08-17T03:53:19.000Z","size":8007,"stargazers_count":58,"open_issues_count":5,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-17T05:30:28.118Z","etag":null,"topics":["data-science","duckdb","geocoding","geospatial","record-linkage"],"latest_commit_sha":null,"homepage":"https://whereabouts.readthedocs.io/en/latest/","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/ajl2718.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2023-08-06T04:01:10.000Z","updated_at":"2025-08-17T03:53:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"98e693d3-786f-4b3e-96e2-8ffdbc2300a9","html_url":"https://github.com/ajl2718/whereabouts","commit_stats":{"total_commits":102,"total_committers":1,"mean_commits":102.0,"dds":0.0,"last_synced_commit":"4bd8a5a127dfbe10c3d8ee828c655ba956b3e3c4"},"previous_names":["ajl2718/whereabouts"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ajl2718/whereabouts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajl2718%2Fwhereabouts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajl2718%2Fwhereabouts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajl2718%2Fwhereabouts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajl2718%2Fwhereabouts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajl2718","download_url":"https://codeload.github.com/ajl2718/whereabouts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajl2718%2Fwhereabouts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272254473,"owners_count":24901049,"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-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["data-science","duckdb","geocoding","geospatial","record-linkage"],"created_at":"2024-09-13T12:01:22.284Z","updated_at":"2025-08-26T20:51:34.955Z","avatar_url":"https://github.com/ajl2718.png","language":"Python","funding_links":[],"categories":["Tools Powered by DuckDB"],"sub_categories":[],"readme":"[![Documentation Status](https://readthedocs.org/projects/whereabouts/badge/?version=latest)](http://whereabouts.readthedocs.io/en/latest/?badge=latest)\n[![Downloads](https://pepy.tech/badge/whereabouts)](https://pepy.tech/project/whereabouts)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/ajl2718/whereabouts/issues)\n\n# Whereabouts\nA light-weight, fast geocoder for Python using DuckDB. Try it out online at [Huggingface](https://huggingface.co/spaces/saunteringcat/whereabouts-geocoding)\n\n## Description\nWhereabouts is an open-source geocoding library for Python, allowing you to geocode and standardize address data all within your own environment:\n\nFeatures:\n- Two line installation\n- No additional database setup required. Uses DuckDB to run all queries\n- No need to send data to an external geocoding API\n- Fast (Geocode 1000s / sec depending on your setup)\n- Robust to typographical errors\n\n## Performance\nWhereabouts performs well compared with other geocoders. The charts below show the accuracy when calculated at apartment / unit, house, street and suburb level, comparing Whereabouts with Google, Mapbox and Nominatim on sets of residential and retail addresses.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"geocoder_comparison_residential_050924.png\" alt=\"Geocoding accuracy on a set residential awddresses\" width=\"45%\"/\u003e\n  \u003cimg src=\"geocoder_comparison_retail_050924.png\" alt=\"Geocoding accuracy on a set of business addresses\" width=\"45%\"/\u003e\n\u003c/p\u003e\n\nCode to produce these results is found in the [whereabouts_testing repo](https://github.com/ajl2718/whereabouts_testing)\n\n## Requirements\n- Python 3.12+\n\n## Installation: via uv / pip / conda\n\nwhereabouts can be installed either from this repo or using pip / uv / conda.\n\n```\nuv add whereabouts\n```\n\n## Installation from this repo\nFirstly, clone the repo\n\n```\ngit clone https://github.com/ajl2718/whereabouts.git\n```\n\nThen create a uv project via:\n\n```\nuv venv\n```\n\nThis will install all the required dependences that are listed in the `pyproject.toml` file.\n\n## Download a geocoder database or create your own\n\nYou will need a geocoding database to match addresses against. You can either download a pre-built database or create your own using a dataset of high quality reference addresses for a given country, state or other geographic region.\n\n### Option 1: Download a pre-built geocoder database\n\nPre-built geocoding database are available from [Huggingface](https://www.huggingface.co). The list of available databases can be found [here](https://huggingface.co/saunteringcat/whereabouts-db/tree/main)\n\nAs an example, to install the small size geocoder database for California:\n\n```\npython -m whereabouts download us_ca_sm\n```\n\nor for the small size geocoder database for all of Australia:\n\n```\npython -m whereabouts download au_all_sm\n```\n\n### Option 2: Create a geocoder database\n\nRather than using a pre-built database, you can create your own geocoder database if you have your own address file. This file should be a single csv or parquet file with the following columns:\n\n| Column name | Description | Data type |\n| ----------- | ----------- | --------- |\n| ADDRESS_DETAIL_PID | Unique identifier for address | int |\n| ADDRESS_LABEL | The full address | str |\n| ADDRESS_SITE_NAME | Name of the site. This is usually null | str |\n| LOCALITY_NAME | Name of the suburb or locality | str |\n| POSTCODE | Postcode of address | int |\n| STATE | The state, region or territory for the address | str |\n| LATITUDE | Latitude of geocoded address | float |\n| LONGITUDE | Longitude of geocoded address | float |\n\nThese fields should be specified in a `setup.yml` file. Once the `setup.yml` is created and a reference dataset is available, the geocoding database can be created:\n\n```\npython -m whereabouts setup_geocoder setup.yml\n```\n\nAn example `setup.yml` file is provided with this repo. Note that the state names listed are specific to Australia and should be changed according to the country's data you are working with.\n\n## Geocoding examples\n\nGeocode a list of addresses \n```\nfrom whereabouts.Matcher import Matcher\n\nmatcher = Matcher(db_name='au_all_sm')\nmatcher.geocode(addresslist, how='standard')\n```\n\nFor more accurate geocoding you can use trigram phrases rather than token phrases. Note you will need one of the large databases to use trigram geocoding.\n```\nmatcher.geocode(addresslist, how='trigram')\n```\n\n## How it works\nThe algorithm employs simple record linkage techniques, making it suitable for implementation in around 10 lines of SQL. It is based on the following papers\n- https://arxiv.org/abs/1708.01402\n- https://arxiv.org/abs/1712.09691\n\n## Documentation\nWork in progress: https://whereabouts.readthedocs.io/en/latest/\n\n## License Disclaimer for Third-Party Data\nNote that while the code from this package is licensed under the MIT license, the pre-built databases use data from data providers that may have restrictions for particular use cases:\n\n- The Australian databases are built from the [Geocoded National Address File](https://https://data.gov.au/data/dataset/geocoded-national-address-file-g-naf) with conditions of use based on the [End User License Agreemment](https://data.gov.au/dataset/ds-dga-e1a365fc-52f5-4798-8f0c-ed1d33d43b6d/distribution/dist-dga-0102be65-3781-42d9-9458-fdaf7170efed/details?q=previous%20gnaf)\n- The US databases are still work-in-progress but are based on data from [OpenAddresses](https://openaddresses.io/) and so any work with whereabouts based on US address data should adhere to the [OpenAddresses license](https://github.com/openaddresses/openaddresses/blob/master/LICENSE).\n\nUsers of this software must comply with the terms and conditions of the respective data licenses, which may impose additional restrictions or requirements. By using this software, you agree to comply with the relevant licenses for any third-party data.\n\n## Citing\nTo cite this repo, please use the following\n\n```bibtext\n@software{whereabouts_2024,\n  author = {Alex Lee},\n  doi = {[10.5281/zenodo.1234](https://doi.org/10.5281/zenodo.13627073)},\n  month = {10},\n  title = {{Whereabouts}},\n  url = {https://github.com/ajl2718/whereabouts},\n  version = {0.3.14},\n  year = {2024}\n}","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajl2718%2Fwhereabouts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajl2718%2Fwhereabouts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajl2718%2Fwhereabouts/lists"}