Giter Site home page Giter Site logo

jenmckinney / incident-import-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from esri/incident-import-tools

0.0 1.0 0.0 658 KB

Toolbox and scripts for importing spreadsheets to a gdb and optionally publishing out to ArcGIS Online or ArcGIS for Server.

License: Apache License 2.0

Python 100.00%

incident-import-tools's Introduction

##incident-import-tools

Toolbox and scripts for importing spreadsheets to a gdb and optionally publishing out to ArcGIS Online (feature service) or ArcGIS for Server (dynamic map service).

Geometry can be assigned to features using provided coordinate values in a known spatial reference system, or by geocoding an address associated with each incident.

These scripts can be scheduled using Windows Task Scheduler to automatically update the feature class and service.

Toolbox

Features

  • Publish features from a spreadsheet to an existing service using ArcGIS Online or ArcGIS for Server
  • Features can be located using addresses or coordinate pairs
  • Optionally, avoid creating duplicate records by update existing records and only adding new features to the service
  • Run the tools manually through ArcMap or ArcCatalog, or schedule them to run regularly using Windows Task Sceduler

Instructions

  1. Download and unzip these tools.
  2. Download and unzip requests-master.zip.
  3. Open requests-master and copy the requests folder into the scripts folder of the incident import tools.
  4. In ArcMap or ArcCatalog, open the Configure Incident Imports tool. Complete the parameters and click OK to create a configuration file storing these parameter values.
  5. Run the Import Incidents tool, using the previously created configuration file as input. Be default this configuration file is saved to the scripts folder, but it may be moved to another location if necessary.
  6. Examine the output messaging and reports for comments on failures and data errors.
  7. Optionally, set up Windows Task Scheduler to run import_publish_incidents.py automatically on a schedule with the configuration file as input.

Requirements

  • ArcGIS for Desktop

  • Requests module v2.2.1 for Python

  • ArcGIS Online organizational account or ArcGIS for Server if data is to be published (optional)

  • Tool imports spreadsheet data to a point feature class in a file, enterprise, or workgroup geodatabase with a similar schema. Only values in fields that exist in both the spreadsheet and feature class will be copied. Field names are case-sensitive.

  • Spreadsheet and feature class must have fields with a unique identifier for each record. These fields must have the same field name.

  • To filter for duplicates, both the spreadsheet and the feature class must have fields with the date, and optionally time, of the incident or incident report. These fields must have the same field name and dates must be in a the format mm/dd/yyyy hh:mm. This format can be modified by changing the value of the timestamp variable at the top of the import_publish_incidents.py script.

  • All date, time, and timestamp fields must be formatted in the spreadsheet to display, in order of requirement:

    1. year
    • month
    • day
    • hour
    • minute

    For example, a field containing only the time 16:45 will cause the tool to fail because it is missing the year, month and day information associated with that time.

  • These tools are set up to use the World Geocode service, which requires, and consumes credits from, an ArcGIS Online organizational account.

    Learn more about setting up a connection to the World Geocode Service

    Optionally, use your own locator or geocode service. This requires some additional configuration of the scripts. Open import_publish_incidents.py in IDLE or a text editor and modify the values of the following parameters located near the top of the script:

    • all_locator_fields: in order, all the input address fields accepted by your locator
    • loc_address_field: Your locator's input address field that looks for the house number and street name information
    • loc_city_field: Your locator's input address field that looks for the city information
    • loc_state_field: Your locator's input address field that looks for the state or province information
    • loc_zip_field: Your locator's input address field that looks for the ZIP or postal code information

Resources

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Licensing

Copyright 2013 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's license.txt file.

incident-import-tools's People

Contributors

allisonmuise avatar jmhauck avatar lindsaythomas avatar miketschudi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.