In order to complete the analysis of position information data in Python, I tried to plot it on a Japanese map in Python based on latitude and longitude with reference to the following blog. Note that I got stuck with the installation of GDAL.
I want to plot geographic information with Python geopandas + Bokeh http://sinhrks.hatenablog.com/entry/2015/07/18/215951
Install GDAL, a general (?) Library that handles location data. Easy to use on Mac with the packages on this site http://www.kyngchaos.com/software/frameworks
You can download and install GDAL Complete from this site.
You can install only geos with brew, but when you finally install geopandas, it says that gdal.h cannot be found, so it was easier to put it in a package.
Set PATH after installation
export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH
source ~/.bash_profile
geopandas is a pandas that is often used in python data analysis and makes location information easier to handle. Install with pip.
pip install geopandas geopy
geopy is a dependent library and you have to put it in yourself.
After that, you can plot it by following the reference blog I wrote above. The result of plotting geotagged tweets including Maruyama Park looks like this.
Recommended Posts