POST
|
Almost four years later this is still unresolved. Even if after refreshing the page the problem dissappears it is a HUGE aesthetic issue for users when they access the dashboard the first time. This should be a priority
... View more
03-14-2024
05:04 AM
|
1
|
1
|
81
|
POST
|
6 years latter no updates on this? I want to show absolut value in axis but percentage in hover text, or use dates just with yyyy format in hover text, but this is still not possible. Could you please fix this?
... View more
04-24-2023
03:37 AM
|
3
|
0
|
1068
|
POST
|
As far as I know, there is no solution for a key issue like this. Managing hosted tables in AGOL is clearly improvable. The only workaround I know is deleting the old table, publishing the new table and replace the itemid of the table everywhere. I share the script. I hope it helps: # Importe las bibliotecas necesarias. from arcgis.gis import GIS, Item # Cree una conexión al usuario de ArcGIS Online o Portal for ArcGIS deseado. user = "XXXXXXXX" # introduzca el usuario deseado password = "XXXXXXXX" # introduzca la contraseña url = "https://www.arcgis.com" # cambie la URL de Portal si es necesario gis = GIS(url, user, password) me = gis.users.me my_items = me.items(max_items=500000) # ItemIDs old = "olditemid" new = "newitemid" carpetas = ['Name of AGOL folder where data is stored'] itemTypes = ['Dashboard'] # Help: https://developers.arcgis.com/python/sample-notebooks/clone-portal-users-groups-and-content/ folders = me.folders for folder in folders: carpeta = folder['title'] if carpeta in carpetas: print('__________________________________') print(' ') print('Carpeta: ' + folder['title']) print('__________________________________') print(' ') folder_items = me.items(folder=folder['title'],max_items=5000) if len(folder_items)>0: for item in folder_items: # Si encuentra algún itemid viejo printa el item, el número de veces que se accede a ese itemid y los sustituye if item.type in itemTypes: #print(item.title + '. Tipo: ' + item.type) itemid = item.id # Recupere los datos de la aplicación. app = Item(gis, itemid) appdata = app.get_data(False) # Saber el número de veces que se utiliza item viejo pattern = old count =0 flag=True start=0 if appdata != None: # Si no hay texto no entra al loop while flag: a = appdata.find(pattern,start) # find() returns -1 if the word is not found, #start i the starting index from the search starts(default value is 0) if a==-1: #if pattern not found set flag to False flag=False else: # if word is found increase count and set starting index to a+1 count+=1 start=a+1 if count > 0: print(item.title + '. Tipo: ' + item.type) print('Se han encontrado ' + str(count) + ' items viejos') # Ejecute el script para sustituir itemid viejo por nuevo en los datos de la aplicación. new_appdata = appdata.replace(old, new) # Comprobar si queda algún itemid viejo a sustituir count =0 flag=True start=0 while flag: a = new_appdata.find(pattern,start) # find() returns -1 if the word is not found, #start i the starting index from the search starts(default value is 0) if a==-1: #if pattern not found set flag to False flag=False else: # if word is found increase count and set starting index to a+1 count+=1 start=a+1 print('Tras la sustitución, quedan ' + str(count) + ' items viejos') # Actualice el elemento con la URL especificada en el paso 5 e imprima una sentencia de cierre. app.update({"text": new_appdata}) print("El item con nombre " + item.title + " ha sido actualizado con éxito") print(' ')
... View more
07-26-2022
03:04 AM
|
0
|
0
|
1235
|
POST
|
Thnak you Scott, I will have a look at link charts. Regarding to the data, I don't have duplicated data but I have flows from A to B and from B to A. Using python libraries I can use arrows to show the direction and each node appears just once, but Insights shows two A nodes (one for A as origin, and one for A as destination) and two B nodes. This is not acceptable.
... View more
01-05-2022
12:12 AM
|
0
|
0
|
349
|
POST
|
When I create a Chord diagram with Insights I select two fields (origin and destination) and I create a Chord diagram where the width of the links depends on a thirth field (value). The problem is that I have duplicated nodes. If I have flows between three countries, instead of three nodes I have six, because each country appears both as origin and destination. I also would like to show self links for flows with same origin and destination in the same place, but Insights create two different nodes with the same name. Any ideas on how to deal with this? I could to it with Python or R (https://jokergoo.github.io/circlize_book/book/the-chorddiagram-function.html), but I want to know if this option exists using ArcGIS Insights.
... View more
11-22-2021
04:54 AM
|
0
|
2
|
392
|
IDEA
|
This would be a nice improvement. In my case I have panels filled according to the selection in a list, but the default is no selection, so the panel appears empty when opening the Dashboard, which is inappropiate.
... View more
07-16-2021
12:29 AM
|
0
|
0
|
1375
|
POST
|
Thank you, but I already tried that, and it didn't work. I add the field to my hosted layer with no problem, but after the overwrite this new field dissapears again. The overwriting works fine from ArcGIS PRO if the original table was shared from ArcGIS PRO too, but when I try to overwrite a table in AGOL which was published from a CSV the overwriting doesn't create new fields.
... View more
05-07-2021
04:36 AM
|
3
|
1
|
1827
|
POST
|
I am trying to update a hosted table in AGOL (published from a CSV). The updated CSV has the same name and structure except a new field. When I try to update or overwrite the table, both manually from AGOL and using script with Python API the new field is not added to the hosted table. I also tried to add the field (both manually from AGOL and using 'Add field' in Python) prior to the overwritting but when I overwrite the new field dissapears. # Overwrite CSV oldcsv = gis.content.get('itemid') oldcsvFLC = FeatureLayerCollection.fromitem(oldcsv) oldcsvFLC.manager.overwrite('path') I attach a subset of old and new CSV as an example
... View more
04-12-2021
12:48 AM
|
2
|
6
|
1967
|
BLOG
|
I tried to call dist_cumu function from a calculate field expression and it worked fine: def dist_cumu(shape):
global x0
global y0
global distance
x = shape.centroid.X
y = shape.centroid.Y
if x0 == 0.0 and y0 == 0.0:
x0 = x
y0 = y
distance += math.sqrt((x - x0)**2 + (y - y0)**2)
x0 = x
y0 = y
return distance
with arcpy.da.SearchCursor(trazados, ['SHAPE@', 'OBJECTID', 'Nombre']) as cursor:
for row in cursor:
trazado = row[0] # Un trazado por fila
objectid = row [1]
nombre = row[2] # Saco el nombre de la columna nombre
# Valores a cero
x0 = 0.0
y0 = 0.0
distance = 0.0
#Pasar trazado a puntos
shape10m = arcpy.GeneratePointsAlongLines_management(trazado, inFolder + os.sep + 'temp/puntos10m_' + str(objectid), 'DISTANCE', Distance = distancia_ptos)
arcpy.AddField_management(shape10m, "Distancia", "DOUBLE", 10, "", "", "Distancia", "NULLABLE", "NON_REQUIRED")
arcpy.CalculateField_management(shape10m, "Distancia", 'dist_cumu(!Shape!)', "PYTHON") But when I run the script from a toolbox in ArcGIS PRO a message error appeared ('dist_cumu is not defined'). I tried this https://community.esri.com/t5/python-questions/best-way-to-pass-a-function-into-arcpy-calculatefield-management/m-p/319290 (codeblock and triple quotes) but then the message is "name 'xo' is not defined"
... View more
02-12-2021
03:27 AM
|
0
|
0
|
1318
|
Title | Kudos | Posted |
---|---|---|
1 | 03-14-2024 05:04 AM | |
3 | 04-24-2023 03:37 AM | |
2 | 04-12-2021 12:48 AM | |
3 | 05-07-2021 04:36 AM |