POST
|
Hi Kenta, I know this is old but did you ever resolve this issue? Cheers
... View more
02-23-2021
06:37 PM
|
0
|
0
|
636
|
POST
|
Thanks for your help guys. I've been doing some testing and seems to rendering the graph that is the problem. If I comment out line 40 ie. no graph displayed it works fine. But the script. including graph works in r studio (without tool_exec <- function...) Here is the code I've been testing. Which the ArcGIS Toolbox script points to ################################################################################
### Interactive R and Arcgis Example
################################################################################
tool_exec <- function(in_params, out_params){
arc.progress_label("Loading packages ...")
arc.progress_pos(10)
library(shiny)
library(dplyr)
################################################################################
### Load Data
################################################################################
arc.progress_label("Loading data ...")
arc.progress_pos(20)
Year<-c(2000,2001,2002,2003,2000,2003,2000,2000,2005)
Dwells<-c(50,20,25,26,27,300,100,80,100)
df_test <- data.frame(Year,Dwells)
################################################################################
### Load App
################################################################################
arc.progress_label("Starting App ...")
arc.progress_pos(50)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(sliderInput("Explore_Years", 'Select years to explore',
min=2000, max= 2005,value = c(2000,2005),sep='')),
mainPanel(textOutput("text_out")
, tableOutput("table_out")
, plotOutput("graph_out") #####<<<< Works if comment this line out#######
)
)
)
server <- function(input, output) {
Summary_test<-reactive({
df_test%>%
filter((Year >= input$Explore_Years[1]),
(Year <= input$Explore_Years[2]) ) %>%
group_by(Year)%>%
summarize(Dwellings = sum(Dwells))
})
output$text_out <- renderText({paste ("You have selected minimum year ",input$Explore_Years[1])
})
output$table_out <- renderTable({Summary_test()
})
output$graph_out <- renderPlot({
plot(Summary_test()$Year,Summary_test()$Dwellings)
})
}
runApp(list(ui = ui, server = server))
}
... View more
09-12-2019
07:14 PM
|
0
|
0
|
2756
|
POST
|
Thanks,Orhun I'm on windows computer so setrlimit is not an option. Do you have any other ideas? Cheers
... View more
09-12-2019
03:57 PM
|
0
|
1
|
2756
|
POST
|
I have a toolbox containing an R script that creates a shiny app. When I run the script the app begins to render in a browser but then goes grey and I get an error saying 'c stack close to limit' The script works fine in rstudio and is based on this bridging-R-ArcGIS/interactiveKriging.R at master · BenGraeler/bridging-R-ArcGIS · GitHub Any ideas?
... View more
09-12-2019
04:20 AM
|
0
|
5
|
3679
|
POST
|
After seeing this duplicate question arcGIS Pro Extents in the Viewing Pane Joshua Bixby which i missed yesterday it seems you need to save the aprx first and use defaultCamera aprx=arcpy.mp.ArcGISProject("CURRENT")
mapView = aprx.listMaps()[0]
mapExtents=mapView.defaultCamera.getExtent()
mapExtents.lowerLeft Pan around and save the aprx then mapExtents=mapView.defaultCamera.getExtent()
mapExtents.lowerLeft Gives you the current extents (in this case the lower left extents). Seems like a bug /missing feature
... View more
03-07-2018
01:25 PM
|
2
|
5
|
4542
|
POST
|
Thanks Dan but it looks like this only works for map frames in layouts. I'm looking for the current extent of the map (what would be a dataframe in 10.3). So in 10.3 you might do this mxd = arcpy.mapping.MapDocument("CURRENT")
df=arcpy.mapping.ListDataFrames(mxd)[0]
extent = df.extent
... View more
03-06-2018
10:17 PM
|
0
|
7
|
4542
|
POST
|
In the transition from arcpy.mapping to arcpy.mp there doesn't seem to be a way to get the extent (in order to calculate the center) of the current map.The camera extent only applies to layouts and MapFrames. Does anyone know how to get around this? Something like aprx=arcpy.mp.ArcGISProject("CURRENT")
mapView = aprx.listMaps()[0]
extent = mapView.extent Is this possible in pro?
... View more
03-06-2018
04:39 PM
|
2
|
10
|
6978
|
Title | Kudos | Posted |
---|---|---|
2 | 03-07-2018 01:25 PM | |
2 | 03-06-2018 04:39 PM |
Online Status |
Offline
|
Date Last Visited |
02-23-2021
09:19 PM
|