ChrisMichaelPerezSantiago / covid19

This API provides updated real-time data on coronavirus cases from the worldometers page, provided by the most reputable organizations and statistical offices in the world.
MIT License
76 stars 17 forks source link

COVID19 API - REPORTS #6

Closed ChrisMichaelPerezSantiago closed 2 years ago

ChrisMichaelPerezSantiago commented 4 years ago

This will be the main site to report any updates to the API.

First of all I must say the following,

This is an API that I am developing on my own, so it means that I will not be able to please everyone to add any particular information or keep the repo updated every day. I will try my best to bring you a full API with data from trusted websites, of course if time permits.

Any questions, improvements, suggestions, you can let me know.

Reports By Countries For now this is the list of countries with available information on closed and active cases

Countries
afghanistan, albania, algeria, andorra, angola, anguilla, antigua-and-barbuda, argentina, armenia, aruba, australia, austria, azerbaijan
bahamas, bahrain, bangladesh, barbados, belarus, belgium, belize, benin, bermuda, bhutan, bolivia, bosnia-and-herzegovina, botswana, brazil, british-virgin-islands, brunei-darussalam, bulgaria, burkina-faso, burundi
cabo-verde, cambodia, cameroon, canada, caribbean-netherlands, cayman-islands, central-african-republic, chad, channel-islands, chile, china, china-hong-kong-sar, china-macao-sar, colombia, congo, costa-rica, cote-d-ivoire, croatia, cuba, curacao, cyprus, czech-republic
democratic-republic-of-the-congo, denmark, djibouti, dominica, dominican-republic
ecuador, egypt, el-salvador, equatorial-guinea, eritrea, estonia, ethiopia
faeroe-islands, falkland-islands-malvinas, fiji, finland, france, french-guiana, french-polynesia
gabon, gambia, georgia, germany, ghana, gibraltar, greece, greenland, grenada, guadeloupe, guatemala, guinea, guinea-bissau, guyana
haiti, holy-see, honduras, hungary
iceland, india, indonesia, iran, iraq, ireland, isle-of-man, israel, italy
jamaica, japan, jordan
kazakhstan, kenya, kuwait, kyrgyzstan
laos, latvia, lebanon, liberia, libya, liechtenstein, lithuania, luxembourg
macedonia, madagascar, malawi, malaysia, maldives, mali, malta, martinique, mauritania, mauritius, mayotte, mexico, moldova, monaco, mongolia, montenegro, montserrat, morocco, mozambique, myanmar
namibia, nepal, netherlands, new-caledonia, new-zealand, nicaragua, niger, nigeria, norway
oman
pakistan, panama, papua-new-guinea, paraguay, peru, philippines, poland, portugal
qatar
reunion, romania, russia, rwanda
saint-barthelemy, saint-kitts-and-nevis, saint-lucia, saint-martin, saint-vincent-and-the-grenadines, san-marino, saudi-arabia, senegal, serbia, seychelles, sierra-leone, singapore, sint-maarten, slovakia, slovenia, somalia, south-africa, south-korea, spain, sri-lanka, state-of-palestine, sudan, suriname, swaziland, sweden, switzerland, syria
taiwan, tanzania, thailand, timor-leste, togo, trinidad-and-tobago, tunisia, turkey, turks-and-caicos-islands
uganda uk ukraine united-arab-emirates uruguay us uzbekistan
venezuela, viet-nam
zambia, zimbabwe
ChrisMichaelPerezSantiago commented 4 years ago

Hi everyone,

Version v1.1.1 had an issue when installing the package from npm which I had not noticed.

Related to the following error

npm ERR! Could not install from "node_modules/covid19-api/server" as it does not contain a package.json file.

I have already corrected the problem and updated to v1.1.4. I exhort everyone who is using the api to update to that version to avoid problems.

Sorry for the inconvenience!

ChrisMichaelPerezSantiago commented 4 years ago

Good morning to everybody,

Today as I have seen, many have reported an issue regarding the getReports() function.

This issue was related to a necessary change of key to the table

forEach ((obj) => renameKey (obj, 'Reported1st case', 'FirstCase'));

One of the colleagues made the change and quickly I made the merge that corrects the issue #11

In turn, the package has been updated to version v1.1.5, which corrects that error.

ChrisMichaelPerezSantiago commented 4 years ago

Good morning to everybody,

During this day a new issue has been reported related to,

502 - bad gateway
An error occurred with this application.
NO_STATUS_CODE_FROM_FUNCTION

This is related to the fact that the FirstCase column was removed from the worldometers website. I already removed the column so this fixes the error accessing data from the server and from the API getReports function.

In turn, the package has been updated to version v1.1.6, which corrects that error.

ChrisMichaelPerezSantiago commented 4 years ago

Good morning to everybody,

The api has been updated to version v1.1.7, providing data for all those who live in Puerto Rico

Data provided by the Puerto Rico Institute of Statistics, based on official data provided by the Puerto Rico Department of Health.

For more information on the location of the data go to the following URL. People of PR interested in publishing data, please fork the repo and include the updated csv files.

ChrisMichaelPerezSantiago commented 4 years ago

Good afternoon everyone,

To notify that the Reports By Countries table has been updated with all the countries that the worldometers website refers to.

ChrisMichaelPerezSantiago commented 4 years ago

Hello friends,

To let you know that the library has been updated to version v1.1.8.

This version incorporates a new function that downloads the reports of each country from the table provided by the worldometers website in csv format.

On the other hand, the file will be downloaded to the Desktop path, either Windows or Linux / Mac.

Here is an example of how they should execute the function.

const api = require('covid19-api');

const main = async() =>{
  await api.downloadReportsToCSV()
}

main();
ChrisMichaelPerezSantiago commented 4 years ago

Good morning to everybody,

The api has been updated to version v1.1.9, it replaces the use of the cloudscraper library to make requests with axios. On the other hand, some keys have been corrected and replaced.

On the other hand,

I am aware of the messages that some of you have sent me relating to any issue that you have found or any particular information that you want me to add.

I really don't know if it can please everyone, so I'll try to add the content that is really necessary.

Reminding you that it is a project that I am only maintaining.

I hope you understand

ChrisMichaelPerezSantiago commented 4 years ago

Good afternoon,

I have made available the URL where all the documentation of the API of COVID19 will be found.

This documentation will include the properties of each object, description and an example to make a request to each endpoint.

As I go along including the documentation of the API functions, the URL will be updated.

ChrisMichaelPerezSantiago commented 4 years ago

Good afternoon,

Today the library has been updated to version 1.2.0, this version is not necessarily mandatory to install but provides functions related to Cases detected by the states, regions, or Communities of each country.

This list may continue to increase for future updates.

ChrisMichaelPerezSantiago commented 4 years ago

Good afternoon!,

The library has been updated to version v1.2.1. This provides functions related to the cases detected by the states, regions or communities of each country.

On the other hand, the getCivicFreedomTracker function has been implemented. This monitors government responses to the pandemic that affect civic freedoms and human rights, focusing on emergency laws.

In turn, a bug in the getReports function has been corrected, this issue was related that the table element was not parsing correctly.

ChrisMichaelPerezSantiago commented 4 years ago

Good afternoon,

_The return object of Fatality Rate By [age, sex, Comorbidities] has been fixed. This was corrected since incorrect tables are being referenced._

Commit: #25