GithubHelp home page GithubHelp logo

opengeos / leafmap Goto Github PK

View Code? Open in Web Editor NEW
2.9K 54.0 340.0 37.21 MB

A Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment

Home Page: https://leafmap.org

License: MIT License

Python 99.43% HTML 0.23% TeX 0.30% Dockerfile 0.04%
ipyleaflet folium mapping python geopython jupyter-notebook jupyter gis dataviz data-science

leafmap's People

Contributors

1tylermitchell avatar ajstewartlang avatar amorfinv avatar banesullivan avatar darrenwiens avatar djm93dev avatar gistfh avatar giswqs avatar jbednar avatar jjflorian avatar jovanovski avatar junjiez avatar karelvancamp avatar kongdd avatar krishnaglodha avatar lopezvoliver avatar mathomp4 avatar mikebeller avatar nahidpervez avatar neteler avatar piphi5 avatar pre-commit-ci[bot] avatar prusswan avatar rhyzhang avatar rowheat02 avatar sdruskat avatar shailesh-stha avatar sugatoray avatar vincentsarago avatar zxdawn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leafmap's Issues

Can't add a Geotiff raster layer to the map

Environment Information

  • leafmap version: 0.1.0
  • Python version: 3.7.10
  • Operating System: Windows

Description

After installing xarray-leaflet, I tried to add a Geotiff raster layer to the map.

Once the file is chosen, I press the apply button and the map zooms to the right coordinates, a layer is created but nothing is displayed.

I'm attaching the file I'm trying to display so you can try on your own.

file.zip

Leafmap tutorials hang without loading widgets

Environment Information

  • leafmap version: '0.1.0'
  • ipyleaflet version: '0.13.6'
  • Python version: Python 3.6.9
  • Operating System: Jupyterlab version 2.2.9, Jupyterhub / Ubuntu 18.04 based container running on an amazon linux kernel

Description

The 01_leafmap_intro.ipynb notebook hangs on the third cell, displaying only "Loading widget" without ever displaying a map:

image

What I Did

