{"id":14065071,"url":"https://github.com/GFDRR/rdls-spreadsheet-template","last_synced_at":"2025-07-29T19:34:08.223Z","repository":{"id":185822620,"uuid":"674157612","full_name":"GFDRR/rdls-spreadsheet-template","owner":"GFDRR","description":"A template for entering Risk Data Library Standard (RDLS) metadata in spreadsheet format","archived":false,"fork":false,"pushed_at":"2024-07-16T11:25:16.000Z","size":3293,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-08-13T07:08:07.363Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GFDRR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-03T09:16:48.000Z","updated_at":"2024-08-13T07:08:31.425Z","dependencies_parsed_at":"2024-08-13T07:08:12.391Z","dependency_job_id":"6faedab7-ecd0-4c95-a5db-d3e8f4c94e48","html_url":"https://github.com/GFDRR/rdls-spreadsheet-template","commit_stats":null,"previous_names":["gfdrr/rdls-spreadsheet-template"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GFDRR%2Frdls-spreadsheet-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GFDRR%2Frdls-spreadsheet-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GFDRR%2Frdls-spreadsheet-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GFDRR%2Frdls-spreadsheet-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GFDRR","download_url":"https://codeload.github.com/GFDRR/rdls-spreadsheet-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228046047,"owners_count":17861086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-13T07:04:16.739Z","updated_at":"2024-12-04T04:30:42.244Z","avatar_url":"https://github.com/GFDRR.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"#  Risk Data Library Standard Spreadsheet Template\n\nA template for entering [Risk Data Library Standard (RDLS)](https://docs.riskdatalibrary.org) metadata in spreadsheet format. For more information on the Risk Data Library project, see [https://riskdatalibrary.org/](https://riskdatalibrary.org/).\n\n**[:arrow_down: Download the full template](https://github.com/GFDRR/rdls-spreadsheet-template/raw/main/templates/rdls_template.xlsx)** (Hazard, exposure, vulnerability and loss metadata)\n\n* **[:arrow_down: Download the hazard metadata template](https://github.com/GFDRR/rdls-spreadsheet-template/raw/main/templates/rdls_template_hazard.xlsx)**\n* **[:arrow_down: Download the exposure metadata template](https://github.com/GFDRR/rdls-spreadsheet-template/raw/main/templates/rdls_template_exposure.xlsx)**\n* **[:arrow_down: Download the vulnerability metadata template](https://github.com/GFDRR/rdls-spreadsheet-template/raw/main/templates/rdls_template_vulnerability.xlsx)**\n* **[:arrow_down: Download the loss metadata template](https://github.com/GFDRR/rdls-spreadsheet-template/raw/main/templates/rdls_template_loss.xlsx)**\n\n## How to use the template\n\n1. Read the [RDLS documentation](https://docs.riskdatalibrary.org) to learn about the structure of RDLS metadata.\n1. Download the template and enter your data in your preferred spreadsheet software:\n   1. Start by entering data in the first row in the `datasets` worksheet and then complete any other [worksheets](#worksheets) that are relevant to your dataset.\n   1. Use the [field information](#field-information) to understand what data to enter into each column and how to format it.\n   1. Use [identifiers](#identifiers) to relate data entered across multiple worksheets.\n   1. Make sure that you complete all of the required fields for each worksheet that you add data to.\n1. Convert your data to JSON format and validate it against the RDLS schema using the [RDLS Convertor](http://metadata.riskdatalibrary.org).\n1. Fix any issues reported by the RDLS Convertor.\n\nFor more guidance on how to publish RDLS metadata, refer to the [implementation guidance](https://docs.riskdatalibrary.org/en/latest/guides/).\n\n## How to customise the template\n\nYou 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.\n\n## Frequently asked questions\n\n### What does the '0' refer to in the field names?\n\nIt 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.\n\n## Reference\n### Worksheets\n\nThe 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](https://docs.riskdatalibrary.org/en/latest/reference/schema/#resource). For more information on the RDLS schema, refer to the [schema reference](https://docs.riskdatalibrary.org/en/latest/reference/).\n\n### Identifiers\n\nIdentifiers 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.\"\n\n### Field information\n\nEach column in the template represents a field in the RDLS schema. The following information is provided for each field:\n\n* `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](https://flatten-tool.readthedocs.io/en/latest/unflatten/#understanding-json-pointer-and-how-flatten-tool-uses-it).\n* `title`: The title of the field, from the RDLS schema.\n* `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.\n* `required`: Whether the field is required (mandatory). You must populate required fields unless no other fields in the worksheet are populated.\n* `type`: The data type of the field, from the RDLS schema. The possible types are:\n  * string (text)\n  * number (decimal)\n  * integer (whole number)\n  * boolean (true/false)\n  * array (list of values).\n* `values`: If the field references a closed [codelist](https://docs.riskdatalibrary.org/en/latest/reference/codelists/), the permitted values. If the value of the field must conform to a particular [string format](https://json-schema.org/understanding-json-schema/reference/string.html#built-in-formats), the name of the format. The possible formats are:\n  * date (YYYY-MM-DD)\n  * email\n  * iri (web address)\n* `codelist`: If the field references a codelist, the name of the codelist. To view the title and description of each code, open the link.\n* `input guidance`: Guidance on how to enter data in spreadsheet format.\n\n## Developer documentation\n\nThe spreadsheet template is generated from the RDLS schema using the script in `manage.py`.\n\n### Set up your development environment\n\n#### Clone the repository\n\n```bash\ngit clone git@github.com:GFDRR/rdls-spreadsheet-template.git\ncd rdls-spreadsheet-template\n```\n\nSubsequent instructions assume that your current working directory is `rdls-spreadsheet-template`, unless otherwise stated.\n\n#### Initialise and update submodules:\n\n```bash\ngit submodule init\ngit submodule update\n```\n\n#### Create and activate a Python virtual environment\n\nThe following instructions assume you have [Python 3.8](https://www.python.org/downloads/) or newer installed on your machine.\n\nYou can use either `pyenv` or `python3-venv` for this step.\n\n##### pyenv\n\n1. Install [pyenv](https://github.com/pyenv/pyenv). The [pyenv installer](https://github.com/pyenv/pyenv-installer) is recommended.\n1. Create a virtual environment.\n\n    ```bash\n    pyenv virtualenv rdls-spreadsheet-template\n    ```\n\n1. Activate the virtual environment.\n\n    ```bash\n    pyenv activate rdls-spreadsheet-template\n    ```\n\n1. Set the local application-specific virtual environment. Once set, navigating to the `rdls-spreadsheet-template` directory will automatically activate the environment.\n\n    ```bash\n    pyenv local rdls-spreadsheet-template\n    ```\n\n##### virtualenv\n\n1. Create a virtual environment named `.ve`.\n  1. Linux/MacOS users:\n\n      ```bash\n      python3 -m venv .ve\n      ```\n\n  1. Windows users:\n\n      ```bash\n      py -m venv .ve\n      ```\n\n1. Activate the virtual environment. You must run this command for each new terminal session.\n  1. Linux/MacOS users:\n\n      ```bash\n      source .ve/bin/activate\n      ```\n\n  1. Windows users:\n\n      ```bash\n      .\\.ve\\Scripts\\activate\n      ```  \n\n#### Install requirements:\n\n```bash\npip install --upgrade pip setuptools\npip install -r requirements.txt\n```\n\n### Update the template\n\nUpdate the main template:\n\n```bash\npython manage.py create-template\n```\n\nUpdate the component templates using the `-c` option, e.g. update the hazard component:\n\n```bash\npython manage.py create-template -c hazard\n```\n\nTo see all options, pass the --help flag:\n\n```bash\npython manage.py create-template --help\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGFDRR%2Frdls-spreadsheet-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGFDRR%2Frdls-spreadsheet-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGFDRR%2Frdls-spreadsheet-template/lists"}