bertrandmartel / tableau-scraping

Tableau scraper python library. R and Python scripts to scrape data from Tableau viz
MIT License
131 stars 21 forks source link

Issue w/ filtering and parameters/selectable items #75

Open zfusfeld opened 1 year ago

zfusfeld commented 1 year ago

I am trying to scrape some data from a Tableau Public site - specifically PA's ODSMP data on overdose trends[ttps://public.tableau.com/views/PennsylvaniaODSMPDrugOverdoseSurveillanceInteractiveDataReport/ED-TimeTrends

It would be one thing if i was able to identify view URLs for specific data frames within the dashboard, but I am unfortunately unable to identify these view URLs past the ones for each tab in the dashboard (and I've tried).

So I figured with some combination of setParameters, setFilters, etc I'd be able to get the data frame that I want.

Code here:

from tableauscraper import TableauScraper as TS

url = "https://public.tableau.com/views/PennsylvaniaODSMPDrugOverdoseSurveillanceInteractiveDataReport/ED-TimeTrends"

ts = TS()
ts.loads(url)

workbook = ts.getWorkbook()

for t in workbook.worksheets:
    print(f"worksheet name : {t.name}") #show worksheet name
    print(t.data) #show dataframe for this worksheet

ws = ts.getWorksheet("ED+Hosp-Trends")

params = workbook.getParameters 
print(params) #params are blank no params?
selects = ws.getSelectableItems()
print(selects) #in 'ATTR(Class1)', only "Any Drug Overdose" present
filters = ws.getFilters()
print(filters)

wb =ws.setFilter('County1',['Pennsylvania','Adams','Allegheny','Armstrong', 'Beaver', 'Bedford', 'Berks', 'Blair', 'Bradford', 'Bucks', 'Butler', 'Cambria', 'Cameron', 'Carbon', 'Centre', 'Chester', 'Clarion', 'Clearfield', 'Clinton', 'Columbia', 'Crawford', 'Cumberland', 'Dauphin', 'Delaware', 'Elk', 'Erie', 'Fayette', 'Forest', 'Franklin', 'Fulton', 'Greene', 'Huntingdon', 'Indiana', 'Jefferson', 'Juniata', 'Lackawanna', 'Lancaster', 'Lawrence', 'Lebanon', 'Lehigh', 'Luzerne', 'Lycoming', 'McKean', 'Mercer', 'Mifflin', 'Monroe', 'Montgomery', 'Montour', 'Northampton', 'Northumberland', 'Perry', 'Philadelphia', 'Pike', 'Potter', 'Schuylkill', 'Snyder', 'Somerset', 'Sullivan', 'Susquehanna', 'Tioga', 'Union', 'Venango', 'Warren', 'Washington', 'Wayne', 'Westmoreland', 'Wyoming', 'York'])

countyWs = wb.getWorksheet("ED+Hosp-Trends")
print(countyWs.data)

(countyWs.data).to_csv('CountyData_AnyOverDose.csv')

With the above code block which works fine, I can get all the data on all counties for each quarter available but only for the "Any Drug Overdose" category - I was able to do this using the setFilter option, but unfortunately filtering by Class doesn't work, because ATTR(Class1) (the column associated w/the drug overdose type) isn't a filter - it also isn't a Parameter, and only partialyl exists within selectableItems.

Specifically, while the selectable items does have 'ATTR(Class1)' as a selectable item, unfortunately the only values in the workbook seem to be "Any Drug Overdose" and I am not sure why.

If anybody has any workaround for how i can change the selection (or identify the view URL for different selections, which I think would also work) it would be much appreciated!

zfusfeld commented 1 year ago

and here is the output from that block of code

<details><summary>Details</summary>
<p>

worksheet name : ED+Hosp Map
   County1-alias SUM(Count)-alias Latitude (generated)-value  \
0           York            6.322                    39.9734   
1        Wyoming            1.921                    41.5143   
2   Westmoreland            5.721                    40.3607   
3          Wayne            4.083                    41.6172   
4     Washington            8.116                    40.2155   
..           ...              ...                        ...   
62       Bedford            3.793                    40.0255   
63        Beaver            9.422                    40.6657   
64     Armstrong            8.296                    40.8485   
65     Allegheny            5.961                    40.4317   
66         Adams            3.649                    39.8953   

   Latitude (generated)-alias Longitude (generated)-value  \
0                      39.973                    -76.7442   
1                      41.514                     -76.007   
2                      40.361                    -79.3848   
3                      41.617                    -75.2609   
4                      40.216                    -80.2389   
..                        ...                         ...   
62                     40.026                     -78.483   
63                     40.666                    -80.3336   
64                     40.849                    -79.4535   
65                     40.432                    -80.0043   
66                     39.895                    -77.2259   

   Longitude (generated)-alias ATTR(Rate v count label)-alias  \
0                      -76.744          per 10,000 Population   
1                      -76.007          per 10,000 Population   
2                      -79.385          per 10,000 Population   
3                      -75.261          per 10,000 Population   
4                      -80.239          per 10,000 Population   
..                         ...                            ...   
62                     -78.483          per 10,000 Population   
63                     -80.334          per 10,000 Population   
64                     -79.454          per 10,000 Population   
65                     -80.004          per 10,000 Population   
66                     -77.226          per 10,000 Population   

   ATTR(Class1)-alias                               ATTR(Measure1)-alias  \
0   Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
1   Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
2   Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
3   Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
4   Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
..                ...                                                ...   
62  Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
63  Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
64  Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
65  Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
66  Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   

   ATTR(Notes)-alias ATTR(Time Period1)-alias  
0             %null%                  2023 Q2  
1             %null%                  2023 Q2  
2             %null%                  2023 Q2  
3             %null%                  2023 Q2  
4             %null%                  2023 Q2  
..               ...                      ...  
62            %null%                  2023 Q2  
63            %null%                  2023 Q2  
64            %null%                  2023 Q2  
65            %null%                  2023 Q2  
66            %null%                  2023 Q2  

[67 rows x 11 columns]
worksheet name : ED+Hosp-Trends
    County1-value County1-alias Time Period1-value Time Period1-alias  \
0    Philadelphia  Philadelphia            2015 Q1            2015 Q1   
1    Philadelphia  Philadelphia            2015 Q2            2015 Q2   
2    Philadelphia  Philadelphia            2015 Q3            2015 Q3   
3    Philadelphia  Philadelphia            2015 Q4            2015 Q4   
4    Philadelphia  Philadelphia            2016 Q1            2016 Q1   
..            ...           ...                ...                ...   
97   Pennsylvania  Pennsylvania            2022 Q2            2022 Q2   
98   Pennsylvania  Pennsylvania            2022 Q3            2022 Q3   
99   Pennsylvania  Pennsylvania            2022 Q4            2022 Q4   
100  Pennsylvania  Pennsylvania            2023 Q1            2023 Q1   
101  Pennsylvania  Pennsylvania            2023 Q2            2023 Q2   

    SUM(Count)-value SUM(Count)-alias ATTR(Rate v count label)-alias  \
0              5.994            5.994          per 10,000 Population   
1              7.323            7.323          per 10,000 Population   
2              9.264            9.264          per 10,000 Population   
3              9.359            9.359          per 10,000 Population   
4              8.208            8.208          per 10,000 Population   
..               ...              ...                            ...   
97             7.394            7.394          per 10,000 Population   
98             7.876            7.876          per 10,000 Population   
99             7.059            7.059          per 10,000 Population   
100            7.132            7.132          per 10,000 Population   
101            7.298            7.298          per 10,000 Population   

    ATTR(Class1)-alias                               ATTR(Measure1)-alias  \
0    Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
1    Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
2    Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
3    Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
4    Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
..                 ...                                                ...   
97   Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
98   Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
99   Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
100  Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
101  Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   

    ATTR(Notes)-alias ATTR(Time Period1)-alias  
0              %null%                  2015 Q1  
1              %null%                  2015 Q2  
2              %null%                  2015 Q3  
3              %null%                  2015 Q4  
4              %null%                  2016 Q1  
..                ...                      ...  
97             %null%                  2022 Q2  
98             %null%                  2022 Q3  
99             %null%                  2022 Q4  
100            %null%                  2023 Q1  
101            %null%                  2023 Q2  

[102 rows x 11 columns]
worksheet name : dateupdated
  MONTH(today)-alias WEEK(last year)-alias
0          July 2023       August 21, 2022
worksheet name : info
   SUM(menu)-alias
0                1
worksheet name : menu
   SUM(menu)-alias
0                1
[]
[{'column': 'County1', 'values': ['Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Philadelphia', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Allegheny', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania', 'Pennsylvania']}, {'column': 'Time Period1', 'values': ['2015 Q1', '2015 Q2', '2015 Q3', '2015 Q4', '2016 Q1', '2016 Q2', '2016 Q3', '2016 Q4', '2017 Q1', '2017 Q2', '2017 Q3', '2017 Q4', '2018 Q1', '2018 Q2', '2018 Q3', '2018 Q4', '2019 Q1', '2019 Q2', '2019 Q3', '2019 Q4', '2020 Q1', '2020 Q2', '2020 Q3', '2020 Q4', '2021 Q1', '2021 Q2', '2021 Q3', '2021 Q4', '2022 Q1', '2022 Q2', '2022 Q3', '2022 Q4', '2023 Q1', '2023 Q2', '2015 Q1', '2015 Q2', '2015 Q3', '2015 Q4', '2016 Q1', '2016 Q2', '2016 Q3', '2016 Q4', '2017 Q1', '2017 Q2', '2017 Q3', '2017 Q4', '2018 Q1', '2018 Q2', '2018 Q3', '2018 Q4', '2019 Q1', '2019 Q2', '2019 Q3', '2019 Q4', '2020 Q1', '2020 Q2', '2020 Q3', '2020 Q4', '2021 Q1', '2021 Q2', '2021 Q3', '2021 Q4', '2022 Q1', '2022 Q2', '2022 Q3', '2022 Q4', '2023 Q1', '2023 Q2', '2015 Q1', '2015 Q2', '2015 Q3', '2015 Q4', '2016 Q1', '2016 Q2', '2016 Q3', '2016 Q4', '2017 Q1', '2017 Q2', '2017 Q3', '2017 Q4', '2018 Q1', '2018 Q2', '2018 Q3', '2018 Q4', '2019 Q1', '2019 Q2', '2019 Q3', '2019 Q4', '2020 Q1', '2020 Q2', '2020 Q3', '2020 Q4', '2021 Q1', '2021 Q2', '2021 Q3', '2021 Q4', '2022 Q1', '2022 Q2', '2022 Q3', '2022 Q4', '2023 Q1', '2023 Q2']}, {'column': 'SUM(Count)', 'values': [5.994, 7.323, 9.264, 9.359, 8.208, 9.432, 10.637, 12.863, 13.789, 17.31, 16.937, 13.454, 12.222, 15.034, 19.73, 17.996, 17.255, 18.978, 18.953, 17.022, 16.764, 16.933, 16.746, 15.815, 15.657, 17.669, 18.024, 14.382, 13.094, 14.357, 14.966, 13.113, 13.545, 14.598, 5.743, 7.004, 6.223, 6.15, 7.711, 8.599, 11.395, 11.949, 11.881, 12.701, 12.332, 9.808, 8.673, 8.69, 9.429, 9.331, 8.045, 9.682, 10.578, 8.974, 9.193, 8.817, 10.082, 8.761, 7.778, 9.159, 7.697, 6.736, 5.953, 6.631, 7.253, 7.092, 6.34, 5.961, 5.176, 6.905, 7.518, 6.629, 6.762, 7.38, 8.627, 8.848, 8.96, 10.162, 10.193, 8.653, 7.723, 8.899, 10.349, 9.257, 8.483, 9.596, 9.935, 8.778, 8.484, 8.854, 9.543, 8.438, 8.156, 9.269, 9.327, 7.815, 7.165, 7.394, 7.876, 7.059, 7.132, 7.298]}, {'column': 'ATTR(Rate v count label)', 'values': [' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population', ' per 10,000 Population']}, {'column': 'ATTR(Class1)', 'values': ['Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose', 'Any Drug Overdose']}, {'column': 'ATTR(Measure1)', 'values': ['Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)', 'Rate of ED Visits per 10,000 Population (by home location)']}, {'column': 'ATTR(Notes)', 'values': ['%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%', '%null%']}, {'column': 'ATTR(Time Period1)', 'values': ['2015 Q1', '2015 Q2', '2015 Q3', '2015 Q4', '2016 Q1', '2016 Q2', '2016 Q3', '2016 Q4', '2017 Q1', '2017 Q2', '2017 Q3', '2017 Q4', '2018 Q1', '2018 Q2', '2018 Q3', '2018 Q4', '2019 Q1', '2019 Q2', '2019 Q3', '2019 Q4', '2020 Q1', '2020 Q2', '2020 Q3', '2020 Q4', '2021 Q1', '2021 Q2', '2021 Q3', '2021 Q4', '2022 Q1', '2022 Q2', '2022 Q3', '2022 Q4', '2023 Q1', '2023 Q2', '2015 Q1', '2015 Q2', '2015 Q3', '2015 Q4', '2016 Q1', '2016 Q2', '2016 Q3', '2016 Q4', '2017 Q1', '2017 Q2', '2017 Q3', '2017 Q4', '2018 Q1', '2018 Q2', '2018 Q3', '2018 Q4', '2019 Q1', '2019 Q2', '2019 Q3', '2019 Q4', '2020 Q1', '2020 Q2', '2020 Q3', '2020 Q4', '2021 Q1', '2021 Q2', '2021 Q3', '2021 Q4', '2022 Q1', '2022 Q2', '2022 Q3', '2022 Q4', '2023 Q1', '2023 Q2', '2015 Q1', '2015 Q2', '2015 Q3', '2015 Q4', '2016 Q1', '2016 Q2', '2016 Q3', '2016 Q4', '2017 Q1', '2017 Q2', '2017 Q3', '2017 Q4', '2018 Q1', '2018 Q2', '2018 Q3', '2018 Q4', '2019 Q1', '2019 Q2', '2019 Q3', '2019 Q4', '2020 Q1', '2020 Q2', '2020 Q3', '2020 Q4', '2021 Q1', '2021 Q2', '2021 Q3', '2021 Q4', '2022 Q1', '2022 Q2', '2022 Q3', '2022 Q4', '2023 Q1', '2023 Q2']}]
[{'column': 'County1', 'ordinal': 0, 'values': ['Pennsylvania', 'Adams', 'Allegheny', 'Armstrong', 'Beaver', 'Bedford', 'Berks', 'Blair', 'Bradford', 'Bucks', 'Butler', 'Cambria', 'Cameron', 'Carbon', 'Centre', 'Chester', 'Clarion', 'Clearfield', 'Clinton', 'Columbia', 'Crawford', 'Cumberland', 'Dauphin', 'Delaware', 'Elk', 'Erie', 'Fayette', 'Forest', 'Franklin', 'Fulton', 'Greene', 'Huntingdon', 'Indiana', 'Jefferson', 'Juniata', 'Lackawanna', 'Lancaster', 'Lawrence', 'Lebanon', 'Lehigh', 'Luzerne', 'Lycoming', 'McKean', 'Mercer', 'Mifflin', 'Monroe', 'Montgomery', 'Montour', 'Northampton', 'Northumberland', 'Perry', 'Philadelphia', 'Pike', 'Potter', 'Schuylkill', 'Snyder', 'Somerset', 'Sullivan', 'Susquehanna', 'Tioga', 'Union', 'Venango', 'Warren', 'Washington', 'Wayne', 'Westmoreland', 'Wyoming', 'York'], 'globalFieldName': '[federated.0s134hy08qgkzd10o4nj215amiyk (copy)].[none:County:nk]', 'selection': ['Pennsylvania', 'Allegheny', 'Philadelphia'], 'selectionAlt': [{'fn': '[federated.0s134hy08qgkzd10o4nj215amiyk (copy)].[none:County:nk]', 'columnFullNames': ['[County1]'], 'domainTables': [{'isSelected': True, 'label': 'Pennsylvania'}]}]}]
     County1-value County1-alias Time Period1-value Time Period1-alias  \
0             York          York            2015 Q1            2015 Q1   
1             York          York            2015 Q2            2015 Q2   
2             York          York            2015 Q3            2015 Q3   
3             York          York            2015 Q4            2015 Q4   
4             York          York            2016 Q1            2016 Q1   
...            ...           ...                ...                ...   
2185  Pennsylvania  Pennsylvania            2022 Q2            2022 Q2   
2186  Pennsylvania  Pennsylvania            2022 Q3            2022 Q3   
2187  Pennsylvania  Pennsylvania            2022 Q4            2022 Q4   
2188  Pennsylvania  Pennsylvania            2023 Q1            2023 Q1   
2189  Pennsylvania  Pennsylvania            2023 Q2            2023 Q2   

     SUM(Count)-value SUM(Count)-alias ATTR(Rate v count label)-alias  \
0               4.413            4.413          per 10,000 Population   
1               6.472            6.472          per 10,000 Population   
2               7.151            7.151          per 10,000 Population   
3               6.608            6.608          per 10,000 Population   
4               5.766            5.766          per 10,000 Population   
...               ...              ...                            ...   
2185            7.394            7.394          per 10,000 Population   
2186            7.876            7.876          per 10,000 Population   
2187            7.059            7.059          per 10,000 Population   
2188            7.132            7.132          per 10,000 Population   
2189            7.298            7.298          per 10,000 Population   

     ATTR(Class1)-alias                               ATTR(Measure1)-alias  \
0     Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
1     Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
2     Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
3     Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
4     Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
...                 ...                                                ...   
2185  Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
2186  Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
2187  Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
2188  Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   
2189  Any Drug Overdose  Rate of ED Visits per 10,000 Population (by ho...   

     ATTR(Notes)-alias ATTR(Time Period1)-alias  
0               %null%                  2015 Q1  
1               %null%                  2015 Q2  
2               %null%                  2015 Q3  
3               %null%                  2015 Q4  
4               %null%                  2016 Q1  
...                ...                      ...  
2185            %null%                  2022 Q2  
2186            %null%                  2022 Q3  
2187            %null%                  2022 Q4  
2188            %null%                  2023 Q1  
2189            %null%                  2023 Q2  

[2190 rows x 11 columns]

</p>
</details>