System Administration

Administration App

Arches uses the very powerful Django administration application to drive system administration. This interface is available at: { your application url }/admin

From here, administrator users can manage users, groups and permissions. Arches-HIP will automatically create permissions for each entity type tracked, so that administrators can manage access to Arches data on a per entity basis. You will find these permissions available to be assigned to users and groups in the Django administration application.

For more on using the Django administration interface, please see the Django documentation: https://docs.djangoproject.com/en/1.6/ref/contrib/admin/

Reference Data Manager (RDM)

The HIP Reference Data Manager allows users to create, modify and delete reference data used by HIP. This data is used to populate labels in search and dropdown lists. A more complete discussion of using the RDM can be found in the Arches-HIP user documentation (coming soon!).

Exporting Data

By default, Arches will export the id, primary name and resource type to KML, shapefile and CSV formats. However, if you need to export more information for a resource, or customize the column names of your export file, an export mapping file is required.

Resource export mappings

The resource export mappings is a JSON file that maps resources in your search results, to the schema of an export format; KML, CSV or SHP. If you need to create this file, its path needs to be assigned to the EXPORT_CONFIGS variable in your applications settings.py file. For example:

EXPORT_CONFIG = os.path.normpath(os.path.join(PACKAGE_ROOT, 'source_data', 'business_data', 'resource_export_mappings.json'))

The top level members of the JSON object are the format extensions (e.g. “csv”, “shp”, “kml”). Each format extension has the following properties:

  • NAME: base name of the export file

  • SCHEMA: array of objects defining each field to be added to your exported file. Each object should have the following properties:

    • field_name: name of the exported field (required)
    • source: The location of the data in the search results. If the value is “field_map” the application will lookup the value using the field map for the resource.
    • alternatename : every name for the resource that is not primary will be concatenated into a list of alternate names. A value of “resource_name” will lookup the resource name from the RESOURCE_TYPE_CONFIGS in the application’s settings.py file.
    • data_type: “str”, “datetype”, or “float” (required only for shapefiles)
    • data_length: an integer in quotes (e.g. “128” required only for shapefiles)
  • RESOURCE_TYPES: an object containing an object for each resource type that will be exported. The key for each resource type object is the resource’s entitytypeid. The value for each type contains the following properties:

    • FIELD_MAP: a list of objects each containing information needed to map child entity data to an export file field. Properties for the field map include:

      • field_name: The field_name value - match a field in the SCHEMA (required)
      • entitytypeid: The entitytypeid of the child entity (required)
      • value_type: A conceptid of the value used to define the value’s type. For example, an address may have different types such as primary or postal. If you want to export only the primary address for this column, you can add the concept type for ‘primary address’ here. Concept ids can be found in your application’s Reference Data Manager (RDM). (optional)
      • alternate_entitytypeid: Alternate entity type to use if no value is available for the entitytypeid (optional)

Example Resource Export Mappings

