All Projects → thinkingmachines → Geomancer

thinkingmachines / Geomancer

Licence: mit
Automated feature engineering for geospatial data

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Geomancer

carto-spatial-extension
A set of UDFs and Procedures to extend BigQuery, Snowflake, Redshift and Postgres with Spatial Analytics capabilities
Stars: ✭ 131 (-32.47%)
Mutual labels:  bigquery, geospatial
Graphhopper
Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.
Stars: ✭ 3,457 (+1681.96%)
Mutual labels:  geospatial, openstreetmap
LightOSM.jl
A Julia package for downloading and analysing geospatial data from OpenStreetMap APIs.
Stars: ✭ 32 (-83.51%)
Mutual labels:  openstreetmap, geospatial
Blendergis
Blender addons to make the bridge between Blender and geographic data
Stars: ✭ 4,642 (+2292.78%)
Mutual labels:  geospatial, openstreetmap
Urbansprawl
Open framework for calculating spatial urban sprawl indices and performing disaggregated population estimates using open data
Stars: ✭ 48 (-75.26%)
Mutual labels:  geospatial, openstreetmap
Openrailwaymap
An OpenStreetMap-based project for creating a map of the world's railway infrastructure.
Stars: ✭ 150 (-22.68%)
Mutual labels:  geospatial, openstreetmap
Osmnx
OSMnx: Python for street networks. Retrieve, model, analyze, and visualize street networks and other spatial data from OpenStreetMap.
Stars: ✭ 3,357 (+1630.41%)
Mutual labels:  geospatial, openstreetmap
Mapsui
Mapsui is a .NET Map component for WPF, Xamarin.Forms, Xamarin.Android, Xamarin.iOS and UWP
Stars: ✭ 447 (+130.41%)
Mutual labels:  geospatial, openstreetmap
Map Matching
The map matching functionality is now located in the main repository https://github.com/graphhopper/graphhopper#map-matching
Stars: ✭ 665 (+242.78%)
Mutual labels:  geospatial, openstreetmap
Kepler
The open source full-stack geosocial network platform
Stars: ✭ 125 (-35.57%)
Mutual labels:  geospatial, openstreetmap
Atlas
OSM in memory
Stars: ✭ 172 (-11.34%)
Mutual labels:  geospatial, openstreetmap
Openrouteservice App
🚙 The open source route planner app with plenty of features.
Stars: ✭ 187 (-3.61%)
Mutual labels:  openstreetmap
Autofeat
Linear Prediction Model with Automated Feature Engineering and Selection Capabilities
Stars: ✭ 178 (-8.25%)
Mutual labels:  feature-engineering
Displaz
A hackable lidar viewer
Stars: ✭ 177 (-8.76%)
Mutual labels:  geospatial
Cheap Ruler Go
📏 cheapruler in Go: fast geodesic measurements
Stars: ✭ 176 (-9.28%)
Mutual labels:  geospatial
Awesome Gis
😎Awesome GIS is a collection of geospatial related sources, including cartographic tools, geoanalysis tools, developer tools, data, conference & communities, news, massive open online course, some amazing map sites, and more.
Stars: ✭ 2,582 (+1230.93%)
Mutual labels:  geospatial
Hanzi char featurizer
汉字字符特征提取器 (featurizer),提取汉字的特征(发音特征、字形特征)用做深度学习的特征 | A Chinese character feature extractor, which extracts the features of Chinese characters (pronunciation features, glyph features) as features for deep learning
Stars: ✭ 187 (-3.61%)
Mutual labels:  feature-engineering
Docker Osm
A docker compose project to setup an OSM PostGIS database with automatic updates from OSM periodically
Stars: ✭ 172 (-11.34%)
Mutual labels:  openstreetmap
Osmdeepod
OSMDeepOD - OpenStreetMap (OSM) and Machine Learning (Deep Learning) based Object Detection from Aerial Imagery (Formerly also known as "OSM-Crosswalk-Detection").
Stars: ✭ 174 (-10.31%)
Mutual labels:  openstreetmap
Bitcoin Etl
ETL scripts for Bitcoin, Litecoin, Dash, Zcash, Doge, Bitcoin Cash. Available in Google BigQuery https://goo.gl/oY5BCQ
Stars: ✭ 174 (-10.31%)
Mutual labels:  bigquery

