Closed machristie closed 3 years ago
I found a couple of interesting differences between column names for sources and sinks
NAME
but is Name
in sink filesfixO&M ($M/y)
but is fixO&M ($M/yr)
in sink fileshere are the column name normalization rules: https://github.com/SciGaP/simccs-maptool/blob/dev/simccs_maptool/serializers.py#L331-L368
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.