stevenliuyi / covid19

an interactive, animated COVID-19 coronavirus map to track the outbreak over time by country and by region for selected countries
MIT License
325 stars 97 forks source link

Update stopped on April 5th #23

Closed rafaelsabino closed 4 years ago

rafaelsabino commented 4 years ago

Update stopped on April 5th. Does anyone know how to make the update work? I was unable to update after BUILD.

stevenliuyi commented 4 years ago

Hi! I'm not sure why there is no update after Apr 5. It works on my end. Probably it's the same issue as #21?

rafaelsabino commented 4 years ago

Thanks for the answer. I believe I need to configure a cron job on the server. How did you go about updating the data in certain periods?

stevenliuyi commented 4 years ago

I've been using GitHub Actions to update the data. You can check the workflow file.

esteblock commented 4 years ago

Hello. I'll answer the question you posed in #21 , here. I am able to see the updated data. In fact. all.json and all_minified.json happen to be updated! The extrange thing is that (as in your website https://covid19.health/), the summary has stopped in 4 april :O. I tried to figured out if this was an issue with the package date-fsn, but not....

rafaelsabino commented 4 years ago

@stevenliuyi I loved your map. Very excellent, I would just like to make the update work. When I run the .sh files separately I am informed of an invalid path. I don't know how to run the stream file on a web server. How do you configure the update here on github?

rafaelsabino commented 4 years ago

@estebaniglesias how did you do to update your map? Are you running an external server too?

esteblock commented 4 years ago

Hello @rafaelsabino . Yes, and in my personal computer too :), I am not running GitHub actions, but pulling with a script (is the same, then) from the submodules. (--recursive is the key here). There are also other data that is being updated in the "install process"

rafaelsabino commented 4 years ago

@estebaniglesias thanks for responding, could you please send me the code you are using to run the script?

esteblock commented 4 years ago

Hello @rafaelsabino . Well, the script has many more things of other projects. But basically whta is doing is

git pull --recurse-submodules
yarn install
yarn build
serve -s build

Other instructions on how did I installed, in #22

rafaelsabino commented 4 years ago

Thank you very much @estebaniglesias , but whenever I run postinstall it sends me the error below. Did you go through this? It looks like you're playing a semicolon before turning.

`error C:\Users\Avell\COVID_19\node_modules\postinstall-postinstall: Command fai led. Exit code: 1 Command: node ./run.js Arguments: Directory: C:\Users\Avell\COVID_19\node_modules\postinstall-postinstall Output: No such package ;

File not found: C:/Users/Avell/COVID_19/node_modules/;/package.json error Command failed with exit code 1. child_process.js:669 throw err; ^

Error: Command failed: yarn run postinstall No such package ;

File not found: C:/Users/Avell/COVID_19/node_modules/;/package.json error Command failed with exit code 1. `

esteblock commented 4 years ago

Are you running all the commands in C:\Users\Avell\COVID_19?

rafaelsabino commented 4 years ago

That's right

rafaelsabino commented 4 years ago

@estebaniglesias I can perform the package installation and build. However no matter what I do the data never updates. They always have the same date on the image. I don't know how to update the data. Anotação 2020-04-07 115334

esteblock commented 4 years ago

Hello, congratulations! Igot the same issue! See here: #21 ! It happened that in Chile we moved to winter time the 4th April. Might it be that?

stevenliuyi commented 4 years ago

Have you tried to use git submodule update --remote to update all the submodules?

stevenliuyi commented 4 years ago

@rafaelsabino If you check package.json, the semicolon in postinstall is used to separate two commands. It's the syntax on Unix-like systems to run multiple commands sequentially. I'm not sure what's the correct way to do it on Windows, but you can just run the two commands separately.

Actually you may not need to run the second command (postinstall.sh) at all. This script is used to generate updated data and maps. Each time the workflow runs, updated data and maps are generated using postinstall.sh and then committed to this Github repo. So if you pull the latest version, the new data and maps should already be there.

rafaelsabino commented 4 years ago

I understand. Thank you very much @stevenliuyi for the clarifications. I'll try to do. But the question is, is there a way to let the server do this for me, like a cron job? Because there is no way for me to keep updating and generating builds every day. It would be interesting to be all automatic. The idea would be to run on a web server and update via cron. I don't intend to run on windows. On windows I'm just doing a test. By the way, I really loved your work. You are excellent in that area. It really won my admiration.

esteblock commented 4 years ago

Hello @stevenliuyi , thank you so much for your support. However, I don't think this is the same issue as in #21 . For example, if today 07. April I log in to https://covid19.health/ from my usual browser (Firefox in my case) in Chile (and several friends here have tried the same). I still see the main statistics for 04. April Screenshot 2020-04-07 14 41 25

But if I log in from other location using the Tor Browser, I get the correct date. Screenshot 2020-04-07 14 44 58