{
    "csv": {
        "NAME": "HistoricPlacesLA_Search_Results_Export",
        "SCHEMA": [
            {"field_name": "PRIMARY NAME","source": "primaryname"},
            {"field_name": "OTHER NAMES","source": "alternatename"},
            {"field_name": "ARCHES ID","source": "entityid"},
            {"field_name": "ARCHES RESOURCE TYPE","source": "resource_name"},
            {"field_name": "TYPE","source": "field_map"},
            {"field_name": "PRIMARY ADDRESS/LOCATION DESCRIPTION","source": "field_map"},
            {"field_name": "DESIGNATIONS","source": "field_map"}
        ],
        "RESOURCE_TYPES": {
            "ACTOR.E39": {
                "FIELD_MAP": [
                    {
                        "field_name": "TYPE",
                        "entitytypeid": "ACTOR_TYPE.E55"
                    },
                    {
                        "field_name": "PRIMARY ADDRESS/LOCATION DESCRIPTION",
                        "entitytypeid": "PLACE_ADDRESS.E45",
                        "value_type": "e4f5bd2f-56b7-4b8d-ac48-7e6d90e530ae",
                        "alternate_entitytypeid": "DESCRIPTION_OF_LOCATION.E62"
                    }
                ]
            },
            "HERITAGE_RESOURCE.E18": {
                "FIELD_MAP": [
                    {
                        "field_name": "TYPE",
                        "entitytypeid": "HERITAGE_RESOURCE_TYPE.E55"
                    },
                    {
                        "field_name": "PRIMARY ADDRESS/LOCATION DESCRIPTION",
                        "entitytypeid": "PLACE_ADDRESS.E45",
                        "value_type": "e4f5bd2f-56b7-4b8d-ac48-7e6d90e530ae",
                        "alternate_entitytypeid": "DESCRIPTION_OF_LOCATION.E62"
                    },
                    {
                        "field_name": "DESIGNATIONS",
                        "entitytypeid": "TYPE_OF_DESIGNATION_OR_PROTECTION.E55"
                    }
                ]
            }
        }
    },
    "kml": {
        "NAME": "HistoricPlacesLA_Search_Results_Export",
        "SCHEMA": [
            {"field_name": "primary_name","source": "primaryname"},
            {"field_name": "other_names","source": "alternatename"},
            {"field_name": "arches_id","source": "entityid"},
            {"field_name": "arches_resource_type","source": "resource_name"},
            {"field_name": "geometry","source": "geometries"},
            {"field_name": "type","source": "field_map"},
            {"field_name": "primary_address_or_description","source": "field_map"},
            {"field_name": "designations","source": "field_map"}
        ],
        "RESOURCE_TYPES": {
            "ACTOR.E39": {
                "FIELD_MAP": [
                    {
                        "field_name": "type",
                        "entitytypeid": "ACTOR_TYPE.E55"
                    },
                    {
                        "field_name": "primary_address_or_description",
                        "entitytypeid": "PLACE_ADDRESS.E45",
                        "value_type": "e4f5bd2f-56b7-4b8d-ac48-7e6d90e530ae",
                        "alternate_entitytypeid": "DESCRIPTION_OF_LOCATION.E62"
                    }
                ]
            },
            "HERITAGE_RESOURCE.E18": {
                "FIELD_MAP": [
                    {
                        "field_name": "type",
                        "entitytypeid": "HERITAGE_RESOURCE_TYPE.E55"
                    },
                    {
                        "field_name": "primary_address_or_description",
                        "entitytypeid": "PLACE_ADDRESS.E45",
                        "value_type": "e4f5bd2f-56b7-4b8d-ac48-7e6d90e530ae",
                        "alternate_entitytypeid": "DESCRIPTION_OF_LOCATION.E62"
                    },
                    {
                        "field_name": "designations",
                        "entitytypeid": "TYPE_OF_DESIGNATION_OR_PROTECTION.E55"
                    }
                ]
            }
        }
    },
    "shp": {
        "NAME": "HistoricPlacesLA_Search_Results_Export",
        "SCHEMA": [
            {"field_name": "prime_name","source": "primaryname","data_type": "str","data_length": "128"},
            {"field_name": "arches_id","source": "entityid","data_type": "str","data_length": "128"},
            {"field_name": "resource","source": "resource_name","data_type": "str","data_length": "128"},
            {"field_name": "othernames","source": "alternatename","data_type": "str","data_length": "128"},
            {"field_name": "type","source": "field_map","data_type": "str","data_length": "128"},
            {"field_name": "address","source": "field_map","data_type": "str","data_length": "128"},
            {"field_name": "designatns","source": "field_map","data_type": "str","data_length": "128"}
        ],
        "RESOURCE_TYPES": {
            "ACTOR.E39": {
                "FIELD_MAP": [
                    {
                        "field_name": "type",
                        "entitytypeid": "ACTOR_TYPE.E55"
                    },
                    {
                        "field_name": "address",
                        "entitytypeid": "PLACE_ADDRESS.E45",
                        "value_type": "e4f5bd2f-56b7-4b8d-ac48-7e6d90e530ae",
                        "alternate_entitytypeid": "DESCRIPTION_OF_LOCATION.E62"
                    }
                ]
            },
            "HERITAGE_RESOURCE.E18": {
                "FIELD_MAP": [
                    {
                        "field_name": "type",
                        "entitytypeid": "HERITAGE_RESOURCE_TYPE.E55"
                    },
                    {
                        "field_name": "address",
                        "entitytypeid": "PLACE_ADDRESS.E45",
                        "value_type": "e4f5bd2f-56b7-4b8d-ac48-7e6d90e530ae",
                        "alternate_entitytypeid": "DESCRIPTION_OF_LOCATION.E62"
                    },
                    {
                        "field_name": "designatns",
                        "entitytypeid": "TYPE_OF_DESIGNATION_OR_PROTECTION.E55"
                    }
                ]
            }
        }
    }
}