Giter Club home page Giter Club logo

monkeypox-report's People

Contributors

abhidg avatar actions-user avatar github-actions[bot] avatar tvarrelman avatar

Watchers

 avatar  avatar

monkeypox-report's Issues

Change genomic filter to use clades

Since outbreak_associated is no longer included in Nextstrain TSV download, use clade membership B.1 as the primary indicator of outbreak, as well as include the two A.2 genomes from USA.

Flag outliers in new data.

Figure 4 legend to include the following:

Consider expanding Figure 4 legend to include the following:

"Figure 4: Age and gender distribution of monkeypox confirmed cases in 2022. X% of confirmed cases include sufficient metadata to be included in this figure. Of these cases, X% include reported age ranges that span multiple age categories. Under such circumstances, counts are evenly distributed among the categories that capture the reported age range. "

I have the lines of code to calculate these percentages.

@Mougk thoughts?

Originally posted by @tvarrelman in globaldothealth/monkeypox#79 (comment)

Code review

Can't do it in the usual UI as there's no pull request to reference, so here's the points I observed.

  • assert all(url.endswith("csv") for url in build.get_archives_list("csv"))
    consider using monkeypatch to substitute requests.get here, or any problem accessing GitHub will make the test runner exit.
  • logging.error("Failed to get archives list, aborting")
    (and elsewhere this pattern appears) raise an exception and log/exit in if __name__ == '__main__' so that you can also test unhappy paths.
  • def test_counts():
    there are a lot of numbers the same in this comparison: how do I know that n_countries_suspected_only is 1 because it correctly counted those, not because it actually used the same logic for n_countries_discarded? My preference would be to introduce functions that calculate the summary statistics separately and test that they work correctly, which might help with:
  • countries_suspected_or_confirmed = set(
    there's a bit of unnecessary complexity making this function hard to read: sometimes sets are calculated as unions/intersections of other sets; sometimes not; sometimes the same set is calculated multiple times; many of them are assigned values in L166-175 but then others are inlined in the return value or even walrus-assigned in the return value and used again on a subsequent line. Maybe refactoring toward helper functions would make it easier to understand what's going on: this is probably the place where errors like including the wrong status in the calculation of a statistic will occur.
  • def mid_bucket_age(age_interval: str) -> float:
    I don't understand why the mid-bucket-age of "50" isn't 50. I'm happy for that to be correct behaviour, but if so could you write a docstring explaining it please? :)
  • 51 - 60, 61 - 70, 71 - 80, 81 -
    in G.h we have an upper bound of 120 on age, which is not quite the oldest a human ever gets but acts as a QC check against typos. Worth implementing here?
  • the negative (raise ValueError) case isn't tested.
  • return {
    nit: there's a function to calculate occurrences as percentages from data frames that can be extracted here.
  • there is a whole lot of setup code in the first 101 lines of test_build.py that seems to mostly generate dictionaries with random content that are used in a two-line test file. Could that be replaced with a constant dictionary, maybe loaded from json or yaml?
  • genome_data = genome_data[genome_data.date >= "2022-05"]
    this seems like a big inconsistency: if we don't know which cases are associated with the outbreak then we will consider all cases after May 2022, which includes endemic cases (though maybe not all of them; I don't know if the genomic data is only the West African clade).

authentication error

I ran the following command

michael@plex:~/code/globalhealth-monkeypox-report$ poetry run python src/build.py bucket

I get the following error, why?

botocore.exceptions.NoCredentialsError: Unable to locate credentials

Improve legend for Figure 1A

Figure Legend 1A could be improved. suggestion: a) make smaller, b) put under the Map and horizontal c) Potentially have a zoom for Europe now that there are many lines between European countries.

Zoom Figure 1A for Europe as line density is high

Fig 1A shows the travel history. At present, there is a lot of travel within Europe which causes overlapping lines. It would be nice to have a zoom out box below the current figure which shows data within Europe only.

Inconsistencies in numbers of countries reporting transmission

Number of countries in text (n = 62) not the same than in figure 1B. Should be consistent. There were some that have discarded cases (perhaps change sentence to: "In X countries suspected or confirmed cases were reported. X confirmed transmission, X continue to have suspected cases only, and X countries discarded cases that were suspected."

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.