- This topic has 5 replies, 2 voices, and was last updated 1 year, 5 months ago by Jacob Sagrans.
-
AuthorPosts
-
Jacob SagransParticipant
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
June 1, 2023 at 3:34 pm #7666Bill FinzerKeymasterHi 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
June 1, 2023 at 3:37 pm #7667Jacob SagransParticipantThank 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.
June 1, 2023 at 3:44 pm #7668Bill FinzerKeymasterYes, 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.
June 1, 2023 at 3:53 pm #7669Jacob SagransParticipantAh that makes sense, thanks!
June 20, 2023 at 1:53 pm #7704Jacob SagransParticipantJust 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.
Attachments:
-
AuthorPosts
- You must be logged in to reply to this topic.