Inspiry is an iOS app that keeps all your memories in one place automatically collecting travels from your Instagram and Twitter.
In this repository you can find an algorithm for this application.
The iOS app implemented by adanilyak you can find here.
You can see an example of an algorithm's execution and uderstand the data format with a help of tests.
Major algorithm keypoints:
- Receives as input information user's post from Instagram API and Twitter API.
- Returns list of instances of the Trip class.
- Updates geodata in posts using osm_rg_wikidata library that uses Wikidata Query as source for geodata.
- Finds change of countries and cities.
- Separates "trip hypotheses" based on gaps in time between posts.
- Calculates locations statistics and find local cities and their satelite towns
- Excludes local cities and hypotheses without location
- Excludes very long "trips hypotheses" (rare persons travel longer than 90 days)
- Unites small city trips in a one big country trip
- Wraps results in Trip objects
The whole project was implemented by:
- iOS app: adanilyak
- Algorithm: mashaka
- Website: AlexeyZhuravlev
- Backend: seka17
- osm_rg_wikidata library: Scitator