pygieons
documentationΒΆ
What is pygieons
?ΒΆ
The name (you would anyway ask π): Python GIS and Earch Observation Networks
As described elsewhere, this website is largely generated automatically by using a Python tool called pygieons
. This tool auto-generates content regarding the listed packages and adds them to the website either as tables or interactive Network visualizations. pygieons
is currently focused on parsing information about Python GIS and Earth Observation libraries, but it is a rather generic tool, with modest modifications it would be possible to parse and visualize information from any collection of libraries available on PyPi.
pygieons
is largely based on pandas which is used for data manipulation, while pyvis library is used to visualize the connections between libraries as an interactive network of links. In addition, under the hood libraries such as requests
, beautifulsoup4
and pypistats
are used to extract relevant information about the listed libraries from the PyPi web pages.
Below, we demonstrate some basic functionalities that can be used to auto-generate content using pygieons
.
Basic usageΒΆ
Initializing the toolΒΆ
To generate content with pygieons
, you need to first initialize the tool with Ecosystem()
object which accepts a parameter plot_type
that can be used to define which category of libraries we want to plot, and parameter log
which can be used to disable logging to the screen. Below is the slightly modified output from help(Ecosystem)
command showing information about how the tool can be initialized:
class Ecosystem(builtins.object)
| Ecosystem(plot_type='all', keep_all=False, log=True)
|
| Parameters
| ==========
|
| plot_type : str
| This can be used to specify if you want to plot all packages in same figure, or only vector or raster.
| Possible values are: "all", "vector", "raster", "generic", "vector+generic", "raster+generic".
| keep_all : bool
| If True, also packages that are not available from PyPi or which are not maintained will be kept.
| log: bool
| If True, will print messages during process.
Letβs initialize the tool and configure it for plotting
raster
libraries.
from pygieons import Ecosystem
# Initialize the tool
e = Ecosystem(plot_type="raster", log=True)
Generating tablesΒΆ
To generate a table showing various information about the libraries, you can use method prepare_table()
, which autogenerates the table contents based on the packages listed in ecosystem_connections.py and ecosystem_pkgs.py files. The tool will print out information about the progress if log
was specified as True
:
# Generate the content
tbl = e.prepare_table()
Find out the number of monthly downloads from PyPi for the libraries ..
Extract project details ..
You can visualize the table by calling
.show()
of the returnedTable
object:
tbl.show()
Name | Homepage | Info | License | PyPi version | PyPi downloads (monthly) | Conda-forge version | Conda-forge downloads | Conda-forge latest release |
---|---|---|---|---|---|---|---|---|
gstools | π | β | 1,668 | |||||
pykrige | π | β | 17,754 | |||||
pysheds | π | β | 925 | |||||
pyspatialml | π | β | NA | 78 | NA | NA | NA | |
rasterstats | π | β | 61,113 | |||||
richdem | π | β | 2,187 | |||||
scikit-learn | π | β | 31,705,557 | |||||
spyndex | π | β | 287 | |||||
xarray-spatial | π | β | 1,843 |
Name | Homepage | Info | License | PyPi version | PyPi downloads (monthly) | Conda-forge version | Conda-forge downloads | Conda-forge latest release |
---|---|---|---|---|---|---|---|---|
affine | π | β | 669,468 | |||||
iris | π | β | 948 | |||||
rasterio | π | β | 744,408 | |||||
rio-cogeo | π | β | 13,656 | |||||
rioxarray | π | β | 38,468 | |||||
sarpy | π | β | 911 | |||||
sarsen | π | β | 40 | |||||
xarray | π | β | 1,626,657 |
Name | Homepage | Info | License | PyPi version | PyPi downloads (monthly) | Conda-forge version | Conda-forge downloads | Conda-forge latest release |
---|---|---|---|---|---|---|---|---|
earthengine-api | π | β | 32,896 | |||||
easystac | π | β | 87 | |||||
eemont | π | β | 598 | |||||
eoreader | π | β | 434 | |||||
lidar | π | β | 279 | |||||
odc-stac | π | β | 849 | |||||
planetary-computer | π | β | 2,874 | |||||
pymap3d | π | β | 43,146 | |||||
pyrosar | π | β | 478 | |||||
pystac | π | β | 31,727 | |||||
pystac-client | π | β | 9,996 | |||||
radiant-mlhub | π | β | 6,902 | |||||
rio-hist | π | β | NA | 168 | NA | NA | NA | |
rio-mucho | π | β | 8,470 | |||||
rio-tiler | π | β | 8,373 | |||||
salem | π | β | 4,972 | |||||
satpy | π | β | 3,841 | |||||
sentinelsat | π | β | 12,338 | |||||
stackstac | π | β | 1,142 | |||||
verde | π | β | 729 | |||||
xarray-sentinel | π | β | 70 | |||||
xyzservices | π | β | 164,884 |
Name | Homepage | Info | License | PyPi version | PyPi downloads (monthly) | Conda-forge version | Conda-forge downloads | Conda-forge latest release |
---|---|---|---|---|---|---|---|---|
contextily | π | β | 64,948 | |||||
pyvista-xarray | π | β | NA | 362 | NA | NA | NA | |
rio-color | π | β | 8,260 | |||||
xarray_leaflet | π | β | 848 |
Generating Network visualizationΒΆ
To generate an interactive network visualization showing the connections between libraries, you can use method prepare_net()
, which autogenerates the Network based on the packages listed in ecosystem_connections.py file. The tool will print out information about the progress if log
was specified as True
:
# Generate the content
net = e.prepare_net()
You can visualize the network by calling
.show()
of the returnedNetwork
object
net.show()
In addition, you can also save the Network visualization as a HTML file to your own computer by calling
.save()
method:
net.save("test.html")