Python: OpenStreetMap API - add Longitudes and Latitudes by using Geopy module
In this Python video tutorial I demonstrate how to correctly generate Longitude and Latitude of an any spatial object that is defined by it's address features in Pandas (Python module) dataframe by using OpenStreetMap API that is very friendly with Python environment and add those Longitudes and Latitudes to an existing data table.
Of course, you will see how to read a dataframe from .CSV Excel file directly to Python.
In this demonstration I am using PANDAS module and Jupyter Notebook tool but it will work with any code editor, such Atom or Brackets.
The Content of video tutorial is:
0:02 - The Idea of video tutorial
0:32 - 1st step: Import modules and read .csv datafile
2:39 - 2nd step: Import geopy module
3:16 - 3rd step: Set a connection to OpenStreetMap (Nominatim)
5:13 - 4th step: Set a full address field to a dataframe
7:51 - 5th step: Set values to Longitudes and Latitudes
This tutorial good for geographic specialist or GIS developers.
Good to know relative information:
- Get PIP system variable to the coommand line (https://bootstrap.pypa.io/get-pip.py)
- Official PANDAS website where you can learn and download it: http://pandas.pydata.org/
- Nominatim: is a tool to search OSM data by name and address and to generate synthetic addresses of OSM points (reverse geocoding). Nominatim is also used as one of the sources for the search box on the OpenStreetMap home page. (http://wiki.openstreetmap.org/wiki/Nominatim)
- Lambda function: http://stackoverflow.com/questions/890128/why-are-python-lambdas-useful
If you need some more information, just write it below in comments.
Other my Python video tutorials:
1. Python tutorial: Import 3rd party module package to Python (example with glob2 module) : https://www.youtube.com/watch?v=XSp3aLKFKWY
2. Python tutorial: read text file (2 simple methods) : https://www.youtube.com/watch?v=1nc5Sju8FVU
3. Build Python Graphic User Interface (GUI): https://www.youtube.com/watch?v=ddoPYppcppc
You can do almost everything by using Google Maps API (as I demonstrated here: https://www.youtube.com/watch?v=vTFn9gWEtPA&feature=youtu.be) and according to my tests if you need to get only latitudes and longitudes Google Maps API wins against OpenStreetMap API.
P.S. sorry for my english acsent :)
Please SUBSCRIBE ME for more Python videos in my Youtube channel!
Thank you for watching!
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Python: OpenStreetMap API - add Longitudes and Latitudes by using Geopy module», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.