Connecting to APIs in Tableau Desktop using Python & TabPy

Поділитися
Вставка
  • Опубліковано 2 тра 2024
  • Don't forget to click Subscribe if you want more weekly data-related updates!
    Sometimes we want to connect directly to third-party data to enrich our analysis. For example, if you're looking at daily foreign exchange data it's more efficient to get this data directly through a API, on a daily basis. But how do you do this in Tableau?
    Join Tableau DataDev Ambassador Anya Prosvetova to learn how to extend Tableau's capabilities, and dynamically bring data from an external API directly to your Tableau dashboard using Python and TabPy
    Timestamps:
    0:00 - Intro
    1:20 - Intro to APIs
    3:30 - What is TabPy?
    4:00 - Intro to SCRIPT calcs
    8:50 - Writing & testing our script
    14:00 - Launching Tabpy
    19:20 - Building SCRIPT calcs
    Links:
    - Read TabPy documentation: github.com/tableau/TabPy
    - Read about TabPy configuration and security: tabscifi.golovatyi.info/
    - Learn more about data science in Tableau Desktop: www.tableau.com/about/blog/2018/8/working-external-services-tableau-tabpy-r-matlab-93351
    - Explore practical examples from Tableau: www.tableau.com/about/blog/2017/1/building-advanced-analytics-applications-tabpy-64916
    - Join Tableau Developer Program: www.tableau.com/developer
    - Install and Run TabPy on AWS EC2 video: • Analytics in the Cloud...
    - TabPy on Prep Conductor video: • TabPy on Prep Conductor
    - Connect with Anya on LinkedIn: / annaprosvetova
    - Follow Anya on Twitter: / anyalitica
    - See Anya's blog: www.prosvetova.com/
    ----------------------------------------------------------------------------------------------------
    Want more information about us? Head over to theinformationlab.co.uk
    Want to see more of our events? Head over to til.bi/talkdata to find out more
    ----------------------------------------------------------------------------------------------------
  • Наука та технологія

КОМЕНТАРІ • 25

  • @nazartymtsan5812
    @nazartymtsan5812 2 роки тому +5

    Clear voice focused and to the point. Very
    useful info. Appreciated!

  • @markuskoy4267
    @markuskoy4267 2 роки тому +2

    Very good video. Helped me a lot. Thank you very much.

  • @yuchenjin8799
    @yuchenjin8799 Рік тому +1

    How did you create the "Selected country" field? Thank you!

  • @sarwatzabeen8523
    @sarwatzabeen8523 7 місяців тому

    Hi, the _arg1[0] is not working for me and I'm getting a key error. are there further changes to the API?

  • @raulpinto2436
    @raulpinto2436 Рік тому +2

    Can anyone provide a link on how to set-up tabpy to tableau web server/ online. I am able to connect tabpy to Tableau Desktop. But if I want others to also access tabpy functionalities, i need Tableau Web server to talk to tabpy

  • @saiphanindra4081
    @saiphanindra4081 Рік тому

    Do we need to download condo complusory?

  • @JaiShriKrishna536
    @JaiShriKrishna536 5 місяців тому

    Whats the best way to call REST APIs through tableau that has results in data frame?

  • @sebastiandelpino1881
    @sebastiandelpino1881 2 роки тому

    Very useful video, thank you!! I try this test and having an error with the _arg1. Don't recognize it

    • @anyaprosvetova9824
      @anyaprosvetova9824 Рік тому

      Hi Sebastian, due to a change in the API, you'll need to use _arg1[0] instead. Hope that helps!

    • @abel_analytics
      @abel_analytics Рік тому

      Thank you

  • @abramswee
    @abramswee Рік тому

    I'm new to tableau. How did you managed to get that "selected country" field just below that misc filter box?

    • @anyaprosvetova9824
      @anyaprosvetova9824 Рік тому

      Hi CK, there's a field and a parameter called "Selected country". The parameter can easily be created by clicking on the dropdown-arrow in your data pane and select "Create Parameter". Set the data type to be a string and allow "all values". The field is a calculated field, the formula of which is shown at 31:30.

    • @abramswee
      @abramswee 2 місяці тому

      @@anyaprosvetova9824 thank you very much!

  • @priyankadahiphale5231
    @priyankadahiphale5231 23 дні тому

    How to return single string value in calculated field using Tableau data from python and present it on new sheet of Tableau as Text value.
    For example, Data contains lists of cities and population of city. These are represented in graph in Tableau. We would like to find city having maximum population. Python code is written using max function. The python code is returning correct value to tableau, however there are multiple rows returned to tableau while I need only single value.
    Incase we are using label for returning maximum population in Tableau, it doesn’t return any value if we are not passing parameters in row and column field which are used in python code.
    Below python code is used to find maximum population in city:
    SCRIPT_STR("
    city_list = _arg2
    population_list = _arg1
    highest_population = max(population_list)
    ind = population_list.index(highest_population)
    city_name = city_list [ind]
    output_str = ' '+str(city_name)+' with highest population: '+str(highest_population)
    return output_str
    ", ATTR([City]),SUM([Population]))

  • @hyunyounglee803
    @hyunyounglee803 Рік тому

    Hello, is it possible to connect API in Tableau Public too? or is it possible only with Tableau Desktop?

    • @theinformationlab
      @theinformationlab  Рік тому +2

      Hello! Tableau Public doesn't permit the use of TabPy, so for an example in this video, it would have to be on Tableau Desktop.

  • @user-ym5dw7tb7l
    @user-ym5dw7tb7l Рік тому

    how to get the URL

  • @Gaurav_from_Germany
    @Gaurav_from_Germany Рік тому

    How to get the data set ? could you please provide the dataset?

    • @theinformationlab
      @theinformationlab  Рік тому

      Hello Gaurav, this is the World Indicators dataset which is included with Tableau Desktop by default. You can access it by looking in the 'Saved Data Sources' section of the Connect pane when you load Tableau.

  • @betoalien
    @betoalien Рік тому

    Was working, but recently I tried to do it again and I receive it an error
    An error occurred while communicating with the Analytics Extension.
    Error processing script
    KeyError : 0

    • @MarcelKol27
      @MarcelKol27 Рік тому +2

      you have to include [0]. _Arg1[0] should be working

    • @shutterframephotography
      @shutterframephotography Рік тому +1

      @@MarcelKol27 Thank you so much :)

    • @vukdjunisijevic173
      @vukdjunisijevic173 10 місяців тому

      @@MarcelKol27 Lost half a day till I saw your comment. Is this some new rule? This should be also present if I am doing some other APIs (_arg1 should have [0]) or this is just for this particular case? Why did it change than it was before like in this video presentation? Thank you.

  • @hamadothman1477
    @hamadothman1477 2 роки тому

    where did selected country come from?

    • @theinformationlab
      @theinformationlab  2 роки тому +1

      There's a field and a parameter called "Selected country". The parameter can easily be created by clicking on the dropdown-arrow in your data pane and select "Create Parameter". Set the data type to be a string and allow "all values". The field is a calculated field, the formula of which is shown at 31:30.