<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Getting Table from Web into SAS Data Set in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Getting-Table-from-Web-into-SAS-Data-Set/m-p/643972#M192272</link>
    <description>&lt;P&gt;I am wondering how to convert a table on a website into a SAS data set. I'm trying to do this on a somewhat regular basis, so I'm trying to find a good way to automate it. The website I'm trying to access is: &lt;A href="https://covidtracking.com/data/state/california#historical" target="_blank"&gt;https://covidtracking.com/data/state/california#historical&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table I'm trying to access is the "History" table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realize some parsing is needed, but I seem to be unable to even locate the data in my sas session. When I run the following code I don't get any errors, but I am unable to access the data "src" anywhere as far as I can tell.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;filename src temp;
proc http
method="GET"
url="https://covidtracking.com/data/state/california#historical"
out=src;
run;&lt;/PRE&gt;</description>
    <pubDate>Wed, 29 Apr 2020 14:37:37 GMT</pubDate>
    <dc:creator>A_SAS_Man</dc:creator>
    <dc:date>2020-04-29T14:37:37Z</dc:date>
    <item>
      <title>Getting Table from Web into SAS Data Set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-Table-from-Web-into-SAS-Data-Set/m-p/643972#M192272</link>
      <description>&lt;P&gt;I am wondering how to convert a table on a website into a SAS data set. I'm trying to do this on a somewhat regular basis, so I'm trying to find a good way to automate it. The website I'm trying to access is: &lt;A href="https://covidtracking.com/data/state/california#historical" target="_blank"&gt;https://covidtracking.com/data/state/california#historical&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table I'm trying to access is the "History" table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realize some parsing is needed, but I seem to be unable to even locate the data in my sas session. When I run the following code I don't get any errors, but I am unable to access the data "src" anywhere as far as I can tell.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;filename src temp;
proc http
method="GET"
url="https://covidtracking.com/data/state/california#historical"
out=src;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Apr 2020 14:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-Table-from-Web-into-SAS-Data-Set/m-p/643972#M192272</guid>
      <dc:creator>A_SAS_Man</dc:creator>
      <dc:date>2020-04-29T14:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Table from Web into SAS Data Set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-Table-from-Web-into-SAS-Data-Set/m-p/643999#M192290</link>
      <description>&lt;P&gt;&lt;A href="https://data.chhs.ca.gov/dataset/california-covid-19-hospital-data-and-case-statistics/resource/6cd8d424-dfaa-4bdd-9410-a3d656e1176e?view_id=b23b0158-a85d-4bf2-95b1-96f7556f7342" target="_blank"&gt;https://data.chhs.ca.gov/dataset/california-covid-19-hospital-data-and-case-statistics/resource/6cd8d424-dfaa-4bdd-9410-a3d656e1176e?view_id=b23b0158-a85d-4bf2-95b1-96f7556f7342&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What about this source instead? From the open data portal and the API guide is there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 15:33:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-Table-from-Web-into-SAS-Data-Set/m-p/643999#M192290</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-04-29T15:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Table from Web into SAS Data Set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-Table-from-Web-into-SAS-Data-Set/m-p/644011#M192298</link>
      <description>&lt;P&gt;I think you would be better served by using the json data from the same web site&amp;nbsp;&lt;A href="https://covidtracking.com/api" target="_blank"&gt;https://covidtracking.com/api.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Based on their api documentation on the same web site, here is how you can California Historical data into a SAS data set&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename resp temp;
 
/* Neat service from Open Notify project */
proc http 
 url="https://covidtracking.com/api/v1/states/CA/daily.json"
 method= "GET"
 out=resp;
run;
 
/* Assign a JSON library to the HTTP response */
libname covid JSON fileref=resp;
 
proc print data=covid.root (drop=ordinal:);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Ahmed&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 16:03:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-Table-from-Web-into-SAS-Data-Set/m-p/644011#M192298</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2020-04-29T16:03:27Z</dc:date>
    </item>
  </channel>
</rss>

