Forum Replies Created
-
AuthorPosts
-
Jonathan SandoeKeymaster
Hi Andee
When the feature was implemented, Safari did not support the APIs necessary to construct an image in the format needed by the draw tool. I suspect, it does support the API now. If so, we will enable the feature for Safari. Thanks for the nudge.
Jonathan
Jonathan SandoeKeymasterHello Mary,
I am glad you were able to guess your way through some of my instructions. BTW, there are videos on our “help” website that may remove some of the guesswork. It sounds like the “syntax error” is the main roadblock. This could be caused by unbalanced parentheses. Since you may need to modify the document as you use it with students it will be really important for you to feel comfortable with formulas, and specifically the “if” function. If you work with spreadsheets, you may know there is an “if” function there as well. It is very similar. The condition is the first argument. The second argument is the value if the condition is true. The third argument is the value if false. These can be compounded. The second or third argument could themselves contain if functions.
I suggest you start simple. Replace the formula with a simple if function, like ‘if(temp<100, “cool”, “hot”)’. That will put “hot” or “cold” in each cell of the column. Then you can complete the rest of the procedure I outlined. If that works you can modify the formula by wrapping the function in more ‘if’ functions, making sure to balance the parentheses.
Hope this helps.
Jonathan
Jonathan SandoeKeymasterIt’s definitely not a beginner data move, but it can be done. Someone else may have a better way of doing this in CODAP, but here is mine.
1. First we have to create the categories for the different temperature ranges. In the Case Table create a new attribute, like “temp-range”.
2. Create a formula for ‘temp-range’ that creates a categorical value for each temperature. It’s a complicated looking formula, but it boils down to a repetition of a simple idea: “if(temp<60, ‘cold’, if(temp<70, ‘chilly’, if(temp<80, ‘moderate’, if(temp<90, ‘warm’, ‘hot))))”
3. Now open a graph and drag “temp” to the x axis and drag “temp-range” to the middle of the graph. You should see the dots in the graph with different colors assigned to each category, but probably the wrong colors.
4. Now open the “paintbrush menu” in the graph. This menu will permit you to assign your desired color to each of the possible values of ‘temp-range’.
5. If the data set has latitude and longitude assigned to each case, when you open the map, the points will be colored appropriately.
Hope this makes sense to you.
— Jonathan
Jonathan SandoeKeymasterHi Andee,
I think your speculation is on the nose. We compute the thumbnail image when we import from a GeoJSON file. It looks like this data was imported from a CSV file. The CSV process doesn’t expect embedded GeoJSON, so doesn’t have that code.
Jonathan
Jonathan SandoeKeymasterHello Meet,
Creating any CODAP component is pretty easy. The plugin sends a message that looks something like this:
{ “action”: “create”, “resource”: “component”, “values”: {“type”: “map”}}
You can specify more properties for the component, but, if you don’t, CODAP will supply default values. These may be good enough.
The Map Component displays points and shapes as layers on the basic map background based on the data in datasets in the current document. It looks among the datasets for attributes named like “latitude” and “longitude” and creates a dot for each case with values set for those attributes. Similarly, it looks for attributes with names like “boundary” or typed “Boundary” and creates a shape for each case with those attributes set.
So, if you want the map to display a point for the location the user set, then you should create a dataset with “latitude” and “longitude” attributes. This is described here, but I think you already have figured that out. Then you would create a case within that dataset. You can modify that case or add new ones, if the user changes location.
I hope this answers your question.
Jonathan
Jonathan SandoeKeymasterHi Mark,
The bug is fixed. The fix should be in the next build of CODAP, probably later this week.
Jonathan
Jonathan SandoeKeymasterHi Mark,
The Dropbox method worked. I can see the problem, so now I should be able to effectively debug it. Please stay tuned. I will let you know what I find out, but I may not be able to get to it immediately.
Jonathan
Jonathan SandoeKeymasterHello,
Sorry you are having problems with thumbnails not working. I would like to help. You say you attached the .json files. I don’t see them in the post. I only see a PNG. If you can send the GeoJSON files that would be very helpful. (URL’s would work, if they came from a public site.) Alternatively, you could share your CODAP document. (Click on the menu in the upper left of the page, then click on “Share…”, then follow the dialog to create a shared link.)
Thanks,
Jonathan Sandoe
Jonathan SandoeKeymasterI’m glad this helped. Please let us know if you encounter other problems.
Jonathan SandoeKeymasterHello,
Ah, now I understand better. Thank you for clarifying. This looks like a bug to me. I will record it and we will see if we can get it fixed. The problem is the Game API. The plugins you listed all use the Game API. The Game API has been deprecated for many years.
If you are not too far along in writing your plugin, I would strongly recommend switching to the Data Interactive Plugin API(https://github.com/concord-consortium/codap/wiki/CODAP-Data-Interactive-Plugin-API). It is far more capable. The Game API is a one-way API. It can send data to CODAP, only. The Plugin API is bidirectional. In addition to the things you can do with the Game API, you can ask for data from CODAP and receive notifications about events.
Again, thank you for calling our attention to this bug, and I hope it is not too late for you to switch to the Plugin API.
Jonathan Sandoe
January 5, 2022 at 9:00 pm in reply to: Issue with Drag-and-Drop CSV in “Getting Started with CODAP, Part 1” #6808Jonathan SandoeKeymasterHello Nick,
We have made a temporary fix to the “getting started” example by starting at the point where the document is already loaded and omitting the first task.
We will restore the “getting started” example when it works once again in Windows Chrome.
Jonathan Sandoe
Jonathan SandoeKeymasterHello,
I am looking into this. I will get back to you as soon as I am able.
Just to be clear, from what I understand, I think you are using the website, https://concord-consortium.github.io/codap-data-interactives/build/ and you are trying to click on a plugin name to open CODAP with that plugin. For example, if you click on “Ants”, you see this problem. Is that right?
I am curious what browser you are using and whether your computer is a Windows computer, Macintosh, or Chrome book.
Thank you,
Jonathan Sandoe
Jonathan SandoeKeymasterThe basic problem was the GitHub link is a page about the GeoJSON file, not the URL of the file itself. It’s a confusing aspect of GitHub. If you go to that page, then click on “raw”, this is the URL for the GeoJSON file. It is this page that you can download, then drag into CODAP.
Indeed, you don’t actually have to download it, now that you have the actual GeoJSON url: “https://raw.githubusercontent.com/deldersveld/topojson/master/countries/italy/italy-regions.json”. You can drag the URL over CODAP. Or, in most modern browsers, you can copy the URL to your clipboard, then open the CODAP “import” menu, select “URL”, then paste the URL and click “Import”.
Jonathan
Jonathan SandoeKeymasterHi Jennifer,
We would very much like to help figure out this unusual situation. We have seen the situation, occasionally, where users can’t save and restore documents on Google Drive. This usually is caused by configuration issues with a school network or laptops. We haven’t seen before the circumstance where users can save but can’t open the documents.
First, we need to know a bit more about the situation:
- Are the laptops you and your students are working with PCs, Macs or Chromebooks? Are they reasonably up to date?
- Does the problem happen at school, at home, or both?
- If you are able to get details about what the problem was that was fixed by your tech department and what the specific fix was that would be enormously helpful.
- Concerning the files that you can’t open, can you select one in Google Drive and click on the “info” icon in the upper right of the Google Drive display. (This info icon looks like an ‘i’ in a circle.) We are interested in knowing from the panel that will open on the right:
- size
- owner (whether it is you or not)
- the dates modified, created, and last opened
- the permissions. This is a sentence at the bottom of the panel.
I am hopeful, knowing the above, that we can figure out what the problem is.
Thanks,
Jonathan Sandoe
Jonathan SandoeKeymasterI added a bug report documenting this deficiency. We will see if we can get it done soon.
Jonathan
-
AuthorPosts