{"id":15058954,"url":"https://github.com/thinkingmachines/geomancer","last_synced_at":"2025-10-05T01:31:37.366Z","repository":{"id":54364356,"uuid":"172477092","full_name":"thinkingmachines/geomancer","owner":"thinkingmachines","description":"Automated feature engineering for geospatial data","archived":true,"fork":false,"pushed_at":"2021-02-23T06:04:45.000Z","size":1232,"stargazers_count":217,"open_issues_count":13,"forks_count":17,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-09-14T03:28:59.756Z","etag":null,"topics":["bigquery","feature-engineering","geospatial","machine-learning","openstreetmap"],"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/thinkingmachines.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.rst","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-25T09:39:01.000Z","updated_at":"2025-08-08T20:31:50.000Z","dependencies_parsed_at":"2022-08-13T13:30:44.439Z","dependency_job_id":null,"html_url":"https://github.com/thinkingmachines/geomancer","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/thinkingmachines/geomancer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkingmachines%2Fgeomancer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkingmachines%2Fgeomancer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkingmachines%2Fgeomancer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkingmachines%2Fgeomancer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinkingmachines","download_url":"https://codeload.github.com/thinkingmachines/geomancer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkingmachines%2Fgeomancer/sbom","scorecard":{"id":881342,"data":{"date":"2025-08-11","repo":{"name":"github.com/thinkingmachines/geomancer","commit":"d1748c4c4f8f77fc4456ce1deef23f8f017c9549"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"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":"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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":4,"reason":"Found 7/17 approved changesets -- score normalized to 4","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":"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":"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":"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":"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":"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.0.0 not signed: https://api.github.com/repos/thinkingmachines/geomancer/releases/16414903","Warn: release artifact v1.0.0 does not have provenance: https://api.github.com/repos/thinkingmachines/geomancer/releases/16414903"],"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 23 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":0,"reason":"42 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-421 / GHSA-h4m5-qpfp-3mpv","Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: GHSA-3ww4-gg4f-jr7f","Warn: Project is vulnerable to: GHSA-5cpq-8wj7-hf2v","Warn: Project is vulnerable to: GHSA-9v9h-cgj8-h64p","Warn: Project is vulnerable to: PYSEC-2023-254 / GHSA-jfhm-5ghh-2f97","Warn: Project is vulnerable to: GHSA-jm77-qphf-c4w8","Warn: Project is vulnerable to: GHSA-v8gr-m533-ghj9","Warn: Project is vulnerable to: GHSA-w7pp-m8wf-vj6r","Warn: Project is vulnerable to: GHSA-x4qr-2fvf-3mr5","Warn: Project is vulnerable to: PYSEC-2022-42991 / GHSA-v3c5-jqr6-7qm8","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: PYSEC-2021-66 / GHSA-g3rq-g295-4j3m","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h","Warn: Project is vulnerable to: PYSEC-2022-14 / GHSA-39ph-wr67-j4xq","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2021-856","Warn: Project is vulnerable to: PYSEC-2022-48 / GHSA-77rm-9x9h-xj3g","Warn: Project is vulnerable to: GHSA-8gq9-2x98-w8hf","Warn: Project is vulnerable to: GHSA-8qvm-5x2c-j2w7","Warn: Project is vulnerable to: PYSEC-2020-92 / GHSA-hj5v-574p-mj7c","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: PYSEC-2023-238 / GHSA-5wvp-7f3h-6wmm","Warn: Project is vulnerable to: PYSEC-2021-140 / GHSA-9w8r-397f-prfh","Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","Warn: Project is vulnerable to: PYSEC-2021-141 / GHSA-pq64-v7f5-gqh8","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: PYSEC-2020-100 / GHSA-xrx6-fmxq-rjj2","Warn: Project is vulnerable to: GHSA-g7vv-2v7x-gj9p","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2021-108 / GHSA-q2q7-5pp4-w6pg","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v"],"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-24T08:19:42.250Z","repository_id":54364356,"created_at":"2025-08-24T08:19:42.250Z","updated_at":"2025-08-24T08:19:42.250Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278399628,"owners_count":25980330,"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-10-04T02:00:05.491Z","response_time":63,"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":["bigquery","feature-engineering","geospatial","machine-learning","openstreetmap"],"created_at":"2024-09-24T22:34:26.039Z","updated_at":"2025-10-05T01:31:36.865Z","avatar_url":"https://github.com/thinkingmachines.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Geomancer Logo](https://storage.googleapis.com/tm-geomancer/assets/header.png)\n---\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.org/project/geomancer/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/geomancer.svg?color=brightgreen\u0026style=flat-square\"\u003e\n    \u003c/img\u003e\u003c/a\u003e\n    \u003ca href=\"https://cloud.drone.io/thinkingmachines/geomancer\"\u003e\n    \u003cimg src=\"https://img.shields.io/drone/build/thinkingmachines/geomancer.svg?logo=drone\u0026style=flat-square\"\u003e\n    \u003c/img\u003e\u003c/a\u003e\n    \u003ca href=\"https://geomancer.readthedocs.io/en/latest/\"\u003e\n    \u003cimg src=\"https://img.shields.io/readthedocs/geomancer.svg?style=flat-square\"\u003e\n    \u003c/img\u003e\u003c/a\u003e\n    \u003ca href=\"https://coveralls.io/github/thinkingmachines/geomancer\"\u003e\n    \u003cimg src=\"https://img.shields.io/coveralls/github/thinkingmachines/geomancer.svg?style=flat-square\"\u003e\n    \u003c/img\u003e\u003c/a\u003e\n    \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square\"\u003e\n    \u003c/img\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nGeomancer is a geospatial feature engineering library. It leverages geospatial\ndata such as [OpenStreetMap (OSM)](https://www.openstreetmap.org/) alongside a\ndata warehouse like BigQuery. You can use this to create, share, and iterate\ngeospatial features for your downstream tasks (analysis, modelling,\nvisualization, etc.). \n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://storage.googleapis.com/tm-geomancer/assets/geomancer-explainer.gif\"\u003e\n\u003c/p\u003e\n\n## Features\n\nGeomancer can perform geospatial feature engineering for all types of vector data\n(i.e. points, lines, polygons).\n\n- Feature primitives for geospatial feature engineering\n- Ability to switch out data warehouses (BigQuery, SQLite, PostgreSQL (*In Progress*))\n- Compile and share your features using our SpellBook \n\n## Setup and Installation\n\n### Installing the library\n\nGeomancer can be installed using `pip`.\n\n```\n$ pip install geomancer\n```\n\nThis will install **all** dependencies for every data-warehouse we support. If\nyou wish to do this only for a specific warehouse, then you can add an\nidentifier:\n\n```\n$ pip install geomancer[bq] # For BigQuery\n$ pip install geomancer[sqlite] # For SQLite\n$ pip install geomancer[psql] # For PostgreSQL\n```\n\nAlternatively, you can also clone the repository then run `install`.\n\n```\n$ git clone https://github.com/thinkingmachines/geomancer.git\n$ cd geomancer\n$ python setup.py install\n```\n\n### Setting up your data warehouse\n\nGeomancer is powered by a geospatial data warehouse: we highly-recommend using\n[BigQuery](https://cloud.google.com/bigquery/) as your data warehouse and\n[Geofabrik's OSM catalog](https://www.geofabrik.de/data/download.html) as your\nsource of Points and Lines of interest. \n\n[![Geomancer architecture](https://storage.googleapis.com/tm-geomancer/assets/architecture.png\n)](https://github.com/thinkingmachines/geomancer)\n\nYou can see the set-up instructions in [this link](https://geomancer.readthedocs.io/en/latest/setup.html#setting-up-your-data-warehouse)\n\n## Basic Usage\n\nAll of the feature engineering functions in Geomancer are called \"spells\". For\nexample, you want to get the distance to the nearest supermarket for each\npoint.\n\n```python\nfrom geomancer.spells import DistanceToNearest\n\n# Load your dataset in a pandas dataframe\n# df = load_dataset()\n\ndist_spell = DistanceToNearest(\n    \"supermarket\",\n    source_table=\"ph_osm.gis_osm_pois_free_1\",\n    feature_name=\"dist_supermarket\",\n    dburl=\"bigquery://project-name\",\n).cast(df)\n```\n\nYou can specify the type of filter  using the format `{column}:{filter}`.  By\ndefault, the `column` value is `fclass`. For example, if you wish to look for\nroads on a bridge, then pass `bridge:T`:\n\n```python\nfrom geomancer.spells import DistanceToNearest\n\n# Load the dataset in a pandas dataframe\n# df = load_dataset()\n\ndist_spell = DistanceToNearest(\n    \"bridge:T\",\n    source_table=\"ph_osm.gis_osm_roads_free_1\",\n    feature_name=\"dist_road_bridges\",\n    dburl=\"bigquery://project-name\",\n).cast(df)\n```\n\nCompose multiple spells into a \"spell book\" which you can export as a JSON file.\n\n```python\nfrom geomancer.spells import DistanceToNearest\nfrom geomancer.spellbook import SpellBook\n\nspellbook = SpellBook([\n    DistanceToNearest(\n        \"supermarket\",\n        source_table=\"ph_osm.gis_osm_pois_free_1\",\n        feature_name=\"dist_supermarket\",\n        dburl=\"bigquery://project-name\",\n    ),\n    DistanceToNearest(\n        \"embassy\",\n        source_table=\"ph_osm.gis_osm_pois_free_1\",\n        feature_name=\"dist_embassy\",\n        dburl=\"bigquery://project-name\",\n    ),\n])\nspellbook.to_json(\"dist_supermarket_and_embassy.json\")\n```\n\nYou can share the generated file so other people can re-use your feature extractions\nwith their own datasets.\n\n```python\nfrom geomancer.spellbook import SpellBook\n\n# Load the dataset in a pandas dataframe\n# df = load_dataset()\n\nspellbook = SpellBook.read_json(\"dist_supermarket_and_embassy.json\")\ndist_supermarket_and_embassy = spellbook.cast(df)\n```\n\n## Contributing\n\nThis project is open for contributors! Contibutions can come in the form of\nfeature requests, bug fixes, documentation, tutorials and the like! We highly\nrecommend to file an Issue first before submitting a [Pull\nRequest](https://help.github.com/en/articles/creating-a-pull-request).\n\nSimply fork this repository and make a Pull Request! We'd definitely appreciate:\n\n- Implementation of new features\n- Bug Reports\n- Documentation\n- Testing\n\nAlso, we have a\n[CONTRIBUTING](https://github.com/thinkingmachines/geomancer/blob/master/CONTRIBUTING.rst)\nand a [CODE_OF_CONDUCT](https://github.com/thinkingmachines/geomancer/blob/master/CODE_OF_CONDUCT.rst),\nso please check that one out!\n\n## License\n\nMIT License © 2019, Thinking Machines Data Science\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkingmachines%2Fgeomancer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkingmachines%2Fgeomancer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkingmachines%2Fgeomancer/lists"}