Skip to content

gohkokhan/covid19_JHU_dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

covid19_JHU_dashboard

This bash script pull the data from JHU dashboard https://gisanddata.maps.arcgis.com/apps/opsdashboard/index.html#/bda7594740fd40299423467b48e9ecf6 (not Github) in real-time and use JQ to clean the JSON and convert the JSON to newline delimiter JSON (the JSON format which is required to load into Google BigQuery)

I've been using this method since March for my interactive dashboard on Google Data Studio: https://datastudio.google.com/reporting/f56febd8-5c42-4191-bcea-87a3396f4508

If you are using the script/data, consider Star it. Thanks

How I derived the cUrl url? I read the official documentation of ArcGIS on how to query a feature layer, then I manually type in to query the data that I want.

Link to the documentation: https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm

Example of the output data:

{"objectIdFieldName":"OBJECTID","uniqueIdField":{"name":"OBJECTID","isSystemMaintained":true},"globalIdFieldName":"","geometryType":"esriGeometryPoint","spatialReference":{"wkid":4326,"latestWkid":4326},"fields":[{"name":"OBJECTID","type":"esriFieldTypeOID","alias":"OBJECTID","sqlType":"sqlTypeOther","domain":null,"defaultValue":null},{"name":"Province_State","type":"esriFieldTypeString","alias":"Province/State","sqlType":"sqlTypeOther","length":8000,"domain":null,"defaultValue":null},{"name":"Country_Region","type":"esriFieldTypeString","alias":"Country/Region","sqlType":"sqlTypeOther","length":8000,"domain":null,"defaultValue":null},{"name":"Last_Update","type":"esriFieldTypeDate","alias":"Last Update","sqlType":"sqlTypeOther","length":8,"domain":null,"defaultValue":null},{"name":"Lat","type":"esriFieldTypeDouble","alias":"Lat","sqlType":"sqlTypeOther","domain":null,"defaultValue":null},{"name":"Long_","type":"esriFieldTypeDouble","alias":"Long","sqlType":"sqlTypeOther","domain":null,"defaultValue":null},{"name":"Confirmed","type":"esriFieldTypeInteger","alias":"Confirmed","sqlType":"sqlTypeOther","domain":null,"defaultValue":null},{"name":"Recovered","type":"esriFieldTypeInteger","alias":"Recovered","sqlType":"sqlTypeOther","domain":null,"defaultValue":null},{"name":"Deaths","type":"esriFieldTypeInteger","alias":"Deaths","sqlType":"sqlTypeOther","domain":null,"defaultValue":null},{"name":"Active","type":"esriFieldTypeInteger","alias":"Active","sqlType":"sqlTypeOther","domain":null,"defaultValue":null},{"name":"Admin2","type":"esriFieldTypeString","alias":"County","sqlType":"sqlTypeOther","length":8000,"domain":null,"defaultValue":null},{"name":"FIPS","type":"esriFieldTypeString","alias":"FIPS","sqlType":"sqlTypeOther","length":5,"domain":null,"defaultValue":null},{"name":"Combined_Key","type":"esriFieldTypeString","alias":"Combined_Key","sqlType":"sqlTypeOther","length":8000,"domain":null,"defaultValue":null}],"features":[{"attributes":{"OBJECTID":1,"Province_State":"Alberta","Country_Region":"Canada","Last_Update":1585617459000,"Lat":53.9333,"Long_":-116.5765,"Confirmed":690,"Recovered":0,"Deaths":8,"Active":0,"Admin2":null,"FIPS":null,"Combined_Key":"Alberta, Canada"}},{"attributes":{"OBJECTID":2,"Province_State":"Anguilla","Country_Region":"United Kingdom","Last_Update":1585617102000,"Lat":18.2206,"Long_":-63.0686,"Confirmed":2,"Recovered":0,"Deaths":0,"Active":2,"Admin2":null,"FIPS":null,"Combined_Key":"Anguilla, United Kingdom"}},{"attributes":{"OBJECTID":3,"Province_State":"Anhui","Country_Region":"China","Last_Update":1583644741000,"Lat":31.8257,"Long_":117.2264,"Confirmed":990,"Recovered":984,"Deaths":6,"Active":0,"Admin2":null,"FIPS":null,"Combined_Key":"Anhui, China"}},{"attributes":{"OBJECTID":4,"Province_State":"Aruba","Country_Region":"Netherlands","Last_Update":1585617102000,"Lat":12.5211,"Long_":-69.9683,"Confirmed":50,"Recovered":1,"Deaths":0,"Active":49,"Admin2":null,"FIPS":null,"Combined_Key":"Aruba, Netherlands"}},{"attributes":{"OBJECTID":5,"Province_State":"Australian Capital Territory","Country_Region":"Australia","Last_Update":1585617472000,"Lat":-35.4735,"Long_":149.0124,"Confirmed":78,"Recovered":2,"Deaths":1,"Active":75,"Admin2":null,"FIPS":null,"Combined_Key":"Australian Capital Territory, Australia"}},{"attributes":{"OBJECTID":6,"Province_State":"Beijing","Country_Region":"China","Last_Update":1585546483000,"Lat":40.1824,"Long_":116.4142,"Confirmed":577,"Recovered":415,"Deaths":8,"Active":154,"Admin2":null,"FIPS":null,"Combined_Key":"Beijing, China"}},{"attributes":{"OBJECTID":7,"Province_State":"Bermuda","Country_Region":"United Kingdom","Last_Update":1585617102000,"Lat":32.3078,"Long_":-64.7505,"Confirmed":27,"Recovered":2,"Deaths":0,"Active":25,"Admin2":null,"FIPS":null,"Combined_Key":"Bermuda, United Kingdom"}},{"attributes":{"OBJECTID":8,"Province_State":"British Columbia","Country_Region":"Canada","Last_Update":1585617459000,"Lat":53.7267,"Long_":-127.6476,"Confirmed":970,"Recovered":0,"Deaths":19,"Active":0,"Admin2":null,"FIPS":null,"Combined_Key":"British Columbia, Canada"}},{"attributes":{"OBJECTID":9,"Province_State":"British Virgin Islands","Country_Region":"United Kingdom","Last_Update":1585617102000,"Lat":18.4207,"Long_":-64.64,"Confirmed":2,"Recovered":0,"Deaths":0,"Active":2,"Admin2":null,"FIPS":null,"Combined_Key":"British Virgin Islands, United Kingdom"}},{"attributes":{"OBJECTID":10,"Province_State":"Cayman Islands","Country_Region":"United Kingdom","Last_Update":1585617102000,"Lat":19.3133,"Long_":-81.2546,"Confirmed":12,"Recovered":0,"Deaths":1,"Active":11,"Admin2":null,"FIPS":null,"Combined_Key":"Cayman Islands, United Kingdom"}},{"attributes":{"OBJECTID":11,"Province_State":"Channel Islands","Country_Region":"United Kingdom","Last_Update":1585617102000,"Lat":49.3723,"Long_":-2.3644,"Confirmed":141,"Recovered":0,"Deaths":2,"Active":139,"Admin2":null,"FIPS":null,"Combined_Key":"Channel Islands, United Kingdom"}},{"attributes":{"OBJECTID":12,"Province_State":"Chongqing","Country_Region":"China","Last_Update":1585440852000,"Lat":30.0572,"Long_":107.874,"Confirmed":579,"Recovered":570,"Deaths":6,"Active":3,"Admin2":null,"FIPS":null,"Combined_Key":"Chongqing, China"}},{"attributes":{"OBJECTID":13,"Province_State":"Curacao","Country_Region":"Netherlands","Last_Update":1585617102000,"Lat":12.1696,"Long_":-68.99,"Confirmed":11,"Recovered":2,"Deaths":1,"Active":8,"Admin2":null,"FIPS":null,"Combined_Key":"Curacao, Netherlands"}},...```

About

This script pull the data from JHU dashboard in real-time

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages