Plot geographic information in Python

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

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

Install geopandas

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.

Plot with ipython (jupyter)

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. plot.png

Recommended Posts

Plot geographic information in Python
Quadtree in Python --2
Python in optimization
CURL in python
Metaprogramming in Python
Python 3.3 in Anaconda
Geocoding in python
SendKeys in Python
[Python] Violin Plot
Meta-analysis in Python
Unittest in python
Epoch in Python
Sudoku in Python
DCI in Python
quicksort in python
nCr in python
N-Gram in Python
Programming in python
Plink in Python
Constant in python
Lifegame in Python.
FizzBuzz in Python
Sqlite in python
StepAIC in Python
N-gram in python
LINE-Bot [0] in Python
Csv in python
Disassemble in Python
Reflection in Python
Constant in python
nCr in Python.
format in python
PPAP in Python
Quad-tree in Python
Reflection in Python
Chemistry in Python
Hashable in python
DirectLiNGAM in Python
LiNGAM in Python
Flatten in python
flatten in python
[Python] Display the Altair legend in the plot area
Make a joyplot-like plot of R in python
How to plot autocorrelation and partial autocorrelation in python
Sorted list in Python
Daily AtCoder # 36 in Python
Clustering text in Python
Daily AtCoder # 2 in Python
Implement Enigma in python
Daily AtCoder # 32 in Python
Daily AtCoder # 6 in Python
Daily AtCoder # 18 in Python
Edit fonts in Python
File operations in Python
Read DXF in python
Daily AtCoder # 53 in Python
Key input in Python
Use config.ini in Python
Daily AtCoder # 33 in Python
Solve ABC168D in Python
Logistic distribution in Python