Search Results for 'slider'

CODAP Forums Search Search Results for 'slider'

Viewing 15 results - 1 through 15 (of 26 total)
  • Author
    Search Results
  • #8447

    In reply to: Census Tracks

    Dan Damelin
    Keymaster

    I don’t have a target file size, but smaller is better. What I generally do is move the % slider until I start to see a loss of detail in the borders. It’s amazing how much info can be thrown out and have almost no visual change in the boundary definitions. I’m quite impressed with their algorithm for simplifying shapes.

    #8440

    In reply to: Census Tracks

    Dan Damelin
    Keymaster

    Here’s a CODAP doc with NC census tracts.

    https://codap.concord.org/releases/latest/static/dg/en/cert/index.html#shared=https%3A%2F%2Fcfm-shared.concord.org%2FrPsp6ogNPu0J6ZzzYj0p%2Ffile.json

    To make this I searched the web for NC census tracts geoJSON, but could not find that. I was able to find shapefiles, which were here.

    Then I opened this great tool (mapshaper.org) for simplifying and converting between various boundary file types. I uploaded the files that I had downloaded, clicked “simplify” and used the slider to reduce file size, and then “export” to save as geoJSON. Then you can just drag the geoJSON into CODAP and join tables based on one of the identifiers (assuming your data has one of those identifiers for linking).

    #8090
    Bill Finzer
    Keymaster

    Hello,

    I can think of two ways:

    First Way

    1. Create an attribute, let’s call it r.
    2. Give it the formula random().
    3. Clicking on the attribute name, choose Delete Formula (Keeping Values).
    4. Again clicking on the attribute name, choose Sort Ascending. (Don’t worry that the values near the top appear to be zero. They are just rounding to zero with two digits of precision.)
    5. Click on the first row in the case table to select the first case.
    6. Scroll down to the 500th row and shift-click that row. Now you have the 500 cases you want.
    7. In the case table’s inspector panel, click on the trash can and select Delete Unselected Cases. This leaves behind your desired random sample.

    Note that in step 7 instead of deleting, you could set aside the unselected cases, leaving them there so you could get a new random sample by restoring the set aside cases, re-randomizing, re-sorting, and re-setting aside.

    Second Way

    1. From the Plugins menu in the tool shelf, choose Sampler.
    2. From the buttons at the bottom, choose Collector. This fills the mixer with balls, one for each case in your dataset. They’re so densely packed you can’t see them as balls except for the top row.
    3. Edit the items and samples numbers to be 500 and 1 instead of 5 and 3.
    4. Choose the Options tab at the top.
    5. Click the without replacement option so you don’t get any duplicates.
    6. Go back to the Model tab and move the speed slider all the way to the right.
    7. Click the Start button to produce your sample.
    8. Delete all the attributes you don’t need: experiment, description, sample size, sample and output. The result is your desired sample of 500.
    9. Close the Sampler.
    10. From the Tables icon menu in the tool shelf, click the trash can next to your original dataset.

    Both ways have a lot of steps. Let us know if you have questions or problems.

    Bill

    #7088

    In reply to: Map color scale

    Jacob Sagrans
    Participant

    I’m revisiting this topic now because for a project I am working on I took a CODAP file a colleague created with Lyme disease data over the past 15 some years, added a map to it, and then created a slider to show change in Lyme rates from year to year (Bill, I am really indebted here to what you did for the smallpox over the years CODAP file). See the file I made here. I noticed that the minimum and maximum Lyme rate values of course change from year to year, which is a little confusing. I wonder if there might be some advantage to instead displaying something like simply 1, 2, 3, 4, 5 to represent the different quintiles on the color legend? Or I wonder if the quintiles could be set based on the full dataset and not the subset for each individual years (although there may be some cons to this if there is a lot of variation from year to year)? Just thinking/wondering aloud here, but I do think this issue becomes more complicated when instead of a static map there is a slider showing change over time.

    #6987
    Bill Finzer
    Keymaster

    Here is a link to a CODAP document that does something similar. Though the only slider showing is for r-squared, if you move the text component you will find collapsed sliders for the other parameters ready to uncollapse and play with.

    Enjoy!

    Bill

    #6933
    Andrew Ross
    Participant

    With GAISE documents pushing (quite rightly) for more multivariate thinking, I’m wondering how I could make a CODAP file that lets students play around with multiple regression, even though there’s no formal functionality for it in CODAP. Hopefully nobody minds if I brainstorm “out loud” here and see if anyone chimes in.

    Here’s my current idea: have a slider for each coefficient, and a column of predicted values constructed using a formula like

    InterceptSlider + coeff1slider * xvar1 + coeff2slider * xvar2 + …

    (not sure if I would have that pre-constructed, or ask students to construct it themselves), then construct a column of residuals. Have (or have them construct) a graph with x=prediction, y=residual. Have them use the Ruler option to show the mean & SD[footnote 1] of the residuals, and suggest that they play with the sliders to get the mean to be basically 0 and the SD to be as small as they could get it. Maybe have the slider values pre-set to something reasonable but not optimal.

    Then, have them open a text box that had been minimized that says what the optimal coefficient values are (perhaps quoting output from using lm() in R), and then they copy those to the slider values and see that the mean of the residuals ends up 0 and the SD of the residuals ends up smaller than they got it to be by playing around.

    Then they can spend time interpreting the coefficients, for example. And perhaps construct predictions for new datapoints that weren’t in the dataset. Maybe also compute R^2. Computing the SE or CI for each coefficient would be too hard, but if the output from lm() in R is included in a textbox, they could at least discuss or think about the SE or CI.

    Has anyone done this? Does anyone see issues that I’m not seeing, or have ideas for improving it?

    Something similar could be done with a Logistic-type regression or multiple regression, too!

    [footnote 1: I know that technically we should divide by n-#params rather than n-1, so SD isn’t quite the right thing, but I’m willing to go for the streamlined approach in intro stat, leaving the better version for a later stats class.]

    #6516
    Kathy Shafer
    Participant

    Hi, I have been using sliders to illustrate the effect of sample size on a distribution. In this example document, I created an attribute called arbitrary value. Since the attribute is generated with random(0,100) the values might not begin at 0 (good discussion topic).  RandomSampling100Cats_May2017_Slider is found here:

    https://codap.concord.org/app/static/dg/en/cert/index.html#shared=20890

    The dot plot with the MySample data is placed directly over the first plot (foreground).  The background was set to “Transparent” and the icons were set to black.

    Setting up the sampler is pretty straightforward.

    #6504
    Bill Finzer
    Keymaster
    #6502

    Thank Bill. I am definitely going to have to play around with the sliders for the second example you proposed. Thanks for sharing your ideas

    #6494
    Bill Finzer
    Keymaster

    Hello Travis,

    As in Desmos, CODAP’s sliders are used as parameters in formulas. Here are some specific use cases:

    1. In a scatter plot, it looks like the points fit nicely along some kind of curve. I plot a function in the scatter plot of the form yx^k where k is the name I have given to a slider. Then I adjust the slider in an attempt to make the curve pass through the points. This is definitely simple enough that high school students can construct it.
    2. We have incidence of smallpox by year from 1900 to 1960 for 88 countries. We want to display the countries on a map colored by smallpox incident for a given year, which is given by a slider. At the country level, we construct an attribute that tells us the incidence for that country in the slider’s year. We color the map with that attribute. Then when we drag or animate the slider the map colors show us the evolution of the disease over the world and over time. Too hard for students to construct, but useful for them to interact with.
    3. Dan Damelin made a powerful model of climate change with upwards of eight sliders, each representing different factors. Adjusting these sliders allows the user to observe the effect of these factors. High school students with reasonable algebraic skills can construct such models, starting, of course, with a small number of slider parameters.

    Perhaps others on this forum can suggest additional use cases?

    Bill

    #6492

    Hi all, I have used sliders in desmos before but I am curious as to how people use sliders in codap for teaching? Thanks for your insights in advance.

    #6405

    In reply to: Delete many attributes

    Bill Finzer
    Keymaster

    Hello Susanne,

    That’s a lot of attributes, so it makes sense you want students to delete them. Deleting each one separately is the most straightforward way to do this within CODAP. You, and they, may find it a bit easier to use the case card instead of the case table.

    As an alternative, import the Choosy plugin into the document containing the data using this url: https://codap.xyz/plugins/choosy/

    Go to the Attributes tab of Choosy and in the gray stripe next to none press the closed eye to hide all the attributes. (See image below.) Then click the slider next to each of the attributes you wish to keep. Voilá, you’re done and can close Choosy.

    The downside of this method is that the data values of all the hidden attributes are still present in the document, just hidden. This means that the document isn’t any smaller than when you started, in contrast to the first method.

    Hope this helps,

    Bill

    #6234
    Jonathan Sandoe
    Keymaster

    Hello,

    Here is your document modified with, I think, the slider working as you desired: https://codap.concord.org/app/static/dg/en/cert/index.html#shared=https%3A%2F%2Fcfm-shared.concord.org%2FZps4tjnOQN2Xg5y22nur%2Ffile.json

    It takes a slightly advanced use of formulas to create. You will see that the slider’s axis has been adjusted to have a range of 2-12. There are two new attributes in the case table. The first, ‘Month’, just rounds the slider value to an integer. The second uses a sequence of embedded ‘if’s to pick a column based on month. It’s a useful little trick.

    Jonathan Sandoe

    #6232
    Youngjun
    Participant

    Hello,

    Our team modified the sample CODAP document (States and Education) to create map data about COVID-19. We tried to add a slider to see the changes of positive cases in each state on the map as time passes (from January to December). Could you help us add a slider to our document so that a user may be able to observe the changes in the cases in each state over the full period provided from January to December, 2020?

    The link is as follows:

    https://codap.concord.org/app/static/dg/en/cert/index.html#shared=https%3A%2F%2Fcfm-shared.concord.org%2FshbZIBnSAuV4TQGsDNJT%2Ffile.json

    #5937
    Jacob Sagrans
    Participant

    I created the following CODAP document and was puzzled by how data displays on the map. https://codap.concord.org/releases/latest/static/dg/en/cert/index.html#shared=https%3A%2F%2Fcfm-shared.concord.org%2FYFLyWtWx2067MkBWt6QQ%2Ffile.json

    Specifically, if I select just March 12th in the table (without setting aside other days), I would expect to see just Androscoggin county highlighted on the map, with just a rate given for Androscoggin county, as there is no data for any of Maine’s other counties on that day. Instead, I see all the counties highlighted with the lightest color. At first I thought this meant that it would say the case rate was zero for all the other counties, but when I hover the mouse over a different county, I get a very small number for each county’s case rate.

    Where is this number coming from?

    If I set aside all days other than March 12th in the table, I get a map where only Androscoggin county is shown/has a case rate. But if possible I’d like to be able to just click on a date in the table without setting aside and see an accurate map for that day, as then I could more quickly go between different days on the map (or better yet, I would love to add a slider to add to map itself to quickly go backwards or forwards in time, although I don’t believe that functionality exists in CODAP).

    Thanks!

    Jacob

Viewing 15 results - 1 through 15 (of 26 total)