Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Feature]: MMGIS Python module for Jupyter Notebooks #551

Open
fcalef opened this issue Jun 12, 2024 · 0 comments
Open

[New Feature]: MMGIS Python module for Jupyter Notebooks #551

fcalef opened this issue Jun 12, 2024 · 0 comments
Labels
enhancement For making an existing feature better

Comments

@fcalef
Copy link
Collaborator

fcalef commented Jun 12, 2024

Checked for duplicates

Yes - I've already checked

Alternatives considered

Yes - and alternatives don't suffice

Related problems

A lot of Earth Science and some Planetary Science datasets are now accessed primarily via Jupyter notebooks. There's no direct way to transfer results from Jupyter notebooks (e.g. from a query or analysis) into MMGIS for broader sharing with a research team or expose that data to other MMGIS tools (e.g. Identify or Measure tool).

Describe the feature request

Create an MMGIS Python module that works within a Jupyter notebook and can share data with an MMGIS instance or grab layers from an MMGIS instance.

Notebook to MMGIS pseudocode:

import earthaccess
import xarray as xr
import webbrowser
import mmgis

auth = earthaccess.login()
map = mmgis.login(uuid)

results = earthaccess.search_data(
    doi="10.3334/ORNLDAAC/2056"
    bounding_box=(-100,20,-90,40_.
    temporal=(2010,2020)
)

ds = xr.open_mfdataset(earthaccess.open(results)

map.mmgis.openXR(ds,bounding_box,temporal)
webbrowser.open_new(map)

MMGIS data to Notebook pseudocode:

from ipyleaflet import Map, basemaps, basemap_to_tiles
import mmgis
map = mmgis.login(uuid)

m = Map(mmgis.map2D(map))
# or
baselayer=mmgis.layer(map,"HiRISE basemap")
center=mmgis.map2D.center
zlevel=mmgis.map2D(map).initZ
m = Map(baselayer,center,zlevel)

m
@fcalef fcalef added the enhancement For making an existing feature better label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement For making an existing feature better
Projects
Status: No status
Development

No branches or pull requests

1 participant