Questions tagged [jupyter-notebook]

Open-source web application for creating and sharing documents that contain live code, equations, visualizations and explanatory text.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Accessing organization AGOL from Jupyter notebook

I would like to access my content in my university's AGOL portal using Jupyter notebooks running on chrome in the Anaconda environment. I have installed the ESRI ArcGIS package in that environment. ...
0
votes
0answers
21 views

Getting an error during run map function

I am trying to run this simple code in jupyter notebook: from arcgis.gis import GIS gis=GIS() map = gis.map("San Diego, CA") map but I get an error that says: AttributeError: 'Geocoder' ...
0
votes
0answers
18 views

Snappy not importing to Python

I downloaded SNAP, but mostly just because I want to mess around with Snappy. I see the Snappy executable file in the bin folder after the installation, but I can't call the module when I try to ...
1
vote
0answers
22 views

Creating new Python Script tool with ArcGIS Notebooks

I am trying to create a new tool in ArcGIS Pro that is based on a python script written in the Jupyter Notebook interface. I realize I can write the script elsewhere and save it as a *.py file and ...
0
votes
0answers
20 views

geopandas.to_crs(epsg=3395) does not work in jupyter notebook. it seems some mismatch with pyproj & geopandas versions?

After importing geopandas df , with epsg =4326, I tried to re project it to epsg =3395 using gdf.to_crs(epsg =3395) in jupyter python note book. I got error "RuntimeError: b'no arguments in ...
2
votes
0answers
54 views

Using PyQGIS functions outside QGIS

I want to use PyQGIS function crs.isValid() in normal Python file outside of QGIS like this: wkt = 'GEOGCS["WGS84", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298....
4
votes
0answers
72 views

Error while doing Watershed analysis using Python

I am trying to do watershed analysis using Python in jupyter notebook. Whenever I am passing commands regarding watershed delineation in Python I am getting output as raster matrix and when I am ...
0
votes
1answer
87 views

Downloading RGB Sentinel-2 with Google Earth Engine and Python

I am fairly new to the Google Earth Engine platform, and I want to create a dataset for my machine learning project using the aforesaid platform. As far I have this code for downloading a single ...
0
votes
0answers
21 views

How to rotate a Contextily basemap in matplotlib and Jupyter notebook

I asked this question on Stack Overflow because I thought the Jupyter Notebook and matplotlib aspects were better suited for that forum, but I didn't have any luck; it is also a geopandas and ...
0
votes
1answer
59 views

Request Sentinel1 data with sentinelhub API doesn't work

I'm trying to acess Sentinel1 images using sentinelhub API with Jupyter lab notebook. I'm getting error messages and I don't understand why I get them. This is how I try to acess umages with IW (as ...
0
votes
0answers
314 views

Can’t import any python modules in Jupyter notebook with newly created environment, ImportError: DLL load failed: specified module could not be found

