[PYTHON] Jupyter Study Note_003

Sample of japanmap

I'm interested in things related to maps, so I tried using a package called "japanmap".

The procedure is as follows. Google colab does not have japanmap installed by default, so you will need to install japanmap again every time you create a new notebook.

--Install japanmap (implement only the first time) --First installation first install --Second installation japanmap install

――Run and see how many yesterday

japanmap_01.py


#Install the required package(Conduct only once)
#!pip install  japanmap
from japanmap import pref_names
from japanmap import pref_code
from japanmap import groups
from japanmap import is_faced2sea
from japanmap import adjacent
from japanmap import pref_map
from japanmap import get_data, pref_points

 #Kanto region
for i in groups['Kanto']:
    print(pref_names[i], is_faced2sea(i))
print()

 #adjacent
for i in [2, 20]:
    print(pref_names[i], ':', ' '.join([pref_names[j] for j in adjacent(i)]))

#Boundary data(svg)
qpqo = get_data()
svg = pref_map(range(1,48), qpqo=qpqo, width=2.5)
svg

--Result of execution

japanman サンプル実行結果

Recommended Posts

Jupyter Study Note_002
Jupyter Study Note_003
Jupyter Study Note_007
Jupyter Study Note_005
Python study note_002
Jupyter study notes_006
Python study note_004
Python study note_003
Jupyter study notes_008
Jupyter study notes_004
Jupyter study notes_001
Note
Note
Note
[WIP] Fluent Python Study Note
Django note 4
pyenv note
Jupyter begins
Jupyter Tips 4
GroupBy Note
Jupyter nbextensions
Jupyter Tips 5
"Python Machine Learning Programming" Summary Note (Jupyter)
Jupyter Tips 3
argparse note
Django Note 5
Jupyter Tips 2
Note: Python
Ansible Note
Jupyter installation
Jupyter tricks
Django Note 1
direnv note
Django note 3
Django note 2
[Note] RepresenterError
Install and set Jupyter Notebook to create a study note creation environment [Mac]