Author Topic: The input CSV files-3  (Read 2558 times)

PeterC

  • Administrator
  • Member
  • *****
  • Posts: 483
  • Passionate about my one-place study
    • View Profile
    • Holywell-cum-Needingworth History
The input CSV files-3
« on: 21 January 2018, 15:17:20 »
Note that this is mostly for technical information.
It is the third part of the document about the input csv files.


For each (optional) Feature Layer in each OPS in M4OPS
All files are in csv format using semi-colon ";", rather than comma, as the separator. No fields can have semi-colons within them, but they can have commas. (On Peter's PC all csv files are within eg \OPS\HcN Holywell-cum-Needingworth\FLG\.)

Every file has field names in its first row, and these field names must be as specified (in the correct case). No quotes are needed for field names or values. Any null or blank values should be left null, ie represented as ;;.

Any blank lines, any starting with the word “Comment”, and any starting with the first field name (thereby allowing a repeat of the first row of field names), are ignored. If you use Excel for accuracy then ensure that the delimiter is set to ";".

These csv files are used to generate geojson and json files, which are what M4OPS to use directly as its input.

The required files  (using the example of a Feature Layer called “Censuses”) are:
  • Censuses.csv - a list of all the features known to the OPS used in this Feature Layer
    • It must have either:
      • featureid - Required, string, corresponds to the featureid in Features.csv, or
      • one of the geometries listed above under Features.csv
    • It can have any of the other fields listed above in Features.csv (except the geometry - see above), and, if present, these values then override the values in Features.csv
    • Note that if no featureid is given then it must have a shorttext
    • Note that if a featureid and an override shorttext is given then you may also need to give an override fl_col1
The optional files are:
  • Censuses_Events.csv - a list of all the events listed for all the features used in this Feature Layer
    • It must be sorted by featureid, and then in the order you wish them to appear (eg by evdateend)
    • It must have the following fields
      • featureid - Required, string, corresponds to the featureid in Features.csv
      • evshorttext - the short summary heading for the event
      • evdatestart - date from which this event is to be shown in ISO Format - YYYY-MM-DD, eg 1888-03-25, or 1910 (default 0000-01-01)
      • evdateend - date after which this event is not to be shown (ditto) (default 9999-12-31)
      • evdescription - a full html description of the event
    • Note that this requires a featureid and must therefore be in Features.csv
  • Censuses_People_Events.csv - a list of all the events listed for all the people and features used in this Feature Layer
    • It must be sorted by personid, and then in the order you wish them to appear (eg by evdateend)
    • It must have the following fields
      • personid - Required, string, corresponds to the personid in People.csv
      • featureid - Required, string, corresponds to the featureid in Features.csv
      • evshorttext - the short summary heading for the event
      • evdatestart - date from which this event is to be shown in ISO Format - YYYY-MM-DD, eg 1888-03-25, or 1910 (default 0000-01-01)
      • evdateend - date after which this event is not to be shown (ditto) (default 9999-12-31)
      • evdescription - a full html description of the event
  • Censuses_People_Specs.csv - contains the fields specifying the person and results lists
    • It can have the following fields
      • XRefName - (default People)
      • fnresultsHead - the html heading text for each Person (where the text "xrefid" is replaced by the personid)
      • fnresultsBody - the html body of text for each Person (ditto)
      • fnresultsevHead - the html heading text for each event (ditto)
      • fnresultsevBody - the html body of text for each event (ditto)
      • xl_Ncols - the number of columns to be shown in the People list (default 1)
      • xlhead_col1 - the heading for the first column of the People list (default is blank)
      • xlhead_col2 - ditto column 2
      • xlhead_col3 - ditto column 3
   
For more input csv files see The input CSV files and The input CSV files-2
« Last Edit: 21 January 2018, 15:28:21 by PeterC »