POST
|
I have a field with space delimited values eg.: 26199 42448 42448 42454 42483 42497 Tried using pandas etc to explode, strip, split, etc. to list values and recreate as unique values to remove duplicates. Nothing seems to be stringing together to get my desired result: 26199 42448 42454 42483 42497 I have several thousand rows and need to check for duplicates for all of them, and then update the row values. Cheers, Craig
... View more
04-29-2024
12:23 AM
|
0
|
2
|
332
|
BLOG
|
Try placing one list in the Sidebar and the other in the Body of the Dashboard.
... View more
11-03-2022
03:28 PM
|
1
|
0
|
2175
|
POST
|
style="display:{expression/expr*} " Are you missing ; style="display:{expression/expr*};"
... View more
10-18-2022
08:34 PM
|
0
|
0
|
260
|
POST
|
Hi Luke, Here is the type of outcome I am after (not actual data but similar scenario): I have a large table of data (let's say car sales by dealer). I have done the stats to work out which vehicle type and style was sold in each colour. I know which is the maximum or dominant colour, and I am trying to capture that into a CSV document based on a ranking of colour. In the script you have been addressing, I am trying to capture the dominant colour under each vehicle style so that my CSV output 'write' is something like: csv_data = dealer, car, sedan_dom, wagon_dom, convertible_dom Section of my script that I am trying to capture final value of sedan_dom, wagon_dom and convertible_dom. if sorted_output[0][1] == '0': (captures null/zero tuples) dom = '0' else: most_significant_output = sorted_output[0] (captures ranked dominant tuple) dom = most_significant_output[0] (section where I need a variable in the loop to be named sedan_dom, wagon_dom, convertible_dom) Hope that might clear up what I am attempting to do. Might have just made it more confusing.
... View more
07-06-2022
10:01 PM
|
0
|
0
|
2112
|
POST
|
If print(colours[f"{colour}_dom"]) returns anothervalue and print(colours) returns {'red_dom': 'anothervalue'} How do return as 'red_dom' = 'anothervalue', so from my loop I can list the variable 'red_dom' etc. to equal the returned value such as: 'Name', 'Car', 'red_dom', 'blue_dom, 'green_dom' where 'red_dom', 'blue_dom, 'green_dom' are calculated number of coloured cars for example.
... View more
07-05-2022
10:26 PM
|
0
|
0
|
2124
|
POST
|
Hi, Trying to work out how to use a returned value to make a new dynamic variable name: returned value equals: 'Red' which is coming from another variable named {colour}. new variable name created equals: 'Red' + '_dom' = Red_dom I read about global() and local() but not sure if they are the correct approach. When I try 'Red' + '_dom' I get a string error returned by system. I will actually need something like {colour} + '_dom' to be the new variable name as {colour} changes within a loop. Regards, Craig
... View more
06-23-2022
08:46 PM
|
0
|
6
|
2192
|
POST
|
@Johannes, Your script interprets exactly what I am after, but I have one final issue. My list of tuple values 'lst' works for the majority of returned values, however I occasionally have the instance where the value sorted and ranked is incorrect such as below: lst = [['Rabbit', '7'], ['Dog', '3'], ['Bird', '17'], ['Cat', '0']] rnk_lst = ['Cat', 'Bird', 'Dog', 'Rabbit'] sorted_output = sorted(lst, key=lambda r: (r[1], rnk_lst.index(r[0])), reverse=True) print(f"sorted output: {sorted_output}") most_significant_output = sorted_output[0] print(most_significant_output[0]) sorted output: [['Rabbit', '7'], ['Dog', '3'], ['Bird', '17'], ['Cat', '0']]
Rabbit If the maximum value is ['Bird', 17] that is the value I expected, yet script equates Rabbit. Not sure why it works for most of analysis process, but trips up on a few response. Any ideas? Craig
... View more
06-02-2022
05:17 PM
|
0
|
2
|
1546
|
POST
|
Hi All, I have a dataset with four 'types' and their 'counts' for example: A = 4, B = 2, C = 0, D = 0 In order of ranking, D (is the most important) > C > B > A (lowest ranking). If I have an output with: A = 0, B = 1, C = 0 , D = 1 How do I script in Python to compare the string so that when B = D that the variable I capture will be D based on ranking? Regards, Craig
... View more
05-29-2022
08:05 PM
|
0
|
5
|
1618
|
POST
|
I have a table with five fields for sampling records and a sixth field for a mean/average value to be calculated in. I have used the Arcade command 'Average' within 'Field Calculator', but find it does not calculate a correct value when 0 values are recorded within some fields. Average($feature.fld0,$feature.fld1,$feature.fld2,$feature.fld3,$feature.fld4) Average(1,2,3,0,0) should equal (1+2+3) / 3 = 2, but the value I am getting is (1+2+3+0+0) / 5 = 1.2 What would be the expression to calculate the correct average value when some fields have 0 values (ie. exclude fields with a 0 value from the calculation)?
... View more
02-23-2022
08:54 PM
|
0
|
6
|
2377
|
POST
|
Hi @IsmaelChivite, When I use the form as laid above using only two points, the coordinates for both points are the same. I can't seem to move the second point coordinates. Regards, Craig
... View more
11-17-2021
02:55 PM
|
0
|
0
|
1694
|
BLOG
|
Hi @Anonymous User, Thank you for the quick response. I was planning to take a photo and later use it for annotation. I will direct users to browse their images to re-use the initial image. If the initial image is loaded for annotation, will the EXIF information still be stripped from the file? Regards, Craig
... View more
11-15-2021
04:40 PM
|
0
|
0
|
1029
|
BLOG
|
@Anonymous User, Is is possible to capture an image as a reference (camera function) and have it auto-populate another question for annotation by default (without having to browse from catalog/albums/folders)? Regards, Craig
... View more
11-15-2021
04:25 PM
|
0
|
0
|
1036
|
BLOG
|
How would I structure a calculation to use the current year (ie. 2021) to update a form where three fields have historical dates (ie. 2017 update to 2018; 2018 update to 2019; 2019 update to 2020)? This form will be used for a number of years and I was hoping that by using a calculation, I won't have to come back annually to revise and republish it. Regards, Craig
... View more
10-27-2021
10:07 PM
|
0
|
0
|
7078
|
BLOG
|
Just wondering if/when grid theme in web browser will be supported. Regards, Craig
... View more
10-27-2021
09:47 PM
|
0
|
0
|
426
|
Title | Kudos | Posted |
---|---|---|
1 | 11-03-2022 03:28 PM | |
1 | 05-24-2021 05:01 PM | |
1 | 12-02-2019 02:46 PM | |
2 | 11-01-2020 07:20 PM | |
1 | 10-05-2020 08:00 PM |
Online Status |
Offline
|
Date Last Visited |
04-30-2024
04:01 AM
|