Bill Finzer

Forum Replies Created

Viewing 15 posts - 271 through 285 (of 401 total)
  • Author
    Posts
  • in reply to: Linked Samplers #1153
    Bill Finzer
    Keymaster

    Yes, that’s correct.

    CODAP development happens in collaboration with projects that can provide funding for desired features. Hollylynne’s ESTEEM project funded Sampler development to its current state. There are a number of folks seeking funding to continue work on the Sampler to bring its functionality to at least the level provided in TinkerPlots. But for now, no linked samplers. 🙁

    in reply to: count(expression, filter) question #1136
    Bill Finzer
    Keymaster

    The count function applies to the cases at the next level. So, as you can see in this screenshot, if you use the formula at the samples level, it does the right thing. Hope that works for you!

    in reply to: Counting number of distinct/unique values #1126
    Bill Finzer
    Keymaster

    Hi Anna,

    Yes, it would be very nice to have a function “countUnique” or some such that returned the number of unique values of an attribute. I’ll add this to the feature request list!

    I understand why you might not be a fan of your workaround. 😉 Another workaround you may have thought of is to group by value by moving the value attribute all the way to the left. Now, of course, the count of unique values is the number of rows at that level. If you want a computed count of unique values, you can define an attribute one level higher that counts those rows.

    The enclosed screenshot shows the situation using the Roller Coasters example doc.

    Bill

    Attachments:
    in reply to: The Summary Tables #1124
    Bill Finzer
    Keymaster

    Please see this thread.

    in reply to: Map color scale #1014
    Bill Finzer
    Keymaster

    Hi Kristen,

    The short answer is that CODAP does not provide any way to adjust the numeric legend color scale. As far as I know you are the first person to express a desire for this. Four years ago when we implemented the feature we thought users might want to adjust things but decided to wait and see. Now I’ll certainly add your feature request to our list.

    Perhaps you could say a bit about the context in which you are using CODAP and how it would help you to make these adjustments?

    Thank you!

    in reply to: Creating Student Links to a Master File #1004
    Bill Finzer
    Keymaster
    Your question has a simple answer. From the menu in the upper-left of the window, choose Share/Get link to shared view.
    PastedGraphic-1.png
    In the resulting dialog box, click the Enable Sharing button. This gives you a link to a shared view of your document which you can distribute to students. When students click on the link they will get a copy of your document to work with.
    in reply to: Percentile function #991
    Bill Finzer
    Keymaster

    Here is CODAP’s source code for the computation:

    /**
     * Get the quantile
     * @param iArray Sorted array of finite numeric values (no non-numeric or missing values allowed)
     * @param iQuantile {Number} quantile [0.0-1.0] to calculate, e.g. first quartile = 0.25
     * @return {Number} median value or undefined if ioArray.length===0
     */
    quantileOfSortedArray: function (iSortedArray, iQuantile) {
      var lastIndex = iSortedArray.length - 1,
          i = lastIndex * iQuantile, // quantile's numeric-real index in 0-(n-1) array
          i1 = Math.floor(i),
          i2 = Math.ceil(i),
          fraction = i - i1;
      if (i < 0) {
        return undefined; // length === 0, or iQuantile < 0.0
      } else if (i >= lastIndex) {
        return iSortedArray[lastIndex]; // iQuantile >= 1.0
      } else if (i === i1) {
        return iSortedArray[i1]; // quantile falls on data value exactly
      } else {
        // quantile between two data values;
        // note that quantile algorithms vary on method used to get value here, there is no fixed standard.
        return (iSortedArray[i2] * fraction + iSortedArray[i1] * (1.0 - fraction));
      }
    },

    As you can see in the last line, when desired quantile falls between two values, the returned value is the lower value plus the fraction of the distance between it and the next value.

    in reply to: Scaling Y axes #979
    Bill Finzer
    Keymaster

    Hi Andee,

    Interesting question. As the programmer for graphs I should be able to lay out the heuristics that determine whether a scatterplot (or any plot with a numeric axis) rescales.

    The plot will rescale when:

    • You press the Rescale button at the top of the graph’s “inspector.”
    • An attribute is added to an axis or the legend.
    • An attribute already on an axis or legend is changed to a different attribute.
    • An attribute on an axis or legend is removed.
    • One or more cases are added that have values for the plotted attributes that lie outside the current axis bounds.
    • Points that have been hidden are shown and some of the values lie outside the current axis bounds.
    • Cases that have been set aside are restored and some of the values lie outside the current axis bounds.

    The plot will not rescale when:

    • A case value is changed even if that value lies outside the current axis bounds.
    • Cases are added but their values already lie within the current axis bounds.
    • The graph is moved or resized.
    • Points are hidden or their corresponding cases are deleted or set aside.

    These heuristics evolved during the development of Fathom. I think you may be the first person expressing a desire to know what they are. And I don’t recall anyone ever asking that we change the rules, at least since the very early days.

     

    Bill

    in reply to: React Component or npm package #977
    Bill Finzer
    Keymaster

    There is no CODAP react component or npm package. The simplest integration is with embedded iFrames that point to shared views of CODAP documents. See this recent blog post for an example.

    Integration is also possible through CODAP’s plugin API. Here is an example of that. (Use the Add Graph and Add Table buttons to see CODAP functionality as part of the OceanTracks page.)

    in reply to: Link to CODAP with data/csv included #970
    Bill Finzer
    Keymaster

    Hello Anna,

    Somewhat unfortunately, the documentation for importing CSV data through the URL is somewhat buried in CODAP’s github site. You can find it here.

    There is another gotcha however, namely that CODAP runs as a “secure” site with. As such, the site accessed by the URL parameter must also be secure. So the URL you would use will need to have the ‘https’ prefix as in

    https://codap.concord.org/app/?url=https://mywebsite.com/fjdkfjk.csv

    Here’s what Jonathan Sandoe has to say in an email to another user:

    The issue is that the link is to an insecure http address and CODAP is running with an https URL. Browser rules (quite reasonably) prevent a secure page from loading an insecure file. I tried modifying the URL to “https://xyz.com/Sample.csv” but the server doesn’t appear to support https.

    If you are affiliated with the owners of xyz.com in any way you could request that they support HTTPS. It’s probably a good idea for them anyway.

    The other network bugaboo that limits CODAP’s ability to read data from a third party sources are same origin policies (CORS). Servers can be configured to restrict the ability of browser apps to read their data. If a CSV file’s server is configured in this way, CODAP will not be able to use it directly.

     

    in reply to: How Make Numeric Values of Mean and Median Stay Visible? #942
    Bill Finzer
    Keymaster

    No, sorry, there isn’t. (We have in mind a future feature that will make capturing such things easy.)

    But you can use the camera menu to open the graph with the draw tool to add the value by hand.

    in reply to: Need Help Making Line Graphs – the "Connect" tool #936
    Bill Finzer
    Keymaster

    Hi Stephanie,

    Yes, there are ways to massage dates from the bewildering variety of formats in which they appear into formats that CODAP can deal with (without having to type them in by hand.

    In the case of the Salinity data, it didn’t prove too hard, though there is one apparent CODAP bug that gets in the way. I’ve updated the CODAP document so it now shows both datasets and has some numbered instructions that came from my efforts. For convenience, here they are.

    1. Rename the two attributes.
    2. Set the first attribute Type as Date.
    3. Set the second attribute type as numeric.
    4. Delete the first case.
    5. Make the scatterplot.
    6. Note that (for some reason) the date scale only goes through 2015. With your mouse cursor on top of Oct, click and drag to the left so that the rest of the points come into view.

    I’d say you’re getting a taste of what data scientists and other data folks confront every day.

    Bill

    in reply to: Need Help Making Line Graphs – the "Connect" tool #932
    Bill Finzer
    Keymaster

    Hi Stephanie,

    As I suspected, the problem was turning the MONTH attribute into a valid date.

    Here is a CODAP document with the data properly munged.

    I was able to do it with formulas, but it would have been a lot quicker and easier to just type them in. I erased all the formula work because it was so awkward.

    Hope this helps,

    Bill

    in reply to: Need Help Making Line Graphs – the "Connect" tool #929
    Bill Finzer
    Keymaster

    Hi Stephanie,

    Yes, there is  a fix. I just need to see the data to describe it.

    Unfortunately I couldn’t access your CODAP file on Google Drive. But you can upload the CSV file here.

    Or you can go to the top-left menu and choose Share followed by Get Shared Link. Then post the link here. I’ll be able to view and edit a copy of your document without changing the master.

    Thanks, Bill

    in reply to: Need Help Making Line Graphs – the "Connect" tool #924
    Bill Finzer
    Keymaster

    Hi Stephanie,

    I wonder if the time attribute is not being correctly interpreted? Could you either provide a link to a shared view of your CODAP document, or upload a CSV file of your data so we can take a look?

    The “Connecting Lines” option is only available when you have a scatterplot; i.e. when both axes have a numeric attribute. I suspect that your time attribute is being treated as categorical so what even though your graph looks “sort of” right, it’s actually a dot plot and not a scatterplot.

    Bill

Viewing 15 posts - 271 through 285 (of 401 total)