So at least my issue is not about updated data.

esteblock commented 4 years ago

If I change my location in my operative system to, let's say Germany, I got the correct date! The problem is that I would like to use your app, particulary for Chilean users... I bet it might be something with the date-fns package?

pescap commented 4 years ago

Same issue, also in Chile. Attached I added a full print screen.

chile

stevenliuyi commented 4 years ago

@rafaelsabino Thank you! You may use cron to run a script like this: (I haven't test it, so couldn't guarantee it works without issue.)

git pull --rebase
git submodule update --remote
yarn install
yarn build
stevenliuyi commented 4 years ago

@estebaniglesias @pescap Hi, I've already reproduced the issue when I change my timezone to Chile, and I think it's indeed related to the daylight saving time. I'm trying to find a solution.

stevenliuyi commented 4 years ago

@estebaniglesias @pescap Hopefully the issue is fixed by now.

esteblock commented 4 years ago

I'll try now!

esteblock commented 4 years ago

Hi @stevenliuyi , this defenetly solves the issue! Thanks a lot!

rafaelsabino commented 4 years ago

@stevenliuyi it seems to work the way you taught. I will continue to monitor to see if there are any problems with the updates. Another quick question, how do I change the American standard date view of graphics from (mm / dd) to (dd / mm)? In my country we see the day and after the month.

Thanks for all the support.

esteblock commented 4 years ago

Hi @rafaelsabino, I got the solution! Give me a couple of hours and I can get into it.

rafaelsabino commented 4 years ago

Hi @stevenliuyi thanks, I'm waiting. I stay very grateful.

rafaelsabino commented 4 years ago

Hello @stevenliuyi, how are you? Did you get to see anything about the date?

esteblock commented 4 years ago

Hi! @rafaelsabino , for me is Ok!

rafaelsabino commented 4 years ago

@stevenliuyi it seems to work the way you taught. I will continue to monitor to see if there are any problems with the updates. Another quick question, how do I change the American standard date view of graphics from (mm / dd) to (dd / mm)? In my country we see the day and after the month.

Thanks for all the support.

Hello @estebaniglesias . I was referring to this question, about how to do this. The data is correct, I was just trying to change the date format of the graph because in my country we see (dd/mm) and not the American standard (mm/dd). The question was how to change that.

esteblock commented 4 years ago

See in src/components/DateSlider.js and edit function formatTick(ms) { return format(new Date(ms), 'M/d') } See https://date-fns.org/docs/Getting-Started for more formats. For example, I have not got time to show the month in letters but in Spanish! If you manage to do ir correctly (documentation in the link), please let me know! ;)

rafaelsabino commented 4 years ago

Thank you very much my friend for your help. I'll adjust it here and if I can, I'll tell you. Thanks

stevenliuyi commented 4 years ago

@estebaniglesias Thank you for your help! @rafaelsabino Let me know if you still have problem modifying the format.

rafaelsabino commented 4 years ago

@stevenliuyi good night, how are you? How do I set the clear theme and table widget instead of the circle by default when loading the page?

rafaelsabino commented 4 years ago

@stevenliuyi I managed to adjust the settings. Now I would like to translate the names of the countries, but I couldn't. Even translating the i18n.yml file, the countries are still in English.

esteblock commented 4 years ago

Hi

@stevenliuyi good night, how are you? How do I set the clear theme and table widget instead of the circle by default when loading the page?

I encourage to look for specific key words on the repository. I you look for "dark", you'll realize that this is in the variable darkMode https://github.com/stevenliuyi/covid19/search?q=darkMode&unscoped_q=dark Then, look for darkMode https://github.com/stevenliuyi/covid19/search?q=darkMode&unscoped_q=darkMode

and you'll find the answer. change true to false in src/components/App.js

rafaelsabino commented 4 years ago

@estebaniglesias Thanks for the answer. I had found it before. My last question was about translating country names. The graph and table are always in the English language.

esteblock commented 4 years ago

Hi. I don't think it is a easy thing. My friend @pescap just commited a pull request that was accepted adding new languages to the interface.

But having read the code, and how the data is taken, country names always need names in English and in Chinesse. I thing what will better help you is to open a new Issue about this topic, and we can continue discussing this there! And will take the attention of others looking for the same. ;)

Le jeu. 16 avr. 2020 à 14:34, Rafael Sabino notifications@github.com a écrit :

@estebaniglesias https://github.com/estebaniglesias Thanks for the answer. I had found it before. My last question was about translating country names. The graph and table are always in the English language.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stevenliuyi/covid19/issues/23#issuecomment-614825020, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARLJNK2ENI2VCLCNCOLGRDRM5FS3ANCNFSM4MDAV7KA .

rafaelsabino commented 4 years ago

Okay, you're right. You will close this issue that has already been resolved and open another topic.