1

I have a point shapefile that includes several (e.g 160) of fields with the mean temperature and wind speed [at each location] for different days. Ideally, I want to reduce the number of fields to only one for each variable, by grouping the corresponding data. For instance, what I was thinking to do, was to convert the corresponding values into strings and concatenate them into a long string, which I will store in a single field. What is the most efficient and elegant approach? Is it better to use a different data structure?

Please keep in mind that I have to use these data for plotting in matplotlib and also to be able to share the point shapefile and the temperature + wind speed data with others.

  • 1
    So what is the average summer temperature? Good luck answering that if all your data is concatenated in a string. The clean way would be to have a point layer (stationID, X, Y) and a table (stationID, date, temperature). You can then manipulate the data as you wish using queries (that do not modify the data structure) – JGH Jun 25 '19 at 11:38
  • 160 fields is 100-150 more than a shapefile ought to have. It's time to discover what databases can do with a proper database design and good normalization. – Vince Jun 26 '19 at 3:19
-2

Create new field then Use the field calculator create an expression

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.