Git Product home page Git Product logo

covid-19-widget's Introduction

Bing COVID-19 Widget

As the coronavirus impacts the world, we recognize the need to share the latest information outside of Bing. This widget will allow any site to easily add an outbreak map, the latest case counts, and a chart displaying the spread over time. These elements are modular, giving sites the ability to customize the experience. The widget is also responsive, adjusting automatically to desktop and mobile form factors. Learn more on how to embed and customize the widget for your needs below.

By using the widget, you agree to be subject to the terms of use listed here.

Example code:

<div class="bingwidget" data-type="covid19" data-market="en-us" data-language="en-us"></div>
  
<script src="//www.bing.com/widget/bootstrap.answer.js" async=""></script>

Example experience: See it live here.

alt text

How can I embed the widget on my site?

You will simply need to add two lines of HTML code, a <div> including various widget parameters, and a <script>. At the bottom of this readme are code examples for the various supported configurations. Each configuration is a combination of three supported modules: an Outbreak Map Module showing the worldwide spread of the virus, a Data Stats Module, which displays the case count information for a given location, and a Trends Chart Module showing the spread of the virus in a location over time. Note that the Trends Chart Module has limited market support at this time.

How do I select a widget configuration?

You are able to select your widget configuration with the data-type parameter. We support the following values:

Description data-type Parameter
Default – includes all three modules: Outbreak Map module, Trends Chart module, and Data Stats module covid19
Map – includes only the Outbreak Map module covid19_map
Trends – includes only the Trends Chart module covid19_trends
Stats and Map – includes the Data Stats module and Outbreak Map module covid19_stats_map
Stats and Trends – includes the Data Stats module and Trends Chart module covid19_stats_trends
Modules - allowing for further customizations of multiple modules covid19_modules

In addition to these data-type options, you can also stack multiple widget on top of each other by including multiple <div> lines and only one <script>.

How do I select the market and language?

The data-market and data-language parameters control the market and language of the widget respectively. The data-market refers to the country/region the widget will optimize for. The data-language refers to the UI display language in which the widget will display the UI string resources. Typically you will have the data-market and data-language set to the same parameter value, however, there are cases where they would differ. For example, you can have a user in the United States who speaks Spanish. In this case you can set the data-market to en-US and the data-language to es-ES. We support the following values for data-market and data-language:

Market data-market Parameter
Australia en-AU
Canada en-CA
Canada* fr-CA
France* fr-FR
Germany* de-DE
India en-IN
Italy* it-IT
Japan* ja-JP
South Korea* ko-KR
Spain* es-ES
UK en-GB
US en-US
  • Markets with an asterisk (*) do not support the data-type of covid19_stats_trends currently.
Language data-language Parameter
English in Australia en-AU
English in Canada en-CA
English in India en-IN
English in UK en-GB
English in US en-US
French fr-FR
French in Canada fr-CA
German de-DE
Italian it-IT
Japanese ja-JP
Korean ko-KR
Spanish es-ES

How do I specify a location for the widget to load?

The data-location-id parameter allows you to set location based on a set of available “/Country/Region" combinations. Setting the data-location-id will update all modules with the specified location's data. A list of the supported locations is available in the AllLocations.txt file. If no data-location-id is set, the default is the global view. You can also select a global view for the data-location-id parameter with a value of "/".

The Bing COVID-19 Widget team is also exploring adding support for location selection by latitude and longitude values. Please email [email protected] if this is a desired feature for your sites' widget implementation.

How do I select the widget size?

The widget is responsive, automatically resizing depending on the size of the parent HTML element. No additional settings control the width of the widget.

Widget examples

By using the widget, you agree to be subject to the terms of use listed here.

Widget Default

See it live here.

<div class="bingwidget" data-type="covid19" data-market="en-us" data-language="en-us"></div>
  
<script src="//www.bing.com/widget/bootstrap.answer.js" async=""></script>

Default widget example setting language and market to Japanese in Japan. See it live here.

<div class="bingwidget" data-type="covid19" data-market="ja-jp" data-language="ja-jp"></div>
  
<script src="//www.bing.com/widget/bootstrap.answer.js" async=""></script>

Widget with only Map

See it live here.

<div class="bingwidget" data-type="covid19_map" data-market="en-us" data-language="en-us"></div>
  
<script src="//www.bing.com/widget/bootstrap.answer.js" async=""></script>

Map only widget example specifying location of Italy. See it live here.

<div class="bingwidget" data-type="covid19_map" data-market="en-us" data-language="en-us" data-location-id="/Italy"></div>
  
<script src="//www.bing.com/widget/bootstrap.answer.js" async=""></script>

Widget with only Trends

See it live here.

<div class="bingwidget" data-type="covid19_trends" data-market="en-us" data-language="en-us"></div>
  
<script src="//www.bing.com/widget/bootstrap.answer.js" async=""></script>

Widget with Stats and Map

See it live here.

<div class="bingwidget" data-type="covid19_stats_map" data-market="en-us" data-language="en-us"></div>
  
<script src="//www.bing.com/widget/bootstrap.answer.js" async=""></script>

Stats and Map widget example specifying location of United States. See it live here.

<div class="bingwidget" data-type="covid19_stats_map" data-market="en-us" data-language="en-us" data-location-id="/United States"></div>
  
<script src="//www.bing.com/widget/bootstrap.answer.js" async=""></script>

Widget with Stats and Trends

See it live here.

<div class="bingwidget" data-type="covid19_stats_trends" data-market="en-us" data-language="en-us"></div>
  
<script src="//www.bing.com/widget/bootstrap.answer.js" async=""></script>

Stats and Trends widget example specifying location of Texas. See it live here.

<div class="bingwidget" data-type="covid19_stats_trends" data-market="en-us" data-language="en-us" data-location-id="/United States/Texas"></div>
  
