Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tylfin/geospy
Highly optimized geolocation inference package for spatial approximation
https://github.com/tylfin/geospy
Last synced: 3 days ago
JSON representation
Highly optimized geolocation inference package for spatial approximation
- Host: GitHub
- URL: https://github.com/tylfin/geospy
- Owner: tylfin
- License: mit
- Created: 2015-09-27T19:11:12.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-06T21:07:54.000Z (over 1 year ago)
- Last Synced: 2024-10-08T10:52:21.406Z (about 1 month ago)
- Language: Cython
- Size: 438 KB
- Stars: 82
- Watchers: 13
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
GeosPy: Geolocation Inference Made Easy
=======================================.. image:: https://travis-ci.org/tylfin/GeosPy.svg?branch=master
:target: https://travis-ci.org/tylfin/GeosPyGeosPy is a MIT Licensed Geolocation Inference Library, written in Python.
Of the few existing Python modules for conducting geolocation inference,
most are verbose and cumbersome... code-block:: python
>>> from GeosPy import Geos
>>> geosPy = Geos()
>>> print(geosPy.models)
frozenset({'jakartr', 'backstrom'})
>>> geosPy = geosPy.set_model('backstrom')
>>> user_location_dict = {
... 'Tyler': (44, -71.5), 'Tim': (45.5, -73.5), 'Gwyn': (44.5, -89.5),
... 'Conor':(55.0, -106.0), 'Sam': (25.7, -80.2), 'OffTheGrid': None}
>>> user_friend_dict = {'OffTheGrid': ['Tyler', 'Sam', 'Gwyn', 'Conor', 'Tim']}
>>> print(geosPy.locate(user_location_dict, user_friend_dict))
{'Conor': (55.0, -106.0), 'Sam': (25.7, -80.2), 'Tyler': (44, -71.5),
'Gwyn': (44.5, -89.5), 'Tim': (45.5, -73.5), 'OffTheGrid': (45.5, -73.5)}
...GeosPy is based off of `Jurgens et al. (2015)`_, implementing state-of-the-art
methods for geolocation inference. It allows the user to locate nodes with unknown locations
based solely on network-based relationships.*Geolocation inference* is the identification of the real-world geographic location of an object on Earth based off of available data. GeosPy currently only supports network based inference methods.
Features
--------- State-of-the-art geolocation inference method(s)
- Supports python 3.3, 3.4 and 3.5
- Written in cython
- Test coverageInstallation
------------To install GeosPy from source run the following commands
.. code-block:: bash
> git clone https://github.com/tylfin/GeosPy/
> cd GeosPy
> pip install -r requirements.txt
...
Successfully installed ...
> make build_inplace
...
> make test
...
OK
> make install
...
PIP support coming soon!
Documentation
-------------GeosPy `documentation`_ is provided in the form of Jupyter notebooks.
For a basic usage example, checkout the `introduction`_.
**Directory Structure**::
├── GeosPy
│ ├── __init__.py
│ ├── geos.pyx
│ ├── models
│ │ ├── __init__.py
│ │ ├── backstrom.pyx
│ │ └── jakartr.pyx
│ └── utilities
│ ├── __init__.py
│ └── distance.pyx
├── docs
│ ├── intro.ipynb
│ └── trainModels.ipynb
├── setup.py
└── tests
├── __init__.py
├── test_backstrom.py
├── test_geos.py
└── test_utilities.pyContribute
----------#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
#. Fork `the repository`_ on GitHub to start making your changes to the **master** branch (or branch off of it).
#. Write a test which shows that the bug was fixed or that the feature works as expected.
#. Send a pull request and bug the maintainer until it gets merged and published. Make sure to add yourself to `AUTHORS`_... _the repository: http://github.com/tylfin/GeosPy
.. _AUTHORS: https://github.com/tylfin/GeosPy/blob/master/AUTHORS
.. _Jurgens et al. (2015): http://www-cs.stanford.edu/~jurgens/docs/jurgens-et-al_icwsm-2015.pdf
.. _clone the repository: https://help.github.com/articles/cloning-a-repository/
.. _introduction: https://github.com/tylfin/GeosPy/blob/master/docs/intro.ipynb
.. _documentation: https://github.com/tylfin/GeosPy/blob/master/docs/