(base) C:\WINDOWS\system32>conda activate agrodss (agrodss) C:\WINDOWS\system32>python Python 3.7.7 (default, May 6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type &...
0
votes
0answers
126 views

Mapping multiple circle markers in a single layer with ipyleaflet and jupyter

How do I show multiple circle markers with ipyleaflet in jupyter? I want to add them all as one layer (not individual layers) and I do not want to use the MarkerCluster class. The documenation only ...
0
votes
0answers
16 views

Invalid UUID string in sentinelhub when tryng to access satellite image

I'm trying to use sentinelhub package on jupyterlab notebook and for some reason I don't manage to be able to acess images. When I use my credentials in the configuration at the beginning it works and ...
1
vote
0answers
31 views

Loss of Jupyter notebooks in ArcGIS Pro after installing Deep Learning modules

I've managed to break the ability to use Notebooks in ArcGIS Pro by installing the deep learning modules in a cloned environment. These are the dependencies: conda install -c esri -c fastai -c pytorch ...
1
vote
0answers
8 views

Rasterio showing a blue (blank) image wrong [closed]

I am trying to open a raster in my Jupyter Notebook using rasterio. I began with two Landsat 8 images, which I processed in QGIS to calculate the NDVI. I want to plot the original images used for the ...
1
vote
1answer
105 views

Rasterio doesn't show the coordinates when using “imshow ”

I have sentinel 2 image and I use rasterio to display it. I am using "imshow" to display it. when I display it, it doesn't show any coordinates: src=rasterio.open('14072020.tif') #Display ...
2
votes
1answer
33 views

Using external table to iteratively change parameters into ArcPy code

I am working with Python 2.7 and ArcPy under Jupyter notebook environment. I would like to adapt iteratively my code to a reference table. This is my reference table which contains the 3 variables ...
0
votes
0answers
27 views

Is there a way to plot Triangulated Irregular Networks (TIN) in R Jupyter notebooks?

I was wondering if it is possible to plot TINs (Triangulated Irregular Networks) in Jupyter plots (with R kernel)? I use R's sf package (in conjunction with PostGIS) and ggplot2 in Jupyter to plot ...
4
votes
1answer
316 views

Measuring compactness in Python [closed]

I have set of polygons whom I would like to check their compactness. I'm working in Jupyter Notebook and my geometry is GeoPandas. I would like to try Polsby-Popper test and Schwartzberg test (and ...
2
votes
1answer
33 views

Saving created .kea files

I have the following script that converts a list of .tiff files in the working folder to .kea files using gdal_translate. When I run the script in the command line it works fine and creates the .kea ...
1
vote
0answers
20 views

Plot areas in ArcGIS on Juypter

I'm trying to plot a filled area from an sdf, but no matter my settings, I seem to just get an outline of the shape with a green dotted line. I've tried with a code sample from https://developers....
1
vote
0answers
65 views

Cannot execute gdalwarp in a Python notebook

I try to reproject a raster using gdalwarp. To do so I use the subprocess package of Python3 : command = [ 'gdalwarp', map_raster, map_raster_proj, '-t_srs', 'ESRI:54009' ] print(' '....
0
votes
0answers
44 views

Plotting polygon bounding box using ArcGIS API for Python

I have a layer of polygons and would like to be able to plot the extent boundary rectangle on a map. I have my polygons in a Spatially Enabled DataFrame (polygonSDF = poygonFeatureSet.sdf) that I can ...
0
votes
0answers
30 views

Including weighted values in zonal statistics using stand-alone PyQGIS script

I am having trouble to include the (spatial) weight of a pixel when using zonal statistics in a stand-alone python script (jupyter notebook 6.0.3 on Ubuntu 18.04.5). My data contains of a .tiff (...
0
votes
0answers
132 views

Runtime disconnects in Google Colab when rendering Folium maps

I'm creating a figure in Google Colaboratory with folium. But when I try to output the figure using display() the runtime disconnects even though the html file of the figure, which I save using map....
0
votes
0answers
63 views

ArcGIS Python API zoom_to_layer() attribute error

I am working with the ArcGIS API for Python mapping widget within the ArcGIS jupyter notebook environment. I've successfully connected to my organization's enterprise portal, grabbed content, mapped ...
0
votes
1answer
60 views

ArcGIS API for Python geometric filter of feature layer producing Runtime Error: 'geometry parameter invalid'

I am trying to select a handful of features from an Enterprise Portal feature layer using the ArcGIS API for Python. Specifically I am trying to do a spatial selection, where the selected features are ...
1
vote
1answer
111 views

Adding query layer to MapView in Jupyter Notebook returns “RuntimeError: Cannot infer layer: will not be added to map”

I am working within a Jupyter notebook, trying to display a query layer (querying a SQL database) into a map view within the notebook. I receive a Runtime Error (described below) when I try to add ...
1
vote
1answer
1k views

`folium.GeoJson` displays all polygons in GeoDataframe but not individual ones

folium.GeoJson displays all the counties of New York State: import geopandas as gpd gdf = gpd.read_file("Counties_Shoreline.shp") m = folium.Map(location=[43.062776, -75.420884], tiles="...
1
vote
1answer
111 views

Display a gee featureCollection on a leaflet map

I'm using the python GEE api and ipyleaflet in a Jupyter Notebook and I'd like to retrieve an asset (FeatureCollection) and display it as an overlay on my map. The retrieving work just fine ...
0
votes
1answer
38 views

Regenerate an isochrone through a widget in CARTOframes

Is there a way to re-generate an isochrone in a CARTOframes map from some kind of user interaction? For example, modify the minute's value: isochrones_gdf, _ = Isolines().isochrones(stadiums_df, [15*...
0
votes
0answers
214 views

Matplotlib Basemap how to set EPSG to be consistent with new version of pyrpoj

I am getting a Matplotlib Basemap error related to pyproj and setting the EPSG. (I know Basemap is being depreciated, but this is what I am working in for now.) As a result, I can't plot the ...
0
votes
0answers
46 views

Shapefile extremely slow to read in Jupyter Notebook

I have a shapefile of Phoenix, AZ of size 172mb which I am loading in to the Jupyter notebook. It's a extremely slow process to read the file in. I am running the notebook on locally and the files are ...
1
vote
1answer
27 views

How to deal with several markers in the same location on a map, e.g. to let viewers know they're there, and regarding tooltips with different info

I've created a web map. There are several markers on it, each representing something, and a tooltip shows related info. Several markers are in the very same location (lat, lon). So there are two ...
0
votes
0answers
19 views

RAM Problem When Loading HDF Datasets

I am trying to store my labels and features datasets extracted from 324 patches in an HDF file because loading them (labels and features) directly from the patches was failing since the RAM hits its ...
0
votes
1answer
88 views

Python code speed execution problem

I am trying to retrieve data from 324 eopatches I sampled beforehand. Patches are basically numpy arrays as explained in this documentation EOPatch. This is an example of the content of a patch after ...
1
vote
0answers
54 views

KeyError: 'BANDS' and NameError: 'bands'

I am trying to follow this tutorial: land cover fastai And while executing the workflow, I got this error: eopatch 0 has been processed! ---------------------------------------------------------------...
0
votes
1answer
843 views

ValueError: too many values to unpack (expected 2)

I am trying to follow this tutorial: land cover fastai And while executing the workflow, I got this error: This is the code where the error occurs: def png_gen(patch, inference=False): """Save ...
0
votes
0answers
23 views

Table to Table works differently when implemented in Jupiter Notebook and ArcMap

I tried to import a lot of tables from geodatabase to .csv to later work with them. I encountered strange values and decided to do it manually for one table through the ArcMap interface. Everything ...
0
votes
0answers
48 views

Standardization, or mean removal and variance scaling of remote sensing data

I am trying to follow this tutorial Tree Cover Prediction Using Deep Learning. The following sample code is aimed to standardize the data. img_mean = np.mean(x_train_raw, axis=(0, 1, 2)) img_std = np....
0
votes
0answers
43 views

Set GDAL version used by virtual enviroment in python

How can I make Python 3.6.9 point to a specific version of GDAL (2.1.3 instead of 2.4.1)? I'm working in a jupyter notebook, in a virtual environment in an Ubuntu machine. Trying to import osgeo I ...
0
votes
1answer
39 views

Transforming an image (TIFF) into an array

I found the following code for crop classification and I am trying to understand it. # We have 10 images and 5 bands for each image so we’ll have a total of 50 columns in our data frame # we’ll ...
0
votes
1answer
473 views

Reading .tiff data using Python

I got none type while trying to open those tiff data. What issue could it possibly be? I tried this: import glob images_tiff = [] for im in glob.glob(os.path.join(data_path, "*.tiff")): im = ...
0
votes
0answers
78 views

Transforming CRS to UTM using Python

I am trying to transform CRS to UTM using a GeoJSON file. This is what I tried: from sentinelhub import CRS country_crs = CRS.UTM_32N country = country.to_crs(crs={'init':CRS.ogc_string(country_crs)})...
0
votes
0answers
94 views

Why doesn't qgis work in jupyter notebook even though they are in the same environment?

I use anaconda for managing my packages. I installed jupyter notebook a while ago but just installed qgis from anaconda cloud using 'conda install -c conda-forge qgis' and it worked. I have ...
2
votes
0answers
485 views

ipyleaflet not showing map in JupyterLab

I've done conda install ipyleaflet and then conda install -c conda-forge ipyleaflet but when I run: import ipyleaflet map1 = ipyleaflet.Map(zoom=3, layout={'height':'400px'}) dc = ipyleaflet....
0
votes
1answer
147 views

ipyleaflet with GEE in JupyterLab doesn't show layer

I'm trying to run the interactive map example for GEE community - Python API on JupyterLab (https://github.com/gee-community/ee-jupyter-contrib/blob/master/examples/getting-started/display-interactive-...
1
vote
0answers
59 views

Re-occuring errors in my JupyterLab environment because of instillation errors in anaconda?

I use python in the JupyterLab notebook environment through anaconda3 for my coding. I recently encountered a Runtime Error when trying to set the CRS for a geodataframe and from my research online it ...
1
vote
1answer
175 views

Setting up Anaconda 2 with ArcPy

I want to run Jupyter Lab (Notebook) with ArcPy. I have ArcMap 10.7 with Python Version 2.7.15, Numpy=1.9.3, matplotlib=1.5.2. I followed the instructions from the following link: https://gisday....
2
votes
1answer
350 views

how to display a ee.Feature using folium?

I try to display a country delimitation in a jupyter notebook using folium. I try the following code #load country from LSIB countries = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017'); #subset the ...