Closed smalers closed 4 years ago
The TSTool SetInputPeriod
allows functions on time. See the DateTime
class near line 2620. This is not exactly applicable but may provide some insight. When doing string searches, use a start position and keep moving that forward. Look for end position of )
, process what is between start and end, and then jump forward to the end and continue processing.
I enabled graphs for municipality population using the marker layer. However, it is not behaving as I expect. In the graph configuration file, I have syntax like:
"TSID" : "Muni:${featureAttribute:MunicipalityName}.DOLA.Population-Total.Year~dv~ts/Muni_${featureAttribute:MunicipalityName}.DOLA.Population-Total.Year.dv",
This indicates that the value of the property MunicipalityName
in the layer should be inserted. This seems to work. However, I tried other property names and they also work. Is the code always using the first property in the layer property list? This should not be how it works because the desired attribute for the data file may not be the first property. It coincidentally worked for county name in the counties layer.
Also, unfortunately, all of this design assumes that the attribute values in the layer file are going to match values in other data such as time series. This may not be the case for some data and additional manipulation of attribute values may be needed to align the data. I'll know more once we get counties and municipalities working.
Also, if the click popup shows a lot of attributes, it is necessary to scroll to the bottom to see the graph button which is irritating. We'll need to add filters for attributes shown so this is cleaner. Now that the attribute table for a layer can be viewed, we can trim down the popup to only useful information and action objects such as links and buttons.
I am going to need the features in this issue to fully test because there are some nuances.
The toMixedCase
code is not correct. It does not work for all uppercase input like RIO GRANDE
because it only changes the first character. The entire word should be lowercase except for the first character of the word. I changed the code to test and it works, but I'm not going to commit.
Another case is Mount Crested Butte
municipality. The logic does not loop through all the words. See the following image. I discovered this because there are Crested Butte
and Mount Crested Butte
municipalities and I had to fix a query.
This is working. May add more modifier functions later. Close the issue.
I have been updating the county population data and graph configurations for the Poudre application. Unfortunately, different datasets use different variations on county name, such as
SAN JUAN
,San Juan
, andSanJuan
. The first is sometimes found in data. The second is nicer and better-suited for UIs, and the third is useful for file and URL paths to avoids space. Unfortunately, I now have the situation where a popup is configured to display a graph and uses county nameSanJuan
but the layer usesSAN JUAN
. This may come up more in the future because a map layer attribute does not agree exactly. I recommend that the following notation be allowed in the graph configuration file (the json from TSTool). Consider the following example for the existing design:I recommend that the following notation is supported, with the following design:
${ }
can be modified by appending one or more functions using.( )
notation. This allows those functions to have parameters to control the function's behavior.SAN JUAN
is translated intoSanJuan
.