Forum Discussion

Sreesudha_OC's avatar
Sreesudha_OC
Helper II
6 years ago
Solved

Extracting data from web and creating vizulalization

Hi All,

I would like to extract the data that you see in the below link & create some visuals like " case trend over time /daily forecast etc in a line chart or line & Clustered chart or in something else.

https://www.covid19india.org

Is there a way to pull this data from this website?

I have tried using Query Editor - Web option ( in navigator) however when i click on Web view, i see some message like "Table highlighting is disabled because this page uses Internet explorer compatibility mode.  How can i fix this.?"

 

How can i share some screenshots here. Kindly note, i am new to this forum so i would sincerely request your guidance to scale up my skills.

 

Thanks

Sudha

 

 

  • Hi,

    The link that you have provided is accepted by power bi however i have not got the desired ouput.

    I am trying to develop something like below. That is my end objective.

     

    http://travvise.com/COVID19.html

     

    For this i need some data sets from the previous link i have shared. As of now when i connect,  i am getting only some link. 

     

    Is there a way to share screenshot over here so that we can disucss more.

     
     

     

8 Replies

  • Hi. You can't take data from the web site because of the way it was created. You have to be a wizard of power query scrapping html.table to find something. You can go at the end of the link and check the data in other sites like github, api json, etc.

    I have tried to use the "Live" json of the https://api.covid19india.org/ and works perfect. Check the data to see if they have all rows or if you have to load the 6 jsons and append them together.

    let
        Source = Json.Document(Web.Contents("api.covid19india.org/raw_data6.json")),
        raw_data = Source[raw_data],
        #"Converted to Table" = Table.FromList(raw_data, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
        #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"agebracket", "contractedfromwhichpatientsuspected", "currentstatus", "dateannounced", "detectedcity", "detecteddistrict", "detectedstate", "entryid", "gender", "nationality", "notes", "numcases", "patientnumber", "source1", "source2", "source3", "statecode", "statepatientnumber", "statuschangedate", "typeoftransmission"}, {"Column1.agebracket", "Column1.contractedfromwhichpatientsuspected", "Column1.currentstatus", "Column1.dateannounced", "Column1.detectedcity", "Column1.detecteddistrict", "Column1.detectedstate", "Column1.entryid", "Column1.gender", "Column1.nationality", "Column1.notes", "Column1.numcases", "Column1.patientnumber", "Column1.source1", "Column1.source2", "Column1.source3", "Column1.statecode", "Column1.statepatientnumber", "Column1.statuschangedate", "Column1.typeoftransmission"})
    in
        #"Expanded Column1"

    Hope this helps,

    Regards,

    • Sreesudha_OC's avatar
      Sreesudha_OC
      Helper II

      Hi,

      Looks like your solution is too awesome.  Unfortunately, i dont have a deep technical background and i am not strong with json.

      If you can help me out a little bit more, that would be really helpful.  The data which you see in the website that i have shared,  keep refreshing almost 4-5 times in a day.

       

      In Query Editor navigator, how do i need to call this? In the api link you have shared i saw many csv files and that does not have latest dates. So i am little confused.  

       

      Thanks

      Sudha

       

       

       

      • ibarrau's avatar
        ibarrau
        Super User

        Go to the "Query Editor" or "Transform Data". Then under Advanced Editor copy and paste the code I have sent you. That will read the json file from the api. Then if you check that you need more data change the name of the json as the website. You can see all the jsons on this page:

        https://api.covid19india.org/

         

        Hope this helps