A template for entering Risk Data Library Standard (RDLS) metadata in spreadsheet format. For more information on the Risk Data Library project, see https://riskdatalibrary.org/.
⬇️ Download the full template (Hazard, exposure, vulnerability and loss metadata)
- ⬇️ Download the hazard metadata template
- ⬇️ Download the exposure metadata template
- ⬇️ Download the vulnerability metadata template
- ⬇️ Download the loss metadata template
- Read the RDLS documentation to learn about the structure of RDLS metadata.
- Download the template and enter your data in your preferred spreadsheet software:
- Start by entering data in the first row in the
datasets
worksheet and then complete any other worksheets that are relevant to your dataset. - Use the field information to understand what data to enter into each column and how to format it.
- Use identifiers to relate data entered across multiple worksheets.
- Make sure that you complete all of the required fields for each worksheet that you add data to.
- Start by entering data in the first row in the
- Convert your data to JSON format and validate it against the RDLS schema using the RDLS Convertor.
- Fix any issues reported by the RDLS Convertor.
For more guidance on how to publish RDLS metadata, refer to the implementation guidance.
You can hide worksheets and columns that are not relevant to your datasets. However, you must ensure that you complete all of the required fields for each worksheet to which you add data.
It indicates that each row under that field path should be interpreted as an item in an array, e.g. under attributions/0/id
the first row will be interpreted as the id
of the first item in the attributions
array and the second row will be interpreted as the id
of the second item.
The template consists of several worksheets, reflecting the structure of the RDLS schema. The datasets
worksheet is the main worksheet and each row in the datasets
worksheet represents a risk dataset. The other worksheets in the template represent arrays in the RDLS schema, with rows representing items in the arrays. For example, each row in the the resources
worksheet represents a resource. For more information on the RDLS schema, refer to the schema reference.
Identifiers are used to relate data entered across multiple worksheets, allowing the possibility of one-to-many relationships, such as one dataset made up of many resources. Rows in child worksheets are related to rows in parent worksheets using the parent object’s id
field. For example, the id
column in the resources
is used to reference the id
of the dataset to which the resource belongs. Similarly, each row in the hazard_event_sets_events
represents an event in an event set. The hazard/event_sets/0/id
column references the event set to which the event belongs and the id
column references the dataset to which the event set and event belong."
Each column in the template represents a field in the RDLS schema. The following information is provided for each field:
path
: A JSON pointer that identifies the RDLS field represented by the column. This information is used to convert data from spreadsheet format to JSON format. For more information, refer to the Flatten Tool JSON pointer documentation.title
: The title of the field, from the RDLS schema.description
: The description of the field, from the RDLS schema. You must ensure that the data you enter into each column conforms to the field's description.required
: Whether the field is required (mandatory). You must populate required fields unless no other fields in the worksheet are populated.type
: The data type of the field, from the RDLS schema. The possible types are:- string (text)
- number (decimal)
- integer (whole number)
- boolean (true/false)
- array (list of values).
values
: If the field references a closed codelist, the permitted values. If the value of the field must conform to a particular string format, the name of the format. The possible formats are:- date (YYYY-MM-DD)
- iri (web address)
codelist
: If the field references a codelist, the name of the codelist. To view the title and description of each code, open the link.input guidance
: Guidance on how to enter data in spreadsheet format.
The spreadsheet template is generated from the RDLS schema using the script in manage.py
.
git clone [email protected]:GFDRR/rdls-spreadsheet-template.git
cd rdls-spreadsheet-template
Subsequent instructions assume that your current working directory is rdls-spreadsheet-template
, unless otherwise stated.
git submodule init
git submodule update
The following instructions assume you have Python 3.8 or newer installed on your machine.
You can use either pyenv
or python3-venv
for this step.
-
Install pyenv. The pyenv installer is recommended.
-
Create a virtual environment.
pyenv virtualenv rdls-spreadsheet-template
-
Activate the virtual environment.
pyenv activate rdls-spreadsheet-template
-
Set the local application-specific virtual environment. Once set, navigating to the
rdls-spreadsheet-template
directory will automatically activate the environment.pyenv local rdls-spreadsheet-template
-
Create a virtual environment named
.ve
. -
Linux/MacOS users:
python3 -m venv .ve
-
Windows users:
py -m venv .ve
-
Activate the virtual environment. You must run this command for each new terminal session.
-
Linux/MacOS users:
source .ve/bin/activate
-
Windows users:
.\.ve\Scripts\activate
pip install --upgrade pip setuptools
pip install -r requirements.txt
Update the main template:
python manage.py create-template
Update the component templates using the -c
option, e.g. update the hazard component:
python manage.py create-template -c hazard
To see all options, pass the --help flag:
python manage.py create-template --help