Geomancer Logo

Geomancer is a geospatial feature engineering library. It leverages geospatial data such as OpenStreetMap (OSM) alongside a data warehouse like BigQuery. You can use this to create, share, and iterate geospatial features for your downstream tasks (analysis, modelling, visualization, etc.).

Features

Geomancer can perform geospatial feature engineering for all types of vector data (i.e. points, lines, polygons).

  • Feature primitives for geospatial feature engineering
  • Ability to switch out data warehouses (BigQuery, SQLite, PostgreSQL (In Progress))
  • Compile and share your features using our SpellBook

Setup and Installation

Installing the library

Geomancer can be installed using pip.

$ pip install geomancer

This will install all dependencies for every data-warehouse we support. If you wish to do this only for a specific warehouse, then you can add an identifier:

$ pip install geomancer[bq] # For BigQuery
$ pip install geomancer[sqlite] # For SQLite
$ pip install geomancer[psql] # For PostgreSQL

Alternatively, you can also clone the repository then run install.

$ git clone https://github.com/thinkingmachines/geomancer.git
$ cd geomancer
$ python setup.py install

Setting up your data warehouse

Geomancer is powered by a geospatial data warehouse: we highly-recommend using BigQuery as your data warehouse and Geofabrik's OSM catalog as your source of Points and Lines of interest.

Geomancer architecture

You can see the set-up instructions in this link

Basic Usage

All of the feature engineering functions in Geomancer are called "spells". For example, you want to get the distance to the nearest supermarket for each point.

from geomancer.spells import DistanceToNearest

# Load your dataset in a pandas dataframe
# df = load_dataset()

dist_spell = DistanceToNearest(
    "supermarket",
    source_table="ph_osm.gis_osm_pois_free_1",
    feature_name="dist_supermarket",
    dburl="bigquery://project-name",
).cast(df)

You can specify the type of filter using the format {column}:{filter}. By default, the column value is fclass. For example, if you wish to look for roads on a bridge, then pass bridge:T:

from geomancer.spells import DistanceToNearest

# Load the dataset in a pandas dataframe
# df = load_dataset()

dist_spell = DistanceToNearest(
    "bridge:T",
    source_table="ph_osm.gis_osm_roads_free_1",
    feature_name="dist_road_bridges",
    dburl="bigquery://project-name",
).cast(df)

Compose multiple spells into a "spell book" which you can export as a JSON file.

from geomancer.spells import DistanceToNearest
from geomancer.spellbook import SpellBook

spellbook = SpellBook([
    DistanceToNearest(
        "supermarket",
        source_table="ph_osm.gis_osm_pois_free_1",
        feature_name="dist_supermarket",
        dburl="bigquery://project-name",
    ),
    DistanceToNearest(
        "embassy",
        source_table="ph_osm.gis_osm_pois_free_1",
        feature_name="dist_embassy",
        dburl="bigquery://project-name",
    ),
])
spellbook.to_json("dist_supermarket_and_embassy.json")

You can share the generated file so other people can re-use your feature extractions with their own datasets.

from geomancer.spellbook import SpellBook

# Load the dataset in a pandas dataframe
# df = load_dataset()

spellbook = SpellBook.read_json("dist_supermarket_and_embassy.json")
dist_supermarket_and_embassy = spellbook.cast(df)

Contributing

This project is open for contributors! Contibutions can come in the form of feature requests, bug fixes, documentation, tutorials and the like! We highly recommend to file an Issue first before submitting a Pull Request.

Simply fork this repository and make a Pull Request! We'd definitely appreciate:

  • Implementation of new features
  • Bug Reports
  • Documentation
  • Testing

Also, we have a CONTRIBUTING and a CODE_OF_CONDUCT, so please check that one out!

License

MIT License © 2019, Thinking Machines Data Science

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].