Skip to content

Instantly share code, notes, and snippets.

View matt-sandgren's full-sized avatar

Matt Sandgren matt-sandgren

  • Fulton County Government (GA)
  • Atlanta, GA
View GitHub Profile
@matt-sandgren
matt-sandgren / write.socrata_draft.R
Created March 18, 2020 19:33
Data Management API write function
# ------------------------------------------------------------------------------
# Helper function to create the file to POST to the source
#
# I'm letting either a dataframe or a path to a file be passed. I thought it may
# be possible for a situation where tempfile() fails to arise. Maybe on a server
# on an account with no write permissions?
#
# If a path is passed, return the uploaded file.
#
# If a dataframe/tibble is passed, create a tempfile for the upload and return