Introduction to Mygeopackage¶
Mygeopackage is a python package for geographic data mining. Useful tools like converting common GIS data, like Geojson or Shapefile, to numpy array are offered in this package to speed up data preprocessing. Mygeopackage offers functionalities for data mining, including supervised machine learning, unsupervised machine learning, regressino, etc, based on the scikit-learn module. These functionalities are designed for specifically for geographic data.
Getting started¶
Import mygeopackage to your python script.¶
import mygeopackage
from mygeopackage import Geo
Create a Geo class¶
geojson = Geo(r'https://github.com/yungming0119/mygeopackage/blob/main/docs/notebooks/data/sample_points.geojson?raw=true')
geojson
<mygeopackage.mygeopackage.Geo at 0x7f326f068910>
Geo object is the fundamental component for mygeopackage. It stores metadata, sptail geometry and attribute data for spatial data mining. First, we will create a Geo object and assign it to the goejson variable. When we create the class, we will give a URI as the argument. GeoJson data will be fetched from the URI. More on Geo(), please see Main Module notebook.
geojson.show(top=20)
Geo class has the member method, show(). Show() will draw the records on the map and present it on the notebook. The top arguments determined how many records to be drawn.