#By Tobias Stalder #August 2020
library(scales)
eco_river_pal <- c("#d0ece7", "#a9dfbf", "#73c6b6", "#27ae60", "#117a65",
import arcpy | |
def ZoomToTargetBKMK(BookmarkNr): | |
aprx = arcpy.mp.ArcGISProject(r"CURRENT") | |
MapView = aprx.activeView | |
Map = MapView.map | |
TargetBkmk = Map.listBookmarks()[BookmarkNr] | |
print("Target bookmark: {}".format(TargetBkmk.name)) | |
MapView.zoomToBookmark(TargetBkmk) |
.libPaths | |
packages <- c("tidyverse", | |
"sf", | |
) | |
package.check <- lapply( | |
packages, | |
FUN = function(x) { |
import arcpy | |
aprx = arcpy.mp.ArcGISProject("Current") | |
m = aprx.listMaps("Map")[0] | |
layers = m.listLayers() | |
for layer in layers: | |
layer.visible = False |
# Rayshader basic workflow | |
# By Tobias Stalder | |
# October 2022 | |
# Creative Commons licence (Free to use - Reference Author in Code by Publication) | |
# libraries --------------------------------------------------------------- | |
memory.limit(size=4000000000) #set memory limit |
import geopandas as gpd | |
import pandas as pd | |
import numpy as np | |
from matplotlib import pyplot as plt | |
#set pandas options so that all column names are diplayed when printes | |
pd.set_option('display.max_columns', None) | |
pd.set_option('display.max_rows', None) | |
######load gdb with arcpy and convert to pd dataframe######### |
# work with arcpy in Rmarkdown or Rscript using reticulate | |
#set up python version in R | |
```{r} | |
library(reticulate) | |
use_python("C:/Python27/ArcGIS10.7/python.exe", required = TRUE) | |
``` | |
#check Sysinfo | |
```{python engine.path="C:/Python27/ArcGIS10.7/python.exe"} |
#a snippet for quick plots of LIDAR data in ggplot2 | |
#Tobias Stalder | |
#June 2021 | |
#load libraries | |
library(tidyverse) | |
library(rlas) | |
library(gg3D) | |
#load data |
#By Tobias Stalder #August 2020
library(scales)
eco_river_pal <- c("#d0ece7", "#a9dfbf", "#73c6b6", "#27ae60", "#117a65",