HuidaeCho / covid-19

Open source web map for tracking COVID-19 global cases
GNU Affero General Public License v3.0
22 stars 15 forks source link

New feature request: To be able to sort by provinces instead of countries #8

Closed javierconcha closed 4 years ago

javierconcha commented 4 years ago

In my case, because I am displaying only one country separated by provinces, I would like to be able to show the menu on top of the map with the country and the provinces (I mean the menu with the blue links to the different countries and that you can change the sorting based on c, r or d). Something like this:

Chile: province1, pronvince2, etc..

Is it possible?

Thanks.

HuidaeCho commented 4 years ago

This feature is also a single-country feature, so if I implement it, it would be in a separate HTML file. Again, it's a lower priority for me.

HuidaeCho commented 4 years ago

Javier, please test https://app.isnew.info/covid-19/chile.html. I didn't create a new HTML file for this and it can use the same geodata.json file. If it works for you, I'll commit it.

HuidaeCho commented 4 years ago

Check this URL for South Korea: https://app.isnew.info/covid-19/south-korea.html. It uses the same data file, JS, and CSS files. Just index.html is modified.

HuidaeCho commented 4 years ago

Everything is committed. Please test it and let me know if you have any questions or comments.

javierconcha commented 4 years ago

This is exactly what I was asking for sorting by provinces! I like the new tabs for the right panel and for the popup window. Thanks!

javierconcha commented 4 years ago

Huidae, I am not able to run chile.html from my server: http://sci-solve.com/covid-19-Chile/chile.html I added covid-19.js, covid-19.css and chile.html to the server but I am still using my locally created data.csv and geodata.json.

Do you know what could be happening?

HuidaeCho commented 4 years ago

Javier, Forgot to mention this. I've changed the time format from string to timestamp (epoch time in seconds in integer) to save file size. You need to update your script to generate timestamps. It was a major change. Files in the data folder still save the same ISO time format. Only geodata.json is affected. Please check my code in fetch_data.py.

HuidaeCho commented 4 years ago

Javier, could you do me a favor? If you don't mind, please translate chile.html.

HuidaeCho commented 4 years ago

I did it using Google Translate. I'm not sure how accurate it is. :-)

javierconcha commented 4 years ago

OK, I will check the time formatting then. Thanks!

And yes, I can translate chile.html.

javierconcha commented 4 years ago

What would be the best way to work on it? I do it locally and send it to you? Or work with git? I am learning how to use git for collaboration. I have used it only for keeping track of my own projects but I am happy to learn :)

HuidaeCho commented 4 years ago

What would be the best way to work on it? I do it locally and send it to you? Or work with git? I am learning how to use git for collaboration. I have used it only for keeping track of my own projects but I am happy to learn :)

The best way would be to fork my repo, translate chile.html and create a pull request. Thanks!