Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • L losscalculator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Dynamic ExposureDynamic Exposure
  • Global Dynamic ExposureGlobal Dynamic Exposure
  • losscalculator
  • Merge requests
  • !34

Changed result file delimiter to semicolon

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Tara Evaz Zadeh requested to merge feature/change_result_file_delimiter into master Feb 14, 2021
  • Overview 23
  • Commits 1
  • Pipelines 3
  • Changes 3

The result files produced by the losscalculator include polygons in one of its columns. Since polygons have commas inside, this could interfere with coma being used as the columns delimiter.

So I decided to use double commas (,,) as the result file delimiter, which did not look nice as you can observe below:

geometry,, origin_id,, respective_cell_id,, asset_id,, lon,, lat...

In this MR, I changed the program to produce a result file with delimiter being semicolon ; and no more ,,. So now the result file header look like below:

geometry; origin_id; respective_cell_id; asset_id; lon; lat...

Just to help you understand what changed in each of the three files:
The strategy to change delimiter of produced result assets is done in the file damage_calculator_tile_version.py and the result file header delimiter change is done in damage_calculator.py.
I also changed the reference_result.csv in the example of the repository to match the changes.

\approve @ds @fd

Edited Feb 14, 2021 by Tara Evaz Zadeh
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/change_result_file_delimiter