0

Map with user input control

Hi everyone,

I'm trying to build a klip with a map and a user input control to give the user the oportunity to select between two different variables associated with the different map regions. I know how to create the user input control, but haven't been able to associate the map to this filter.

Any help would be much appreciated!

Thank you

3 comments

  • 0
    Avatar
    Janice Janczyn

    Hi Carlos,

    If this is your first time working with user input controls, please see the following articles.

    For a map klip, you can add hidden data to the Regions and apply a filter to your data to select according to the variable assigned to your UI control. If you still have questions, please provide more details about your scenario: are the UI and Map component contained in the same multicomponent klip? What scope is the UI set to? What data are you trying to filter?

    Thank you,
                  Janice

     

  • 0
    Avatar
    Carlos Lopez

    Hi Janice,

     

    I've already read the articles you mention, but so far all my attempts have been unsuccessful.

    I'll try to be more specific.

    1) I want the UI and the map to be part of the same multicomponent klip.

    2) Data: I have three columns, one with the date of the event, one with the region ID, and one with the type of event (there are two types of events: incidents and downloads)

    3) I'd like to filter the map colour according to two different filters: "Date range" (Start date and end date) and "Type of event".

    4) For the date range I've tried to modify the example in (https://support.klipfolio.com/hc/en-us/articles/215548158-Building-a-User-Input-Control-to-filter-and-count-by-a-date-range) but I haven't been able to define a start and an end date.

    5) As for the "Type of event" filter, the problem I find is that, first I have to count how many events there are per type and region (in order to define the colour of the map), and then build the filter. 

    Thank you,

    Carlos

  • 0
    Avatar
    Janice Janczyn

    Hi Carlos,

    You may find this article more helpful for setting up date filtering with a date period selector: Date Filtering using a Date Drop Down Period-Selector. This may not describe your exact scenario, but I encourage you to step through it as it's a great way to learn the concepts so you can then modify them for your own purposes.

    Once your user input control klips are built, create/edit your map klip. Add hidden data to the Regions to filter your dates, then your formulas should look something like

              ID - points to region IDs in your data
         Color - points to type of event in your data
         Data - points to dates in your data

    • Ensure each of these subcomponents under Region (ID, Color, hidden data, etc) is aligned and have the same number of items.
    • Use the Actions menu to group by ID  (see the Filter, Group, Aggregate and Sort Actions article for details) and on the Color subcomponent, set Aggregation > Sum.
    • Apply filters to Color (filter on your event variable) and the hidden data (as described in the article above).

    If you have further questions, please email support@klipfolio.com.

    Thank you,
                 Janice

Please sign in to leave a comment.