SciGaP / simccs-maptool

Online maptool that provides novel decision-support capabilities for evaluating carbon capture, utilization and storage technologies (CCUS).
5 stars 0 forks source link

Normalize dataset column names #121

Closed machristie closed 3 years ago

machristie commented 3 years ago

Currently, the column names in uploaded source and sink files must exactly match expected values. For example, the "fieldCap" column of uploaded sink files must exactly be named fieldCap (MtCO2). Some tools like ArcGIS don't like parentheses in these column headers, so this is an additional burden for users to convert headers back and forth when moving between tools like ArcGIS and the web portal.

One improvement would be to more flexibly look for column headers and normalize them to specific values when generating GeoJSON. Continuing the example, the upload code could look for a column header with "fieldCap" in it and update it to fieldCap (MtCO2).

In addition, we might as well check that all expected headers are present as a way of validating the uploaded data.

machristie commented 3 years ago

I found a couple of interesting differences between column names for sources and sinks

machristie commented 3 years ago

here are the column name normalization rules: https://github.com/SciGaP/simccs-maptool/blob/dev/simccs_maptool/serializers.py#L331-L368