<script src="//www.bing.com/widget/bootstrap.answer.js" async=""></script>

Widget with Multiple Modules Examples

See it live here.

<p>Covid Modules Stats, Map, Trends</p>
<div class="bingwidget" data-type="covid19_modules" data-modules='[{"_type": "stats", "location-id":"/United States/New York"}, {"_type": "stats", "location-id":"/United States"}, {"_type": "stats", "location-id":"/"}, {"_type": "trends", "location-id":"/United States"}, {"_type": "map", "location-id":"/United States/New York"}]'></div>

<p>Covid Modules Stats</p>
<div class="bingwidget" data-type="covid19_modules" data-modules='[{"_type": "stats", "location-id":"/Spain"}, {"_type": "stats", "location-id":"/Italy"}, {"_type": "stats", "location-id":"/United States"},  {"_type": "stats", "location-id":"/"}]'></div>

<p>Covid Modules Map</p>
<div class="bingwidget" data-type="covid19_modules" data-modules='[{"_type": "map", "location-id":"/United States/New York"}]'></div>

<p>Covid Modules Trends</p>
<div class="bingwidget" data-type="covid19_modules" data-modules='[{"_type": "trends", "location-id":"/United States"}]'></div>

<script src="//www.bing.com/widget/bootstrap.answer.js" async=""></script>

How can I report issues found with the widget?

Please email [email protected] with any issue reports.

Known Issues:

  • The text “Powered by Bing” and “Explore more on Covid-19 tracker” seen in the widget are new additions to the widget and the strings are still being translated into the languages we support.
  • There is additional white colored padding around the widget that can be seen on sites with a colored background.

Where is the widget data from and how often does it update?

The widget refreshes approximately every ten minutes with data from an aggregate of sources Bing is consuming. Data may not change with every refresh.

Can I download the source data?

Bing is making our COVID-19 data available for educational and academic purposes. Get the data and learn more at the Bing COVID-19 Data GitHub page.

covid-19-widget's People

Contributors

exampleusername12 avatar microsoftopensource avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

covid-19-widget's Issues

SharePoint

Do you have an iFrame version of this?

Widget source code?

Will the source code for the Covid Widget be made available? If so, when?

COVID widget not available anymore (Screenshots attached)

Hi,

It’s been weeks for Microsoft Bing widget to be unavailable, can you please check if there’s any issue with it? I was using it on my website to remind viewers about COVID situation and it worked fine before. If it's working again it will be a great help. (using Microsoft Edge Dev 93.0.961.10)
image
image

Thank you!

Also, your support email [email protected] cannot be reached (550 5.7.133 RESOLVER.RST.SenderNotAuthenticatedForGroup; authentication required; Delivery restriction check failed because the sender was not authenticated when sending to this group )

Add per capita data to widgets

Per capita information would provide better insights about which jurisdictions have done the most/least to limit the damage done by COVID-19. Please add per capita options for the widgets.

DIVOC-91

MAY ALL OF THIS STOP!!!

OFFICER (DIVOC-91)

This is a message to all. Please. No More

The widget does not load in full screen

The widget does not take the parent width. the max-width for #b_results is set to 650px by default.

<ol id="b_results" style="display: block; max-width: 650px"><li class="b_ans b_top b_topborder b_tophb"><div class="cov_root noTabs is-widget "><div class="b_tophbh bgtopwh"><div class="cov_head"><h2 class="b_topTitle">Coronavirus (COVID-19) statistics</h2><div class="cov_subtitle b_demoteText cov_blogo">Powered by Bing</div></div></div><div class="b_tophbb bgtopgr bgbtopnone"><div class="cov_body cov_noTabs"><div class="covid-modList"><div class="covid-mod b_divsec m_statsmodule" data-init="true"><div class="cov_modHead"><div class="cov_modTitle" role="heading" aria-level="2">Lebanon cases</div><div class="cov_modUpdated b_footnote">Updated Oct 11 at 3:51 PM local</div></div><div class="b_scard b_cards2"><div class="cov_modb" data-appns="" data-kvalue="" data-is-open="false" data-scroll="false"><div class="cov_cases"><div class="c_stat c_cnfrm"><div class="c_lbl">Confirmed</div><div class="c_row"><div class="c_cnt b_focusTextExtraSmall">52,558</div><div class="c_chg"><div class="c_chgVal b_footnote">+1,388</div></div></div></div><div class="c_stat c_dths"><div class="c_lbl">Deaths</div><div class="c_row"><div class="c_cnt b_focusTextExtraSmall">455</div><div class="c_chg"><div class="c_chgVal b_footnote">+5</div></div></div></div><div class="c_stat c_rcvrd"><div class="c_lbl">Recovered</div><div class="c_row"><div class="c_cnt b_focusTextExtraSmall">22,719</div><div class="c_chg"><div class="c_chgVal b_footnote">+312</div></div></div></div></div><div class="covw_cl_wrp"><a target="_blank" href="https://www.bing.com/covid/local/lebanon?form=C19WID" h="ID=SERP,5000.1"><div class="covw_cl">See breakdown</div></a></div></div></div></div></div><div class="covw_ftr"><span class="covw_ftr_lbl">Explore more on </span><a target="_blank" href="https://www.bing.com/covid?form=C19WID" h="ID=SERP,5009.1">Covid-19 tracker</a></div></div></div></div></li></ol>

Contact email address is undeliverable

It appears that the email address [email protected] only accepts email from internal Microsoft email addresses. So, how can anyone contact you for questions about it?

I get this error:

Your message to [email protected] couldn't be delivered.
--
The group bingcovidwidget only accepts messages from people in its organization or on its allowed senders list, and your email address isn't on the list.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.