Creating and updating locations in bulk via CSV

Brief overview

Locations are geographical units which could be a state, district, village, slums and so on where the organisation provides services.

Location hierarchy, reflects the hierarchy of the locations in which services are provided. Examples of location type are State, District, and Village. Each location type has a level. A level is a number. Higher-up location types will have a higher number. So the state, district, and village will have numbers 3,2,1 respectively.

Creating locations

Below are the steps to create locations in bulk. User needs to first add or ensure location types are present.

  1. Login to Avni Web Console
  1. Goto Admin
  1. Click on Location Type

Location types should be configured in descending manner, e.g. in this case Country/State should be the highest level, then block, then village (which is level:1). So the hierarchy will be - State>District>Taluk>Village>Block.

  1. Click on CREATE button on the top right corner
  1. Enter the Name, Level and Parent details (for each location type that you want to create)
  1. After the location Types are defined, the next step is to create locations.

    6a. Download the sample CSV file and using it create a spreadsheet or excel that will have the following format, where you provide the data. (INSERT HOW TO DOWNLOAD SAMPLE)

The Format for creating Users & Catchments can be taken from the below link:
https://docs.google.com/spreadsheets/d/1OxHDIYvmEp_cwjzXMBv4PEO-y6d483GH1G67XmcG43E/edit#gid=443914966

6b. Project team fills details in the google sheet

  1. After the Project team fills the Location details, they need to download the excel in the CSV format and uploaded in the “Upload” tab in the Admin section
  1. Post uploading the CSV, the locations can be verified in the Location tab.

Updating locations using CSV upload

Steps to update locations using upload.

  1. Download the same CSV file. Insert "Id" as the first column in your downloaded sample. The values for this column should be the uuid of the location you are trying to update.
    There are 3 ways that you can get uuid of the location.
    a. You can get it from the UI by simply searching the location, and the uuid of the location will come at the bottom.
    b. If you need uuids in bulk, you can download them using the export option available on the locations page. However, the page has a limit of how many locations can be downloaded.
    c. You can write a report in metabase/superset.

  2. Identify the incorrect locations or their properties and update them on the spreadsheet/CSV.
    The Format for creating Users & Catchments can be taken from the below link:
    https://docs.google.com/spreadsheets/d/1OxHDIYvmEp_cwjzXMBv4PEO-y6d483GH1G67XmcG43E/edit#gid=2057332727

  3. Once the data has been filled and verified, the user can come to the upload section, select the Edit + Create option, and upload.

  4. The changes can be verified from the locations tab after the upload is complete.