Forum Replies Created
-
AuthorPosts
-
Bill Finzer
KeymasterHello Kathleen,
The trick here is to structure your data in a way that CODAP can use to display multiple box plots.
So, if you have an attribute for, let’s say Group, and another, let’s call it Measurement, your data might look like this:
Group Measurement
before 7
after 5
before 10
after 9
etc.The you put Measurement on one axis, and Group on the other.
Finally, in the Ruler menu for the graph click on the checkbox for Box Plot.
See the enclosed screenshot.
Hope this helps,
Bill
Attachments:
Bill Finzer
KeymasterHi Randy,
Yes, it is possible, and with a single formula (though perhaps not as elegant as one would wish). The screen shot shows how, using attributes x and fLW. It’s basically a nested ‘if/else’. Notice that there’s no last else clause so when x is 13, fLW gets no value.
if(x<=10, 6.6,
if(x=11, 10,
if(x=12,0)))Attachments:
February 22, 2018 at 8:35 pm in reply to: Uploading data with coordinates and geographic boundaries #463Bill Finzer
KeymasterLooks like Latitude is misspelled?
February 22, 2018 at 5:24 pm in reply to: Uploading data with coordinates and geographic boundaries #459Bill Finzer
KeymasterRegarding state boundaries, let’s assume you have an attribute whose values are names of states. Let’s say the name of this attribute is State.
Now you need an attribute that whose values are the boundaries themselves. The name of this attribute can be any of the following: ‘boundary’, ‘boundaries’, ‘polygon’, ‘Boundary’, ‘Boundaries’, ‘Polygon’
Finally, you write a formula for this boundary attribute: lookupBoundary(US_state_boundaries,State)
After you accept this formula you should see for values small blue polygons that represent the boundaries for each of the states.
Hope this helps,
Bill
February 22, 2018 at 5:14 pm in reply to: Uploading data with coordinates and geographic boundaries #458Bill Finzer
KeymasterHi Meggie,
Thanks for this question.
Regarding coordinates: CODAP looks for attributes with names that suggest latitude and longitude.
For latitude these are: ‘latitude’, ‘lat’, ‘Latitude’, ‘Lat’, ‘LAT’, ‘LATITUDE’, ‘LATITUD’, ‘latitud’
And for longitude these are: ‘longitude’, ‘long’, ‘lng’, ‘Longitude’, ‘Long’, ‘Lng’, ‘LONG’, ‘LON’,
'LONGITUDE', 'LONGITUD', 'longitud'
Once you have attribute names CODAP can recognize, making a map should show points for each case. (Close any maps you have open first.)
I’ll answer the question about boundaries in a following post.
Bill
Bill Finzer
KeymasterHi Mimi,
OK, now I understand. I think the right answer is that you should do it in a spreadsheet by appending a column to the Laundry dataset and filling it with “Laundry.” Then, when you import this into CODAP, you can drag that column to the left to create the parent “Location” collection.
But you inspired me to see if there was any way to do it from within CODAP. There is, but it’s very clumsy, and I don’t recommend it. But here are the steps, at least approximately:
- In the “top 2” dataset make a new attribute named “Time”
- Drag the case and location attributes to the left, leaving Time on the right.
- Click in the Index column of the child collection and insert as many cases as you have in the Laundry dataset.
- Give the Time attribute a formula like the one in the screenshot below, except referring to “Time” instead of “Temperature.”
This should have transferred all the temperature values into the top 2 dataset at the child level. Add the rest of the attributes, varying the formula to refer to each additional attribute in the Laundry dataset.
What a lot of work! Much easier in a spreadsheet.
There are a lot of data manipulation capabilities we would like to add to CODAP as we go along. “Ease of join” is certainly one of them!
Bill
Attachments:
Bill Finzer
KeymasterHi Mimi,
CODAP shows the “parent-child” relationship in the case table with curvy lines, as you can see in the screen shot I’ve uploaded. Very useful is to click on one of the parent rows to select that row and all the child case rows. This is also shown in the screen shot. As you scroll the child table, CODAP attempts to keep the parent table in synch so you can see the parents approximately next to their children.
Another way is to make a graph (as shown in the second screen shot) in which some unique identifier for the parent is on one axis and some attribute for the children is on the other axis. Here you can easily see that the selected child case has Kentucky as its parent.
I’m not sure I’ve answered your question. Don’t hesitate to follow up!
Bill
Bill Finzer
KeymasterHi Michelle,
Great suggestions. You inspired me to look carefully at the options offered by Leaflet, the library underlying CODAP’s map tool. I found ‘worldJump,’ which, when set to true, does part of what you describe. Namely, when you scroll the map horizontally far enough, say to the right, the map wraps and you start seeing points on the left that you had previously scrolled off to the right. This options lessens the likelihood that you’ll get “lost” and be unable to find your data. (Though note that the Rescale button at the top of the map’s tool palette scales the map so that all the data is visible.) Expect to see this enhancement in an upcoming release, perhaps 0412.
Unfortunately, the worldJump option still only allows you to see “one world” at a time, so you can still only see half the ring of fire at once. To help with this, consider using a formula for Longitude such as
if(Longitude_< cutPoint, 360+Longitude_, Longitude_)
where Longitude_ is the original longitude, and cutPoint is the value of a slider. Here is your example modified to include a cutPoint slider.
I’ll have to think a bit more about how hard it would be for us to force map points to automatically plot in whatever world is showing. It seems like it might not be too hard.
So, thanks for your excellent suggestions! You are helping to make CODAP a better educational platform.
Bill
September 14, 2017 at 5:26 pm in reply to: Embedding CODAP components (table or Graph) in webpage #418Bill Finzer
KeymasterHi Kathy,
Bill, how do we limit the number of measurement tools? I noticed in the numbers plot on the right you allowed only five.
Do you mean how many “checkboxes” show in the Ruler menu. I’m not doing anything special and currently there is no way for you as the author to control what shows up there.
Bill
September 13, 2017 at 3:11 am in reply to: Embedding CODAP components (table or Graph) in webpage #403Bill Finzer
KeymasterOK, so we’re assuming you can create a webpage. Here are the steps:
- Create the CODAP document just how you want it, with everything laid out starting at the top left. Give this document a name and save it.
- In the 3-strips menu choose Share… / Get link to shared view. This will open a dialog box.
- Press the Enable Sharing button. This will bring up a Share dialog box.
- Choose the middle tab Embed.
- Copy the code in the box (the text that starts with “<iframe”).
- Go into your web page editor where you want to embed the CODAP document.
- Paste the code you copied in the desired place.
- Edit the code by inserting “?componentMode=yes” in the place shown here:
src="https://codap.concord.org/app/<strong>?componentMode=yes</strong>#shared=12345">
- Open your web page and figure out what width and height of the rectangle you want and edit those two numbers in the code.
Notice that CODAP’s tool shelf is not showing. That’s because you added the code that turns on “componentMode.”
Be aware that you can at any time go back to your original saved document, make changes, save them, and use Share… / Update shared view so that the next time your web page is viewed, your changes are there.
Hoping this works,
BillAttachments:
Bill Finzer
KeymasterGenerally CODAP runs slower on Firefox than on Chrome. But check Firefox to make sure you have the latest version.
The fact that the computed value doesn’t update is a bug, that I don’t think is in our current bug list. Putting it there now!
Thanks, Bill
Bill Finzer
KeymasterHi Fi,
I bet the video you watched was this one, which refers to an old version of CODAP. Things have changed.
You can watch a video of the new interface for creating formulas here.
Basically, after creating the attribute, click on its column header to bring up a menu and choose Edit Formula.
Hope this helps,
Bill
August 29, 2017 at 2:47 pm in reply to: Creating a parent-level collection from a data interactive #394Bill Finzer
KeymasterHello Anna,
There are at least two things going on here:
- As you correctly suspected, the flag preventDataContextReorg (I’m pretty sure) defaults to true. It defaults to true so that your users won’t reorganize their data and make it impossible for your data interactive (plugin) to add more data. But you can set it to false as shown in the section Example: InteractiveFrameUpdate of the API documentation. It sounds like you tried this with no success, but try again and if still no luck, ask here.
- If you want to be able to add data no matter how users may have reorganized things, use the Items api instead of the Cases api.
Can you share a bit more about your situation and the plugins you are creating?
Bill
August 23, 2017 at 2:40 pm in reply to: Creating a new collection using a variable created with a formula #391Bill Finzer
KeymasterHi Anna,
I’m glad you’re having a good experience tidying your data so far.
A cool thing about formulas is that removing the formula (by editing it and deleting its text) does not change the values that have already been computed. So that will “set” the values and you can proceed to drag the attribute to a higher level.
Bill
Bill Finzer
KeymasterHello Mitchell,
We don’t have a moving average function. (But I’m adding a feature request for one on your behalf.)
But if I’ve understood correctly, you can compute what you are after as follows.
- Create an attribute named runningSum with the formula prev(runningSum,0)+current
- Create an attribute named runningAvg with the formula runningAvg/caseIndex
Is this is the kind of average you’re looking for? When I tried it, I got a nice graph for three runs. Note that I had to define an attribute named ticks with the formula caseIndex.
Hope this helps,
Bill
Attachments:
-
AuthorPosts