I am trying to scrape data from a Tableau dashboard using Python. The dashboard is available at the following URL: https://www.apprenticeship.gov/data-and-statistics/apprentices-by-state-dashboard
I have tried using the requests
library to fetch the page content, but I am having difficulty extracting the data from the Tableau visualization. Here is what I have tried so far:
import requests
url = 'https://www.apprenticeship.gov/data-and-statistics/apprentices-by-state-dashboard'
response = requests.get(url)
print(response.content)
And also used https://github.com/bertrandmartel/tableau-scraping
and many other ways
My questions are:
- What is the best approach to scrape data from a Tableau dashboard?
- Are there any specific libraries or methods that work well with Tableau dashboards?
- Can anyone provide an example of how to extract data from the Tableau dashboard I have mentioned above using Python?
Additional Context:
- I am primarily interested in extracting tabular data presented in the dashboard into a CSV or any file format.
- I have basic knowledge of Python and web scraping techniques.
Any guidance or examples would be greatly appreciated. Thank you!