Can’t import data with header row

CODAP Forums CODAP Help Forum Can’t import data with header row

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9130 Score: 0

    Every time I try to import data with a header file, the header file is thrown away and the first row of data becomes the table header in CODAP.  This is true whether I import a CSV file or paste a table from the clipboard.

    #9136
    Bill Finzer
    Keymaster

    Hello Michael,

    It would help if you would provide the csv file. I suspect there is something unusual about it.

    Thanks,

    Bill

    #9137
    Bill Finzer
    Keymaster

    Hello Michael,

    Thanks for sending the file.

    The problem is with the hash mark (“#”) in the first row. CODAP interprets that as an indicator that there is metadata in that row and does not include it in the dataset proper. By changing the hash mark to a column name, like “N,” the file imports as one would expect. To illustrate what I mean by metadata, here are the first 14 lines of the exported data from the Mammals sample document in which you can see the hash marks and metadata for each attribute.
    # attribute — name: Mammal, description: The species of the mammal, editable: true
    # attribute — name: Order, description: The order of the mammal, editable: true
    # attribute — name: LifeSpan, type: numeric, unit: years, editable: true
    # attribute — name: Height, description: The average height of the mammal., unit: meters, editable: true
    # attribute — name: Mass, description: The mass of the mammal, type: numeric, unit: kg, editable: true
    # attribute — name: Sleep, description: The number of hours the animal sleeps in a 24 hour period, type: numeric, unit: hours, editable: true
    # attribute — name: Speed, description: The average speed of the mammal., unit: km/h, editable: true
    # attribute — name: Habitat, editable: true
    # attribute — name: Diet, editable: true
    Mammal,Order,LifeSpan,Height,Mass,Sleep,Speed,Habitat,Diet
    African Elephant,Proboscidae,70,4,6400,3,40,land,plants
    Asian Elephant,Proboscidae,70,3,5000,4,40,land,plants
    Big Brown Bat,Chiroptera,19,0.1,0.02,20,40,land,meat

    Thanks for reaching out with this question!

    Bill

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CODAP Help Forum’ is closed to new topics and replies.