Share your repls and programming experiences

← Back to all posts
Coronavirus Tracker (Self-Updating) #FlattenTheCurve
[deleted]

This website automatically scrapes the most trusted coronavirus research websites and displays live information about world COVID-19 cases while updating by the second and maintaining a sleek design for mobile compatibility.

Comments
hotnewtop
[deleted]

How one would think I made this: HTML, PHP, CSS, JavaScript...
How I actually made this: https://media1.tenor.com/images/d9eccc1047b61be74387717a4cca41a8/tenor.gif?itemid=12222055

JosephSanthosh (1181)

Umm, this is not working.

gwood5901 (21)

@JosephSanthosh I had to reload it many times to get it to work, not sure why the words don't show up the first time. Anyways, it works if you reload it enough times.

gwood5901 (21)

Great! Just a suggestion, the countries could be sorted by death count instead of alphabetical order.

[deleted]

Yes flatten the curve

FloCal35 (668)

You know what would be cool, if you had the Total (World) boxes follow the user as they scroll. Just an idea.

[deleted]

That is genius. @FloCal35 on it.

FloCal35 (668)

@SharpCodeDev man, I didn't know you would acctually do it.

[deleted]

@FloCal35 since it's a table, CSS doesn't seem to like position: sticky;, but I'm trying everything I can.

FloCal35 (668)

@SharpCodeDev Now worries, it was just an idea

[deleted]

@FloCal35 still.

DynamicSquid (4919)

This is the first time I've seen PHP code in my life

HermioneGrange2 (23)

@SharpCodeDev, Did this program use an API?

[deleted]

@HermioneGrange2 it did not, it used web scraping. If you are wondering from which website this information was obtained, the answer is https://ncov2019.live/data/world.

[deleted]

Thank you, @Leroy01010!

Leroy01010 (409)

now i feel depressed looking at the death count @SharpCodeDev

[deleted]

@Leroy01010 we all do.

Henslo (25)

How can the deaths, recovery, and confirmed all be the same number?

[deleted]

Hey everyone!

Feel free to ask questions/report bugs
about the website in this space. FAQ:

  • Does this website use an API? No, it scrapes
    https://ncov2019.live/data/world for this
    information.
  • Why is the text not showing up? This is
    a common issue. I have not found a way to
    prevent this from happening, but I know
    that the issue has something to do with the
    PHP.
[deleted]

AstOwOlfo (257)

Ur profile says u know node tho, why’d u pick php for this? @SharpCodeDev

[deleted]

@agent9002 ¯_(ツ)_/¯ easy web scraping (lines 230 - 233)

[deleted]

@AstOwOlfo also because it is hard to Node.js to work on a website, PHP is just more compatible.

AstOwOlfo (257)

if you cant handle react/next or smth then just use express ez, and wdym "php is more compatible"? @SharpCodeDev

DynamicSquid (4919)

@SharpCodeDev that is actually the cleanest webscrapping code I have ever seen!

JosephSanthosh (1181)

May I know which website the data is being transferred from? Or where this data is coming from?

[deleted]

@JosephSanthosh This information is being scraped from https://ncov2019.live.

JosephSanthosh (1181)

That is not a government or state controlled website, so it is better to stay to more reliable websites. @SharpCodeDev

JosephSanthosh (1181)

Yea for once the onion agrees with me! @oignons

[deleted]

@JosephSanthosh Sure! Thank you for the idea.

Jeydin21 (101)


What does this mean?

[deleted]

@Jeydin21 that is an error in my PHP code. At this moment I am looking for a solution. The error is that the JavaScript and PHP are not interacting properly and some functions are not being called.

Jeydin21 (101)

@SharpCodeDev Oh. It's actually working right now! GG

[deleted]

@Jeydin21 about that... reloading the page will break it again. I don't know what's going on that is causing it to do that.

Jeydin21 (101)

@SharpCodeDev Probably the PHP thing. But that's a really cool project though. Keep it up!

[deleted]

Thank you, @Jeydin21!