Steem Map: Development Road
steemdev·@lightproject·
0.000 HBDSteem Map: Development Road
<center><a href="https://imgbb.com/"><img src="https://image.ibb.co/bYU5M5/steem_map.jpg" alt="steem_map" border="0"></center> <h1><center>Intro</center></h1> Hello Steemians, Creating a Web Map App with all Steemians locations might not seem like a super complex project, however, due to my lack of experience in Python and backend web design, I am forced to keep good track of my steps and take every single decision carefully. **The motivation behind is promoting meetups and user-to-user interaction** . Hopefully, with this app users will easily find other Steemians in their neighborhood/area whether using a distance or province/country filtering. With this roadmap I would like to describe the steps and challenges I have found so far in the current project that I am involved with. <h1><center>Concept </center></h1> <center> *Finding a map service Retrieving locations from SteemData Server Feeding Map with locations Enabling Map filter feature* </center> <h1><center>Map Service Choice </center></h1> There are many possibilities out there, many are free but are usually limited by the amount of geolocations uses per day. I was deciding between one of the following: pubnub|infosniper|batchgeo -|-|- yahoo|google| Since most services are limited, I decided to going for google maps because of the extensive and good quality of its documentation. <center>https://www.seeklogo.net/wp-content/uploads/2015/09/new-google-maps-logo-vector-download.jpg</center> <h1><center> User Location Data Retrieval</center></h1> The first step was finding a way to get all locations within the blockchain. My solution was using MongoDB and SteemData by Furion (https://steemit.com/steemdata/@furion/getting-started-with-steemdata). https://steemitimages.com/0x0/https://i.imgur.com/uAu5ST4.jpg <h1><center>Feeding Map with locations</center></h1> This is the tricky part. Since I do not want to pay the subscription for unlimited geolocations calls, I have two possibilities: - Get geolocations locally from a dictionary and create a database embedding all user location coordinates - Get a separated geolocation service that feeds my webmap Since I decided beforehand running the backend in Python, I chose the great tool "Geopy" as a remote geolocation service (running in Python). For the rest of the processes, I will be running Python3 and additionally the Pymongo module for the Database management. **Testing code so far:** ``` from geopy.geocoders import Nominatim import datetime from steemdata import SteemData geolocator = Nominatim() from pymongo import MongoClient client = MongoClient('localhost', 27017) db = client.test_database collection = db.test_collection data2 = [] s = SteemData() data = s.Accounts.aggregate( [ { "$match": { "profile.location": { "$exists": "true", "$ne": "null" } } }, { "$project": { "account":"$account", "location":"$profile.location", "_id":0 }}, {"$limit":5}, ]) for element in data: print(element["location"]) location = geolocator.geocode(element["location"]) data["location"] = location print((location.latitude, location.longitude)) ``` Please feel free to comment and suggest. I will post the final web url as soon as the app is ready. Thanks for reading. -lightproject
👍 lightproject, itzikuna, bensasy, utzo, followbtcnews, grobulia, rikimartin, galinannos, huko, megaermilina, celberus, vidrova, lina72, lokiuu, irina13151, maksaugolnov, vasek, domnin, yarur, yanukovi4a, yananaca, heana, voronka, eqlpbdm3yrtq, evsyucko, cheburek, goldmasters, slavam, muromtzev, nytonw, cromhorjackdi, valerirozins, maleww, ninalesimon, prijindal, kodaxx, geekgirl, shaka, smasher, empath, transisto, thegreatomski, newsflash, sammie, mujadpricelv, pilcrow, artem-sokoloff, raycoms, tamim, donaldpatterson, jamesbarraclough, jjb777, fabien, luisucv34, zinovi, metinyolcu, flbest, kypy24, sergey999, dehenne, cryptotim, manne, anyway, suitablybored, afukichi, aarkay, jephline, abupasi.alachy, mustayani, ganandoenbtc, kuku12170, torem-di-torem, dmcamera, adwas33,