Using different date formats in CODAP

CODAP Forums CODAP Help Forum Using different date formats in CODAP

Tagged: ,

  • This topic has 5 replies, 2 voices, and was last updated 10 months ago by Jacob Sagrans.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #7665 Score: 0
    Jacob Sagrans
    Participant

    The other day I showed a CODAP file to students who struggled some with dates in the data because we would asked them things like “what is going on in October 2022” and they would repeatedly get confused about a date format 10/11/2022. I just thought I would try to convert the dates to read as something like “October 11, 2022,” which I managed to do with a fairly complex formula, as you can see in the link below. Graphing with this new spelled out date variable worked, although not if I changed the data type to date. Also, if I mouse over a case on the graph, it displays the date as something like “10/11/22, 12:00 AM.” Is there a better way I could have done this, to have more control/precision over how dates display in CODAP? Thanks! https://codap.concord.org/app/static/dg/en/cert/index.html#shared=https%3A%2F%2Fcfm-shared.concord.org%2FsF0olwg3NeKRSG8Q7XDp%2Ffile.json

    #7666
    Bill Finzer
    Keymaster

    Hi Jacob,

    Clever formula! No, I don’t think there’s anything more you could do to change the way the dates display. I’m surprised (and pleased) that the graph axis correctly interpreted “date spelled out” as a date and surprised (and disappointed) that it didn’t do so when you explicitly typed the attribute as date.

    I’ll record a request that CODAP include more formatting options for dates and that the “hover” text respect those options.

    Thanks for the feedback!

    Bill

    #7667
    Jacob Sagrans
    Participant

    Thank you Bill! A somewhat related question I am now wondering about is how numeric data displays in the table/on the graph. It seems if you specify numeric, commas will be added to the numbers at 10,000 and above in the table and on the graph, but there would be no easy way to have a number below 10,000 display as, say “5,000”–is that correct? Thanks again.

    #7668
    Bill Finzer
    Keymaster

    Yes, that is correct. Since numbers in the low thousands are frequently meant to represent years, which don’t look good with commas in them, CODAP somewhat arbitrarily doesn’t format with commas for any numbers in the thousands range.

    #7669
    Jacob Sagrans
    Participant

    Ah that makes sense, thanks!

    #7704
    Jacob Sagrans
    Participant

    Just played around with this some more. If I upload a CSV with a date in the format such as “June 19, 2010” as shown below, and do not specify that the attribute type as date in CODAP, I can make a graph that displays the date properly. Also, I can sort the data in chronological order and then add connecting lines that appear properly to a graph with date on the X axis and another attribute on the Y axis, all without specifying date data type for the date attribute (see second image below). So there are workarounds, it seems.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.