Ajouter des variables de niveau (Outils Conception de sectorisation)
Résumé
Ajoute un nouveau champ au niveau spécifié.
Utilisation
Les champs ajoutés sont basés sur un champ numérique du niveau figurant au-dessous du niveau de sectorisation et calculés en fonction du type de statistique spécifié.
La variable est ajoutée à n’importe quel niveau au-dessus de la base ou du niveau d’alignement (0).
Tous les champs numériques sont pris en charge.
Paramètres
Etiqueter
Explication
Type de données
Solution de sectorisation en entrée
Solution de sectorisation en entrée.
Group Layer; Feature Dataset; String
Niveau
Niveau auquel le champ calculé est ajouté.
String
Niveau de base
Niveau figurant sous le niveau de sectorisation auquel la valeur de l’attribut est ajoutée.
String
Variables
Les variables suivantes seront ajoutées au niveau.
Colonnes de la table de valeurs :
Statistic Field —The field that will be used for the statistical calculation.
Statistic —Type of statistical calculation.
Count —The number of values included in the calculation will be identified.
Sum —The values for the specified field will be added together.
Maximum —The largest value for the specified field will be identified.
Minimum —The smallest value for the specified field will be identified.
Average —The average of the values for the specified field will be calculated.
Median —The median of the values for the specified field will be calculated.
Standard Deviation —The standard deviation of values for the specified field will be calculated.
Percent of Total —The percentage of each value for the specified field will be calculated from the total sum of the values for the field.
Field Name —Valid name of the field on the level where the calculated data will be stored.
Field Alias Name —Readable and understandable name of the calculated field.
Value Table
Sortie dérivée
Etiqueter
Explication
Type de données
Solution de sectorisation mise à jour
Solution de sectorisation mise à jour.
Group Layer
arcpy.td.AddLevelVariables(in_territory_solution, level, base_level, variables)
Nom
Explication
Type de données
in_territory_solution
Solution de sectorisation en entrée.
Group Layer; Feature Dataset; String
level
Niveau auquel le champ calculé est ajouté.
String
base_level
Niveau figurant sous le niveau de sectorisation auquel la valeur de l’attribut est ajoutée.
String
variables
[[statistic, statistic_field, field_name, field_alias_name],...]
Les variables suivantes seront ajoutées au niveau.
Colonnes de la table de valeurs :
Statistic Field —The field that will be used for the statistical calculation.
Statistic —Type of statistical calculation.
COUNT —The number of values included in the calculation will be identified.
SUM —The values for the specified field will be added together.
MAXIMUM —The largest value for the specified field will be identified.
MINIMUM —The smallest value for the specified field will be identified.
AVERAGE —The average of the values for the specified field will be calculated.
MEDIAN —The median of the values for the specified field will be calculated.
STANDARD_DEVIATION —The standard deviation of values for the specified field will be calculated.
PERCENT_OF_TOTAL —The percentage of each value for the specified field will be calculated from the total sum of the values for the field.
Field Name —Valid name of the field on the level where the calculated data will be stored.
Field Alias Name —Readable and understandable name of the calculated field.
Value Table
Sortie dérivée
Nom
Explication
Type de données
out_territory_solution
Solution de sectorisation mise à jour.
Group Layer
Exemple de code
Exemple d’utilisation de la fonction AddLevelVariables (fenêtre Python)
Le script de la fenêtre Python ci-après illustre l’utilisation de la fonction AddLevelVariables.
import arcpy
arcpy.td.AddLevelVariables("TD", "Territory[1]", "BaseLevel[0]", "populationtotals_totpop_cy SUM TotalPopulation 'Total Pop'")
Environnements
Espace de travail courant
Informations de licence
Basic: Nécessite Business Analyst
Standard: Nécessite Business Analyst
Advanced: Nécessite Business Analyst