Using the Digital Earth Australia Sandbox Jupyterhub environment (https://app.sandbox.dea.ga.gov.au/), I launched the 01_leafmap_intro.ipynb notebook then ran the following cells:

!pip install leafmap

import leafmap

m = leafmap.Map()
m

(I have also attempted to run the 05_load_raster.ipynb notebook and had the same issue at the final Display the map cell, with the notebook simply displaying only "Loading widget" without ever displaying the map)

Render ipyleaflet and ipywidgets in mkdocs-jupyter

The documentation website (https://leafmap.org) is built using MkDocs and mkdocs-jupyter with GitHub Actions (mkdocs.yml and docs.yml). Currently, it seems mkdocs-jupyter can only render folium maps. Ipyleaflet maps and ipywidgets do not show up on the webpage. Any advice on making the ipyleaflet-based interactive maps show up on https://leafmap.org would be greatly appreciated.

Examples:

@deeplook @sackh @martinRenou @davidbrochart @danielfrg @squidfunk @chrieke

Add cog mosaic from URL

This feature will allow users to load a cog mosaic from a csv/txt file containing cog links

Add wms value for the active layer on click event (info button)

Description

Describe the feature (e.g., new functions/tutorials) you would like to propose.
Tell us what can be achieved with this new feature and what's the expected outcome.

It is possible to add WMS layer and to manage rendering through the legend templates. It will be good to add an event / button that shows the pixel lat, lon and value.

Source code

Paste your source code here if have sample code to share.

leafmap.Map shows only Error displaying widget: model not found

Environment Information

  • leafmap version: 0.3.2
  • Python version: 3.9.2
  • Operating System: macOS (intel)

Description

This is a part of the review for JOSS (openjournals/joss-reviews#3414)

I installed leafmap from conda-forge and tried to follow Get Started guide. However, while using ipyleaflet backend, no map is shown, only a message Error displaying widget: model not found.

Screenshot 2021-07-07 at 16 23 54

What I Did

import leafmap

m = leafmap.Map(center=(40, -100), zoom=4)
m

Environment specs:

# Name                    Version                   Build  Channel
ablog                     0.10.18                  pypi_0    pypi
abseil-cpp                20210324.1           he49afe7_0    conda-forge
affine                    2.3.0                      py_0    conda-forge
alabaster                 0.7.12                     py_0    conda-forge
anyio                     3.2.1            py39h6e9494a_0    conda-forge
appnope                   0.1.2            py39h6e9494a_1    conda-forge
argon2-cffi               20.1.0           py39hcbf5805_2    conda-forge
arrow-cpp                 4.0.0           py39h794a569_3_cpu    conda-forge
async_generator           1.10                       py_0    conda-forge
attrs                     20.3.0             pyhd3deb0d_0    conda-forge
aws-c-cal                 0.5.11               hd2e2f4b_0    conda-forge
aws-c-common              0.6.2                h0d85af4_0    conda-forge
aws-c-event-stream        0.2.7               hb9330a7_13    conda-forge
aws-c-io                  0.10.5               h35aa462_0    conda-forge
aws-checksums             0.1.11               h0010a65_7    conda-forge
aws-sdk-cpp               1.8.186              h766a74d_3    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
beautifulsoup4            4.9.3              pyhb0f4dca_0    conda-forge
bleach                    3.3.0              pyh44b312d_0    conda-forge
bokeh                     2.3.2            py39h6e9494a_0    conda-forge
boost-cpp                 1.74.0               hbdcdab7_3    conda-forge
bqplot                    0.12.29            pyhd8ed1ab_0    conda-forge
branca                    0.4.2              pyhd8ed1ab_0    conda-forge
brotli                    1.0.9                h0d85af4_5    conda-forge
brotli-bin                1.0.9                h0d85af4_5    conda-forge
brotlipy                  0.7.0           py39hcbf5805_1001    conda-forge
bs4                       4.9.3                         0    conda-forge
bzip2                     1.0.8                hc929b4f_4    conda-forge
c-ares                    1.17.1               h0d85af4_1    conda-forge
ca-certificates           2021.5.30            h033912b_0    conda-forge
cairo                     1.16.0            he43a7df_1008    conda-forge
cartopy                   0.19.0.post1     py39hada9a11_0    conda-forge
certifi                   2021.5.30        py39h6e9494a_0    conda-forge
cffi                      1.14.5           py39hb71fe58_0    conda-forge
cfitsio                   3.470                h4472c5d_7    conda-forge
cftime                    1.5.0            py39hc89836e_0    conda-forge
chardet                   4.0.0            py39h6e9494a_1    conda-forge
click                     7.1.2              pyh9f0ad1d_0    conda-forge
click-completion          0.5.2            py39h6e9494a_2    conda-forge
click-log                 0.3.2              pyh9f0ad1d_0    conda-forge
click-plugins             1.1.1                      py_0    conda-forge
cligj                     0.7.2              pyhd8ed1ab_0    conda-forge
cloudpickle               1.6.0                      py_0    conda-forge
clustergram               0.4.0+3.g65f2b56.dirty           dev_0    <develop>
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
colorcet                  2.0.6              pyhd8ed1ab_0    conda-forge
colour                    0.1.5                      py_0    conda-forge
conda                     4.10.3           py39h6e9494a_0    conda-forge
conda-package-handling    1.7.3            py39h89e85a6_0    conda-forge
contextily                1.1.0              pyhd8ed1ab_0    conda-forge
cryptography              3.4.7            py39ha2c9959_0    conda-forge
curl                      7.77.0               hb861fe1_0    conda-forge
cycler                    0.10.0                     py_2    conda-forge
cytoolz                   0.11.0           py39hcbf5805_3    conda-forge
dask                      2021.6.2           pyhd8ed1ab_0    conda-forge
dask-core                 2021.6.2           pyhd8ed1ab_0    conda-forge
dask-geopandas            0.1.0a2                  pypi_0    pypi
datashader                0.13.0             pyh6c4a22f_0    conda-forge
datashape                 0.5.4                      py_1    conda-forge
dbus                      1.13.6               ha13b53f_2    conda-forge
debugpy                   1.3.0            py39h9fcab8e_0    conda-forge
decorator                 4.4.2                      py_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
deprecated                1.2.12             pyh44b312d_0    conda-forge
deprecation               2.1.0              pyh9f0ad1d_0    conda-forge
descartes                 1.1.0                      py_4    conda-forge
distributed               2021.6.2         py39h6e9494a_0    conda-forge
docutils                  0.16             py39h6e9494a_3    conda-forge
entrypoints               0.3             py39hde42818_1002    conda-forge
et_xmlfile                1.0.1                   py_1001    conda-forge
expat                     2.4.1                he49afe7_0    conda-forge
feedgen                   0.9.0                    pypi_0    pypi
fiona                     1.8.18           py39h673eaac_1    conda-forge
folium                    0.12.0             pyhd8ed1ab_1    conda-forge
fontconfig                2.13.1            h10f422b_1005    conda-forge
freetype                  2.10.4               h4cff582_1    conda-forge
freexl                    1.0.6                h0d85af4_0    conda-forge
fsspec                    2021.6.1           pyhd8ed1ab_0    conda-forge
gdal                      3.2.1            py39h0530131_7    conda-forge
geckodriver               0.29.0               h970cd5f_0    conda-forge
geographiclib             1.52               pyhd8ed1ab_0    conda-forge
geopandas                 0.9.0              pyhd8ed1ab_1    conda-forge
geopandas-base            0.9.0              pyhd8ed1ab_1    conda-forge
geoplot                   0.4.3              pyhd8ed1ab_0    conda-forge
geopy                     2.1.0              pyhd3deb0d_0    conda-forge
geos                      3.9.1                he49afe7_2    conda-forge
geotiff                   1.6.0                h1925f3f_4    conda-forge
geoviews                  1.9.1              pyhd8ed1ab_0    conda-forge
geoviews-core             1.9.1              pyha770c72_0    conda-forge
gettext                   0.19.8.1          h7937167_1005    conda-forge
gflags                    2.2.2             hb1e8313_1004    conda-forge
giflib                    5.2.1                hbcb3906_2    conda-forge
git                       2.30.2          pl5320h2551975_1    conda-forge
gitdb                     4.0.7              pyhd3eb1b0_0  
gitpython                 3.1.18             pyhd8ed1ab_0    conda-forge
glib                      2.68.3               he49afe7_0    conda-forge
glib-tools                2.68.3               he49afe7_0    conda-forge
glog                      0.5.0                h25b26a9_0    conda-forge
googledrivedownloader     0.4                pyhd3deb0d_1    conda-forge
greenlet                  1.1.0            py39h9fcab8e_0    conda-forge
grpc-cpp                  1.37.1               h25f885f_2    conda-forge
hdf4                      4.2.15               hefd3b78_3    conda-forge
hdf5                      1.10.6          nompi_hc5d9132_1114    conda-forge
heapdict                  1.0.1                      py_0    conda-forge
here-map-widget-for-jupyter 1.1.1              pyhd8ed1ab_0    conda-forge
holoviews                 1.14.4             pyhd8ed1ab_0    conda-forge
html2text                 2020.1.16                  py_0    conda-forge
hvplot                    0.7.2              pyh6c4a22f_0    conda-forge
icu                       68.1                 h74dc148_0    conda-forge
idna                      2.10               pyh9f0ad1d_0    conda-forge
imagesize                 1.2.0                      py_0    conda-forge
importlib-metadata        4.6.1            py39h6e9494a_0    conda-forge
importlib_metadata        4.6.1                hd8ed1ab_0    conda-forge
invoke                    1.5.0                    pypi_0    pypi
ipyevents                 0.8.2              pyhd8ed1ab_0    conda-forge
ipyfilechooser            0.4.4              pyhd8ed1ab_0    conda-forge
ipykernel                 6.0.1            py39h71a6800_0    conda-forge
ipyleaflet                0.14.0             pyhd8ed1ab_1    conda-forge
ipython                   7.25.0           py39h71a6800_1    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipytree                   0.2.1              pyhd8ed1ab_0    conda-forge
ipywidgets                7.6.3              pyhd3deb0d_0    conda-forge
jdcal                     1.4.1                      py_0    conda-forge
jedi                      0.18.0           py39h6e9494a_2    conda-forge
jinja2                    3.0.1              pyhd8ed1ab_0    conda-forge
joblib                    1.0.1              pyhd8ed1ab_0    conda-forge
jpeg                      9d                   hbcb3906_0    conda-forge
json-c                    0.15                 hcb556a6_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                3.2.0              pyhd8ed1ab_3    conda-forge
jupyter                   1.0.0            py39h6e9494a_6    conda-forge
jupyter-cache             0.4.2              pyhd8ed1ab_0    conda-forge
jupyter-packaging         0.10.4             pyhd8ed1ab_0    conda-forge
jupyter-server-mathjax    0.2.3              pyhd8ed1ab_0    conda-forge
jupyter-sphinx            0.3.2                      py_0    conda-forge
jupyter_client            6.1.12             pyhd8ed1ab_0    conda-forge
jupyter_console           6.4.0              pyhd8ed1ab_0    conda-forge
jupyter_core              4.7.1            py39h6e9494a_0    conda-forge
jupyter_server            1.9.0              pyhd8ed1ab_0    conda-forge
jupyterlab                3.0.16             pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.6.0              pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.0.0              pyhd8ed1ab_1    conda-forge
kealib                    1.4.14               h31dd65d_2    conda-forge
kiwisolver                1.3.1            py39hf018cea_1    conda-forge
krb5                      1.19.1               hcfbf3a7_0    conda-forge
lcms2                     2.12                 h577c468_0    conda-forge
leafmap                   0.3.2              pyhd8ed1ab_0    conda-forge
libarchive                3.5.1                h0a5793d_1    conda-forge
libblas                   3.9.0                9_openblas    conda-forge
libbrotlicommon           1.0.9                h0d85af4_5    conda-forge
libbrotlidec              1.0.9                h0d85af4_5    conda-forge
libbrotlienc              1.0.9                h0d85af4_5    conda-forge
libcblas                  3.9.0                9_openblas    conda-forge
libclang                  11.1.0          default_he082bbe_1    conda-forge
libcurl                   7.77.0               hf45b732_0    conda-forge
libcxx                    11.1.0               habf9029_0    conda-forge
libdap4                   3.20.6               h3e144a0_2    conda-forge
libedit                   3.1.20191231         hed1e85f_2    conda-forge
libev                     4.33                 haf1e3a3_1    conda-forge
libevent                  2.1.10               hddc9c9b_3    conda-forge
libffi                    3.3                  h046ec9c_2    conda-forge
libgdal                   3.2.1                h62a8350_7    conda-forge
libgfortran               5.0.0           9_3_0_h6c81a4c_22    conda-forge
libgfortran5              9.3.0               h6c81a4c_22    conda-forge
libglib                   2.68.3               hd556434_0    conda-forge
libiconv                  1.16                 haf1e3a3_0    conda-forge
libkml                    1.3.0             h8fd9edb_1013    conda-forge
liblapack                 3.9.0                9_openblas    conda-forge
libllvm10                 10.0.1               h009f743_3    conda-forge
libllvm11                 11.1.0               hd011deb_2    conda-forge
libnetcdf                 4.7.4           nompi_h9d8a93f_107    conda-forge
libnghttp2                1.43.0               h07e645a_0    conda-forge
libopenblas               0.3.15          openmp_h5e1b9a4_1    conda-forge
libpng                    1.6.37               hb0a8c7a_2    conda-forge
libpq                     13.3                 hea3049e_0    conda-forge
libprotobuf               3.16.0               hcf210ce_0    conda-forge
libpysal                  4.5.1              pyhd8ed1ab_0    conda-forge
librttopo                 1.1.0                h5413771_6    conda-forge
libsodium                 1.0.18               hbcb3906_1    conda-forge
libsolv                   0.7.19               hcf210ce_3    conda-forge
libspatialindex           1.9.3                h4a8c4bd_3    conda-forge
libspatialite             5.0.1                h395434c_3    conda-forge
libssh2                   1.9.0                h52ee1ee_6    conda-forge
libthrift                 0.14.2               hab56fdc_1    conda-forge
libtiff                   4.2.0                h46d1c8c_2    conda-forge
libutf8proc               2.6.1                h35c211d_0    conda-forge
libwebp-base              1.2.0                h0d85af4_2    conda-forge
libxcb                    1.13              h35c211d_1003    conda-forge
libxml2                   2.9.12               h93ec3fd_0    conda-forge
llvm-openmp               11.1.0               hda6cdc1_1    conda-forge
llvmlite                  0.36.0           py39h798a4f4_0    conda-forge
locket                    0.2.0                      py_2    conda-forge
lxml                      4.6.3                    pypi_0    pypi
lz4-c                     1.9.3                h046ec9c_0    conda-forge
lzo                       2.10              haf1e3a3_1000    conda-forge
mamba                     0.14.1           py39hb671511_0    conda-forge
mapclassify               2.4.2              pyhd8ed1ab_0    conda-forge
markdown                  3.3.4              pyhd8ed1ab_0    conda-forge
markdown-it-py            0.6.2              pyhd8ed1ab_0    conda-forge
markupsafe                2.0.1            py39h89e85a6_0    conda-forge
matplotlib                3.4.2            py39h6e9494a_0    conda-forge
matplotlib-base           3.4.2            py39hb07454d_0    conda-forge
matplotlib-inline         0.1.2              pyhd8ed1ab_2    conda-forge
mdit-py-plugins           0.2.6              pyhd8ed1ab_0    conda-forge
mercantile                1.2.1              pyhd8ed1ab_0    conda-forge
mistune                   0.8.4           py39h89e85a6_1004    conda-forge
momepy                    0.4.4              pyhd8ed1ab_0    conda-forge
msgpack-python            1.0.2            py39hf018cea_1    conda-forge
multipledispatch          0.6.0                      py_0    conda-forge
munch                     2.5.0                      py_0    conda-forge
mysql-common              8.0.25               h694c41f_0    conda-forge
mysql-libs                8.0.25               h54f5a68_0    conda-forge
myst-nb                   0.12.3             pyhd8ed1ab_0    conda-forge
myst-parser               0.13.7             pyhd8ed1ab_0    conda-forge
nbclassic                 0.3.1              pyhd8ed1ab_1    conda-forge
nbclient                  0.5.3              pyhd8ed1ab_0    conda-forge
nbconvert                 5.6.0                      py_0    conda-forge
nbdime                    3.1.0              pyhd8ed1ab_0    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nbsphinx                  0.8.6              pyhd8ed1ab_1    conda-forge
ncurses                   6.2                  h2e338ed_4    conda-forge
nest-asyncio              1.5.1              pyhd8ed1ab_0    conda-forge
netcdf4                   1.5.6           nompi_py39h353b61e_102    conda-forge
networkx                  2.5.1              pyhd8ed1ab_0    conda-forge
notebook                  6.4.0              pyha770c72_0    conda-forge
nspr                      4.30                 hcd9eead_0    conda-forge
nss                       3.67                 h31e2bf1_0    conda-forge
numba                     0.53.1           py39h32e38f5_1    conda-forge
numpy                     1.21.0           py39h7eed0ac_0    conda-forge
numpydoc                  1.1.0                      py_1    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openjpeg                  2.4.0                h6e7aa92_1    conda-forge
openpyxl                  3.0.7              pyhd8ed1ab_0    conda-forge
openssl                   1.1.1k               h0d85af4_0    conda-forge
orc                       1.6.7                h590cbdb_2    conda-forge
osmnx                     1.1.1              pyhd8ed1ab_0    conda-forge
packaging                 21.0               pyhd8ed1ab_0    conda-forge
palettable                3.3.0                      py_0    conda-forge
pandas                    1.3.0            py39h4d6be9b_0    conda-forge
pandoc                    2.14.0.3             h0d85af4_0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
panel                     0.11.3             pyhd8ed1ab_0    conda-forge
param                     1.11.1             pyh6c4a22f_0    conda-forge
parquet-cpp               1.5.1                         1    conda-forge
parso                     0.8.2              pyhd8ed1ab_0    conda-forge
partd                     1.2.0              pyhd8ed1ab_0    conda-forge
patsy                     0.5.1                      py_0    conda-forge
pcre                      8.45                 he49afe7_0    conda-forge
perl                      5.32.1          0_h0d85af4_perl5    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5           py39hde42818_1002    conda-forge
pillow                    8.2.0            py39h5fdd921_1    conda-forge
pip                       21.1.3             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               hbcb3906_0    conda-forge
poppler                   0.89.0               hd735947_5    conda-forge
poppler-data              0.4.10                        0    conda-forge
postgresql                13.3                 he8fe76e_0    conda-forge
proj                      7.2.0                h78d1473_2    conda-forge
prometheus_client         0.11.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.19             pyha770c72_0    conda-forge
prompt_toolkit            3.0.19               hd8ed1ab_0    conda-forge
psutil                    5.8.0            py39hcbf5805_1    conda-forge
pthread-stubs             0.4               hc929b4f_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pyarrow                   4.0.0           py39hc3b5b9c_3_cpu    conda-forge
pycosat                   0.6.3           py39hcbf5805_1006    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pycrs                     1.0.2                      py_0    conda-forge
pyct                      0.4.6                      py_0    conda-forge
pyct-core                 0.4.6                      py_0    conda-forge
pydata-sphinx-theme       0.6.3                    pypi_0    pypi
pygeos                    0.10             py39h1d9c377_0    conda-forge
pygments                  2.9.0              pyhd8ed1ab_0    conda-forge
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyproj                    3.1.0            py39he1749b9_3    conda-forge
pyqt                      5.12.3           py39h6e9494a_7    conda-forge
pyqt-impl                 5.12.3           py39hef7122c_7    conda-forge
pyqt5-sip                 4.19.18          py39hd8f94c5_7    conda-forge
pyqtchart                 5.12             py39hef7122c_7    conda-forge
pyqtwebengine             5.12.1           py39hef7122c_7    conda-forge
pyrsistent                0.17.3           py39hcbf5805_2    conda-forge
pysal                     2.1.0                      py_0    conda-forge
pyshp                     2.1.3              pyh44b312d_0    conda-forge
pysocks                   1.7.1            py39h6e9494a_3    conda-forge
python                    3.9.2           h2502468_0_cpython    conda-forge
python-box                5.3.0              pyhd8ed1ab_0    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python-mss                6.1.0              pyhd3deb0d_0    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pytz                      2021.1             pyhd8ed1ab_0    conda-forge
pyviz_comms               2.1.0              pyhd8ed1ab_0    conda-forge
pyyaml                    5.4.1            py39hcbf5805_0    conda-forge
pyzmq                     22.1.0           py39h7fec2f1_0    conda-forge
qt                        5.12.9               h126340a_4    conda-forge
qtconsole                 5.1.1              pyhd8ed1ab_0    conda-forge
qtpy                      1.9.0                      py_0    conda-forge
rasterio                  1.2.6            py39hafb7765_0    conda-forge
re2                       2021.04.01           he49afe7_0    conda-forge
readline                  8.1                  h05e3726_0    conda-forge
reproc                    14.2.1               hbcb3906_0    conda-forge
reproc-cpp                14.2.1               h2e338ed_0    conda-forge
requests                  2.25.1             pyhd3deb0d_0    conda-forge
requests-unixsocket       0.2.0                      py_0    conda-forge
rtree                     0.9.7            py39h7d0d40a_1    conda-forge
ruamel.yaml               0.17.10          py39h89e85a6_0    conda-forge
ruamel.yaml.clib          0.2.2            py39hcbf5805_2    conda-forge
ruamel_yaml               0.15.80         py39h89e85a6_1004    conda-forge
scikit-learn              0.24.2           py39h4b1dcc9_0    conda-forge
scipy                     1.7.0            py39h056f1c0_0    conda-forge
seaborn                   0.11.1               h694c41f_0    conda-forge
seaborn-base              0.11.1             pyhd8ed1ab_1    conda-forge
selenium                  3.141.0         py39hcbf5805_1002    conda-forge
send2trash                1.7.1              pyhd8ed1ab_0    conda-forge
setuptools                49.6.0           py39h6e9494a_3    conda-forge
shapely                   1.7.1            py39h1d9c377_5    conda-forge
shellingham               1.4.0              pyh44b312d_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
smmap                     4.0.0              pyhd8ed1ab_1    conda-forge
snappy                    1.1.8                hb1e8313_3    conda-forge
sniffio                   1.2.0            py39h6e9494a_1    conda-forge
snowballstemmer           2.1.0              pyhd8ed1ab_0    conda-forge
snuggs                    1.4.7                      py_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
soupsieve                 2.0.1                      py_1    conda-forge
sphinx                    3.5.4              pyh44b312d_0    conda-forge
sphinx-togglebutton       0.2.3              pyhd3deb0d_0    conda-forge
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_0    conda-forge
sqlalchemy                1.4.20           py39h89e85a6_0    conda-forge
sqlite                    3.36.0               h23a322b_0    conda-forge
statsmodels               0.12.2           py39h329c335_0    conda-forge
tblib                     1.7.0              pyhd8ed1ab_0    conda-forge
terminado                 0.10.1           py39h6e9494a_0    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
threadpoolctl             2.1.0              pyh5ca1d4c_0    conda-forge
tiledb                    2.2.9                he9a4fb4_0    conda-forge
tk                        8.6.10               hb0a8c7a_1    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomlkit                   0.7.2            py39h6e9494a_0    conda-forge
toolz                     0.11.1                     py_0    conda-forge
topojson                  1.0                      pypi_0    pypi
tornado                   6.1              py39hcbf5805_1    conda-forge
tqdm                      4.61.2             pyhd8ed1ab_1    conda-forge
traitlets                 5.0.5                      py_0    conda-forge
traittypes                0.2.1              pyh9f0ad1d_2    conda-forge
typing_extensions         3.10.0.0           pyha770c72_0    conda-forge
tzcode                    2021a                h0d85af4_1    conda-forge
tzdata                    2021a                he74cb21_0    conda-forge
urbangrammar-graphics     1.2.2                    pypi_0    pypi
urllib3                   1.26.6             pyhd8ed1ab_0    conda-forge
watchdog                  2.0.3                    pypi_0    pypi
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          0.57.0           py39h6e9494a_4    conda-forge
wheel                     0.36.2             pyhd3deb0d_0    conda-forge
whitebox                  1.5.1              pyhd8ed1ab_0    conda-forge
whiteboxgui               0.3.0              pyhd8ed1ab_0    conda-forge
widgetsnbextension        3.5.1            py39hde42818_4    conda-forge
wrapt                     1.12.1           py39hcbf5805_3    conda-forge
xarray                    0.18.2             pyhd8ed1ab_0    conda-forge
xerces-c                  3.2.3                hd3a8c1e_2    conda-forge
xlrd                      2.0.1              pyhd8ed1ab_3    conda-forge
xorg-kbproto              1.0.7             h35c211d_1002    conda-forge
xorg-libx11               1.7.2                h0d85af4_0    conda-forge
xorg-libxau               1.0.9                h35c211d_0    conda-forge
xorg-libxdmcp             1.1.3                h35c211d_0    conda-forge
xorg-xproto               7.0.31            h35c211d_1007    conda-forge
xyzservices               0.0.0                    pypi_0    pypi
xz                        5.2.5                haf1e3a3_1    conda-forge
yaml                      0.2.5                haf1e3a3_0    conda-forge
zeromq                    4.3.4                h1c7c35f_0    conda-forge
zict                      2.0.0                      py_0    conda-forge
zipp                      3.5.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h7795811_1010    conda-forge
zstd                      1.4.9                h582d3a0_0    conda-forge

Can leafmap crop an area based on lat and lon ranges?

Description

Dear Professor Wu

I noticed that some Python packages (e.g. Plotly and Bokeh) can draw maps, normally based on the coordinates of a given center point. Then the user can zoom in and out. But when somebody needs to crop the exact domain based on the given ranges of lat and lon, zooming manually is not ideal.

I wonder if you have interest/time to add a feature in leafmap so that the user can input ranges of lat and lon, then save out the map as png or other common formats.

I understand that this may be unnecessary for other users at all. But I would like to share this idea with you. I will also think about how to achieve this using Python.

Many thanks,
Gongda

Source code

Paste your source code here if have sample code to share.

color map

How to color a polygon layer based on a variable value? like the thermal map. The polygons can be colored by specifying fillColor in Style, like the example in your tutorial:
style = {
"stroke": True,
"color": "#FFFFFF",
"weight": 1,
"opacity": 0.7,
"fill": True,
"fillColor": "blue",
"fillOpacity": 0.4,
}
Is there a way to make "fillColor" a function of a data field from geopandas dataframe the map plots?

Thank you very much.

Update intro-notebook to allow figure window resizing in colab

Description

The fix for #21 should be incorporated in the intro-notebook.

Source code

I have added the following in the notebook and will submit it in new pull request.

## Run this cell once and then 
## comment it out after first run
import leafmap
leafmap.update_package()
print("Restarting notebook server...")
import os
os.kill(os.getpid(), 9)

Suggested change

image

Specify optional requirements for rasters

Description

If we want to work with rasters, an error is thrown that xarray_leaflet is not installed.
We can list this as an optional dependency, via extras_require parameter to setup(). So the users who need raster support, would issue pip install leafmap[raster].

What do you think ? This has the downside of specifying the dependency in setup.py rather than requirements.txt.

Alternatively, we can leave it as is (instructing users to install), but then we should fix the error display in the map:

Screenshot 2021-05-31 at 15 26 25

The final error message is not visible.
Can we make that zone scrollable ?

Publication quality maps

Description

Create publication-quality maps with a scale bar, north arrow, and gridlines similar to geemap. Perhaps later, an inset map. variable distribution on the axes edges

Source code

Paste your source code here if have sample code to share.

Install on Pyodide/JupyterLite

It would be really cool to run leafmap on Pyodide and hence JupyterLite using micropip.

I gave it a try and found basically two issues with non-existing Python 3 source wheels (needed by micropip) for pycrs and pyshp on PyPI for which I've created these tickets (but there might be wheels for them hosted somewhere else): karimbahgat/PyCRS#56 and GeospatialPython/pyshp#217. And here-map-widget-for-jupyter can be installed, too, but still has some issue with the JupyterLab extension, as described on heremaps/here-map-widget-for-jupyter#25. Folium can be installed in a somewhat complicated manner, see the notebook pyolite folium.ipynb on JupyterLite.

Not sure if anything else is needed... ;)

VectorTileLayer support for ipyleaflet

Description

Thanks for putting this together! this seems to have a great collection of tools required for geospatial analysis.
I was wondering if vector tile layer (https://ipyleaflet.readthedocs.io/en/latest/api_reference/vector_tile.html#) can be added to this?

Source code

# may be something like this
m = leafmap.Map()
m.add_vector_tile_layer(url="https://tile.nextzen.org/tilezen/vector/v1/512/all/{z}/{x}/{y}.mvt?api_key={apiKey}", name="VectorTileLayer")

Leafmap figure window does not adjust to height and width specifications on colab

Environment Information

  • leafmap version: 0.2.0
  • Python version: 3.7.10
  • Operating System: Linux
# code snippet for the above information
def systeminfo():
    import platform

    uname = platform.uname()
    platform_details = platform.platform()

    print(f'leafmap version: {leafmap.__version__}')
    print(f'python version: {platform.python_version()}')
    print(f'operating system: {uname.system}')
    print(f'  details: {platform_details}')

systeminfo()

Description

The figure window for leafmap does not adjust for non-defauilt values of height and width specifications for leafmap.Map() method. Please see the screenshot below.

What I Did

I followed the demo colab notebook. But when I tried changing the height/width of the visualization, although the size of the map adjusted to my specifications, the figure window remained as wide and big it was without any height/width specification.

# ! pip install leafmap -Uqq
import leafmap

m = leafmap.Map(height="450px", width="600px")
m

Screenshot

image

Polygon (e.g. geojson) were colored incorrectly

Environment Information

  • leafmap version: 0.2.0
  • Python version: Python 3.9.4
  • Operating System: Ubuntu 18.04.2 LTS

Description

Dear Professor Wu,
I would like seek your help on properly coloring geospatial features via leafmap. I was able to color the features, but the color were incorrect.
***edited ***
Looks like the fill_colors is supposed to randomly fill color, since the code document said,
"fill_colors (list, optional): The random colors to use for filling polygons. Defaults to ["black"]."

What I Did

1. create a basemap as m

2. Define geojson file path

file is available here

Testing.geojson.zip
file_path = os.path.join(folder, 'Testing.geojson')

3. read geojson for extracting color list at #4

gdf = gpd.read_file(file_path)
display(gdf)

4. Add geojson, with color list

m.add_geojson(file_path, layer_name="Test_Color", fill_colors=gdf['Test'])

Please see the attached images for demonstration.
I expected Maine to be shown in red, but it turns out green. In fact, the color pattern were random. If I rerun the code, the color sometimes changes.
屏幕快照 2021-06-11 上午10 47 28
屏幕快照 2021-06-11 上午10 47 16

Add streamlit support for heremap module

To add stseamlit support for the heremap plotting backend, we need to save the map as an HTML file. However, it seems the exported HTML lose the map controls (e.g., zoom control, fullscreen control). @sackh Any advice?

import leafmap.heremap as leafmap
from ipywidgets.embed import embed_minimal_html

m = leafmap.Map()
m

embed_minimal_html('heremap.html', views=[m])

image

The same method works fine for ipylealfet. The exported HTML has the map controls.

image

Add timeseries inspector

This feature extends the split-panel map feature to allow users to select layers from a dropdown list.

get the coordinates of a user-drawn polygon

First of all, congratulations Dr. Qiusheng for your fantastic work !

I became a 100% geemap user and one of the very useful functions when working with feature exploration (1) is to manually draw a polygon in an area of interest, (2) extract the coordinates with Map.draw_last_feature and then (3) export this polygon as a shapefile or even a featureCollection in the case of ee.

I looked for something similar in the leafmap but I couldn't find it, although it is possible to easily draw the polygon and see its individual points, but it seems to me that there is a lack of a similar routine to manipulate the coordinates extracted from the map.

That would be of great value.
Best wishes
Andre

Leafmap save image to static image (JPG or PNG) not working.

Environment Information

  • leafmap version: 0.3.0
  • Python version: 3.8.7
  • Operating System: MacOS Big Sur Version 11.2.3, jupyter-notebook : 6.3.0

Description

I'm trying to save the image as JPG or PNG but when I use the method m.to_image() it ends up taking a screenshot of my Desktop Background image.

What I Did

from leafmap import leafmap
m = leafmap.Map()
m  # map got rendered
 
m.to_image(outfile='./map.png') # run this command on another cell

Get user drawn features as a GeoJSON

Users can draw multiple features on the map. However, ipyleaflet can only return the last drawn feature. It would be useful to return all user-drawn features as a GeoJSON dict.

style_callback param for add_geojson() not working?

Environment Information

  • leafmap version: 0.5.0
  • Python version: 3.9
  • Operating System: Linux/macOS

Description

I want to use the style_callback parameter for map.add_geojson(), but the chosen style which sets only the color seems not to be respected. I think the style dicts are the same for ipyleaflet and leafmap, at least I could not find any contradictory information. See below.

import requests
data = requests.get((
    "https://raw.githubusercontent.com/telegeography/www.submarinecablemap.com"
    "/master/web/public/api/v3/cable/cable-geo.json"
)).json()
callback = lambda feat: {"color": feat["properties"]["color"]}
import leafmap
m = leafmap.Map(center=[0, 0], zoom=2)
m.add_geojson(data, style_callback=callback)
m.layout.height = "100px"
m

Screen Shot 2021-10-03 at 11 12 53

import ipyleaflet
m = ipyleaflet.Map(center=[0, 0], zoom=2)
m += ipyleaflet.GeoJSON(data=data, style_callback=callback)
m.layout.height = "100px"
m

Screen Shot 2021-10-03 at 11 14 14

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.