Geographic Information Systems Asked by R. Anderson on May 28, 2021
I would like to query a feature service and retrieve statistics grouped by year. The problem is I don’t have a year field, only a date field. Is there a way to convert the date field into a year field? It needs to be live updating since this will be used in an app and a feature service that is constantly getting new records.
My current python code that works with an existing group-by field:
queryParams = {
'f': 'json',
'where': "1=1",
'outStatistics': "[{'statisticType': 'sum','onStatisticField': 'RDM_lbsac', 'outStatisticFieldName': 'RDM'}]",
'groupByFieldsForStatistics':'Plot_Number'
}
response = requests.post(url = fsURL, params = queryParams)
I could load in a spatial dataframe using the Python API, but the data set is large and this would take a lot of time every time the app loads.
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP