I am downloading a survey data from survey123.com by using GIS services however I am not able to create a widget on webapp to show it on ArcGIS webapp. I am not familiar with ArcGIS but here is the script I have written:
from arcgis.gis import GIS
import pandas as pd
def main():
gis = GIS("organization","id","password")
#search for the feature layer/service
featureLayer_item = gis.content.search(query="owner:" + gis.users.me.username,
item_type="Feature Layer",
max_items=15)
feature_layers = featureLayer_item[0].layers
flayer = feature_layers[0]
sdf = pd.DataFrame.spatial.from_layer(flayer)
return sdf
if __name__ == "__main__":
main()
If I run this code on PyCharm I am able to get results and see them, I tried it in different formats as well such as Excel, CSV. But I have no idea how to connect this script's output to webapp to see the points on the map.