Faces of GIS¶
This sample notebook tries to re-create Esri's Faces of GIS Flickr stream using public ArcGIS Online profiles.
It iterates over a list of common last names from a .csv file and searches ArcGIS Online for users matching those last names. Then it displays the user's profile if the users' profile contains a thumbnail.
Organization administrators can search for members in their ArcGIS Online organization or an internal portal in a similar manner and update their properties as needed.
Note: To run this sample, you need the
pandas library in your conda environment. If you don't have the library, install it by running the following command from cmd.exe or your shell
conda install pandas
import pandas as pd from arcgis.gis import GIS from IPython.display import display
To run through the sample, we prepare a .csv file that contains a list of common last names. Then we use a Python data analysis library called pandas to read the file as input to do a search for users from ArcGIS Online.
df = pd.read_csv('data/lastnames.csv') df[:3]
gis = GIS() for index, row in df.iterrows(): if index == 6: break users = gis.users.search(row['Surname']) for user in users: if user['thumbnail'] is not None: display(user)
Feedback on this topic?