Corona / Covid19 statistics in Grafana

Hi,

I created a JSON API to display Covid-19 statistics from John Hopkins University in Grafana that can be used with the JSON Datasource Plugin and allows you to display metrics for different countries. Install the plugin and pass the API Endpoint url into the URL field: https://covid19-grafana.herokuapp.com/

Source code for the API and information about which data is used can be found here: https://github.com/twei55/covid19-grafana-datasource

Feedback and contributions are welcome.

Stay healthy,
Tobi

2 Likes

For the record: similar Covid-19 project posted to Grafana Slack community:

1 Like

thanks for this. I’m getting:

in grafana.log:

t=2020-03-25T23:13:55+0000 lvl=eror msg=“Request error” logger=context userId=3 orgId=1 uname=removed error=“runtime error: invalid memory address or nil pointer dereference” stack=“/usr/local/go/src/runtime/panic.go:199 (0x44d65b)\n/usr/local/go/src/runtime/signal_unix.go:394 (0x44d498)\n/go/src/github.com/grafana/grafana/pkg/api/pluginproxy/ds_proxy.go:225 (0x10253cd)\n/go/src/github.com/grafana/grafana/pkg/api/pluginproxy/ds_proxy.go:81 (0x1024872)\n/go/src/github.com/grafana/grafana/pkg/api/dataproxy.go:35 (0x1436d88)\n/usr/local/go/src/reflect/value.go:460 (0x4989d5)\n/usr/local/go/src/reflect/value.go:321 (0x498193)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x975229)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x974bd9)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x9761c8)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:112 (0xdb3715)\n/go/src/github.com/grafana/grafana/pkg/middleware/request_tracing.go:25 (0xdb3708)\n/usr/local/go/src/reflect/value.go:460 (0x4989d5)\n/usr/local/go/src/reflect/value.go:321 (0x498193)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x975229)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x974bd9)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x9761c8)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:112 (0xdb2f0c)\n/go/src/github.com/grafana/grafana/pkg/middleware/request_metrics.go:17 (0xdb2ef7)\n/usr/local/go/src/reflect/value.go:460 (0x4989d5)\n/usr/local/go/src/reflect/value.go:321 (0x498193)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x975229)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x974bd9)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x9761c8)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:112 (0xdb2e1f)\n/go/src/github.com/grafana/grafana/pkg/middleware/recovery.go:147 (0xdb2e0d)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:79 (0x976070)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:157 (0x974f39)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:135 (0x974cc8)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x9761c8)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:112 (0xdb03db)\n/go/src/github.com/grafana/grafana/pkg/middleware/logger.go:34 (0xdb03c6)\n/usr/local/go/src/reflect/value.go:460 (0x4989d5)\n/usr/local/go/src/reflect/value.go:321 (0x498193)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:177 (0x975229)\n/go/src/github.com/grafana/grafana/vendor/github.com/go-macaron/inject/inject.go:137 (0x974bd9)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/context.go:121 (0x9761c8)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/router.go:187 (0x987326)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/router.go:303 (0x981bf5)\n/go/src/github.com/grafana/grafana/vendor/gopkg.in/macaron.v1/macaron.go:220 (0x97b0ba)\n/usr/local/go/src/net/http/server.go:2802 (0x707bc3)\n/usr/local/go/src/net/http/server.go:1890 (0x703564)\n/usr/local/go/src/runtime/asm_amd64.s:1357 (0x467db0)\n”
t=2020-03-25T23:13:55+0000 lvl=eror msg=“Request Completed” logger=context userId=3 orgId=1 uname=removed method=GET path=/api/datasources/proxy/14/ status=500 remote_addr=removed time_ms=1 size=122 referer=https://removed/grafana/datasources/edit/14/

Grafana 6.6.1

I think this is an issue with Grafana and not with the Datasource itself. Please have a look here: runtime error invalid memory address · Issue #13053 · grafana/grafana · GitHub, invalid memory address or nil pointer dereference · Issue #10733 · grafana/grafana · GitHub

I tested the datasource with Grafana 6.6.1 and it is working fine for me.

Best