Adding data to a feature service via script

The use of Raspberry Pis are increasingly common in schools – especially in STEM, Maker, and field experience courses.  Raspberry Pis (version 4 at the time of this blog) hold the computing power of a laptop – at a fraction of the cost.  They can also run off of 5V battery power and have wifi built-in.  In short, they can useful for collecting data in and around school.  Oh, and did I mention there are dozens if not hundreds of cheap sensors that can be plugged directly into the device for data collection?


This isn’t a new technique at all, but we are seeing more sensors and increased computing capacity within the Pi platform – making it increasingly interesting.  I started writing on this about two years ago.  You can see how far we’ve come in that time.

By way of a quick example, I created a Survey123 form with a grade (numeric) and short name (text) fields.  I set the permissions to allow anyone to contribute data (without logging in).  Survey123 creates some ArcGIS Online components for you when you create a new survey.  Here, I’m only going to focus on the “field_worker”  feature service it creates.  Using a little Python code and the point layer’s “Add Feature” REST functionality, I can send data directly into my field_worker feature service with a few lines of code.  In this case, that code looks like:

import requests
import json

url = ''
params={"f":"pjson","token":"","rollbackOnFailure":"false","features":'{"attributes" : {"shortname" : "test_user_name"}}'}
x =, params=params)

In the first two lines we import two basic Python libraries (json and requests). In the next line, we identify the URL of the “Add Feature” function associated with our feature service’s REST endpoint. Parameters allow us to specify the data to pass.  You’ll see a few non-attribute parameters like “f”, “token”, and “rollbackOnFailure”.  For starting out, just keep these as-is and change the attribute “short name” to the attribute in your feature service.

As my colleague, @Kylie has noted, this code can also be converted to run inside of a webhook tool like Microsoft Power Automate or Integromat (using the HTTP module).  In a webhook-based case, you may be using the script (with a different endpoint) to update a feature service’s data rather than just adding it.

If you or your students are into the STEM, Maker, coder, or IoT learning scenes, be sure to turn on your students’ ArcGIS Online Notebook access and check out the Python API!

2019 NCSS NCGE Presentations

For the moment, this is a placeholder page that will eventually house presentation resources for my three co-presentations.

  • Baker, T.R., Jo, I, Duke, B. (Nov). Advance Your Geospatial Technology – Empowered by Your Curriculum Standards. 
  • Palmer, A. & Baker, T.R. Interactive Mapping Infuses Geography Across the Curriculum. 
  • Shin, E., Bednarz, S., & multiple presenters. (Nov). Panel on Spatial Citizenship. CUFA/NCSS. 


GIS Day presentation with Missouri Social Studies Teachers

This page has links and resources from the presentation to the Missouri Social Studies teachers on November 12, 2019,. in Jefferson City, MO.


Key URLs:


Tech Enabled Field Studies, Third Edition

The latest from Carte Diem Press is a Third Edition of this popular book from Tom and Roger on field studies includes the technology and how to information to implement into many settings. The 3rd Edition includes drones, programming, Raspberry Pi, and updated workflows… and an online companion.

We created this resource for educators who want to do research with learners –typically classroom teachers working with their students in Earth Systems or Environmental Science, Geography, or History.  The book would also be useful to those running outdoor education or field research programs for students of all ages; however, as the title suggests, we do focus on tech-enabled methods, tools, and analysis.  Most of the content assumes that the research will be conducted outside or “in the field”. We believe it will provide powerful justification to include these projects in your classes. we believe this volume would make a great addition to any reference library on field research techniques.

Order at GISetc. >>

Spatial Citizenship Education

I’m delighted to share a chapter with Curtis and Millsaps in this new book from Shin and Bednarz! sce_book

Spatial Citizenship Education: Citizenship through Geography (Shin and Bednarz, 2019) is the inaugural book exploring the contribution of geographic education (and geographic technologies and spatial thinking) to the development of the citizen.  It describes citizenship development through a rich understanding of spatial and geographic narratives. The book includes a history of geographic education as well as theoretical and conceptual elements of the work of geography education. Geography teachers, teacher educators, and GIS education researchers should consider this volume as a critical contribution to their well-rounded library.


Chapters include:

  • Conceptualizing spatial citizenship
  • Geography as a social study
  • Geography, capabilities, and the educated person
  • The spatial production and navigation of vulnerable citizens
  • Citizenship education in a spatially enabled world
  • Rediscovering the local
  • Cultivating student citizens
  • Geotechnologies and the spatial citizen
  • Informed citizenry starts in the preschool and elementary grades – and with geography
  • Spatial citizenship in the secondary geography curriculum
  • Spatial citizenship in the geography/social studies teacher education


Amazon link to the book.