Skip to content

Multiple time options not properly supported #32

Description

@bmschmidt

With the dev change, the ability to have multiple time options seems to have fallen out.

I just pushed a temporary patch that hardcodes the time option to the first time available. It looks the code is still there to handle multiple times properly; but it's not getting called. The code was trying to grab the time measure field from the GUI: but on the first initialization that hasn't been set, maybe, and needs to be read from the options.json directly? I'm not sure whether that time_measure option dropdown is properly configured in the GUI. @organisciak, did you try to address this at all in your fixes, do you remember?

Activity

  1. organisciak commented on Sep 1, 2016

    @organisciak
    Member

    I didn't address it in my updates other than catching the error and adding a console.warn("Trying to access slider before initialization.") as a reminder that yes, the error is caught, but it should really be fixed.

  2. organisciak commented on Sep 1, 2016

    @organisciak
    Member

    Uh oh, quick note: if you hardcoded a temporary patch, I already have that in the code I'm looking at, which means that I had commits that weren't checked in. Investigating this right now, this may explain the other issue that you were seeing and I wasn't.

    image

  3. organisciak commented on Sep 1, 2016

    @organisciak
    Member

    Okay, I see, I put warnings for both the smoothing slider and year slider, but added the hardcoded workaround only for the latter. No extra versions hidden somewhere. The [0,2016] hardcode should be fixed.

    What's the use case for multiple time sliders, so I can take a look?

  4. bmschmidt commented on Sep 1, 2016

    @bmschmidt
    MemberAuthor

    Two major use cases for multiple sliders:

    1. Two legimitately different measures of time. The OL Bookworm lets you plot with x axis as author birth year, as well as publication year.
    2. When a single time variable is rounded at multiple resolutions. I don't have a functioning linechart GUI, but using the D3 interface to Chronicling America, you want to be able to see

    (Do the CORS headers mean that we could debug one of these interfaces remotely by changing the host in options.json without my having to repull changes to my local server? If so, it might be worth doing; I can help set up.)

  5. organisciak commented on Sep 1, 2016

    @organisciak
    Member

    Cool!

    Yes, you can point options.json to any GUI with the CORS headers, so you
    can develop on your PC with a remote API. I'm sure you know this, but
    you'll have to run a local server because of security restrictions around
    file://. Easiest way to serve a directory on localhost is python -mSimpleHTTPServer.

    On Thu, Sep 1, 2016 at 5:30 PM Benjamin Schmidt notifications@github.com
    wrote:

    Two major use cases for multiple sliders:

    Two legimitately different measures of time. The OL Bookworm lets you
    plot with x axis as author birth year, as well as publication year.
    http://benschmidt.org/OL/
    2.

    When a single time variable is rounded at multiple resolutions. I
    don't have a functioning linechart GUI, but using the D3 interface to
    Chronicling America, you want to be able to see

    1. How often Christmas is used by week of the year
      http://benschmidt.org/D3/#%7B%22database%22%3A%22ChronAm%22%2C%22plotType%22%3A%22linechart%22%2C%22method%22%3A%22return_json%22%2C%22search_limits%22%3A%7B%22word%22%3A%5B%22Christmas%22%5D%7D%2C%22aesthetic%22%3A%7B%22y%22%3A%22WordsPerMillion%22%2C%22x%22%3A%22publish_week_year%22%7D%2C%22counttype%22%3A%5B%22WordsPerMillion%22%5D%2C%22groups%22%3A%5B%22publish_week_year%22%5D%7D
    2. How often Christmas is used by historical year
      http://benschmidt.org/D3/#%7B%22database%22%3A%22ChronAm%22%2C%22plotType%22%3A%22linechart%22%2C%22method%22%3A%22return_json%22%2C%22search_limits%22%3A%7B%22word%22%3A%5B%22Christmas%22%5D%7D%2C%22aesthetic%22%3A%7B%22y%22%3A%22WordsPerMillion%22%2C%22x%22%3A%22publish_year%22%7D%2C%22counttype%22%3A%5B%22WordsPerMillion%22%5D%2C%22groups%22%3A%5B%22publish_year%22%5D%7D
      .

    (Do the CORS headers mean that we could debug one of these interfaces
    remotely by changing the host in options.json without my having to repull
    changes to my local server? If so, it might be worth doing; I can help set
    up.)

    —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub
    #32 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/AADj7_SQwIoV4yN1UD_k5OJwG659giZ9ks5ql2AegaJpZM4Jv0Z0
    .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions