-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test Spanish translation via babeldown #95
Conversation
Thank you!Thank you for your pull request 😃 🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}. If you have files that automatically render output (e.g. R Markdown), then you should check for the following:
Rendered Changes🔍 Inspect the changes: https://github.com/epiverse-trace/tutorials-middle/compare/md-outputs..md-outputs-PR-95 The following changes were observed in the rendered markdown documents:
What does this mean?If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible. This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation. ⏱️ Updated at 2024-07-05 12:26:42 +0000 |
this looks good! I briefly skim through them, and they look appropriate to review by a Spanish speaker. One step after the DeepL translation I see is to recover the callout tags to English manually (e.g., questions, prerequisites here in spanish back to english) For the DeepL assessment, I need to specify the exact four episodes to translate in this first batch:
Let us know if the characters in these four episodes overpass the limit in the amount of characters |
with: sed -i -r 's/(:+) llamada/\1 callout/g' *
All these pre-translations look appropriate. It is nice to see that it is possible to add the post-processing tags; they work nicely. Do you have the % of monthly characters used for all these? Some next-step questions:
|
I have used 150k / 500k characters from my monthly quota. I used a bit more than I should have because of the small bugs mentioned in the first message, which required some debugging and trial and error.
Probably yes at this time to facilitate deployment but it may change in the future. Especially as the Carpentries start standardizing their process, we will want to follow the choice they end up doing.
Yes, it's fine with me. Do what you think is best. |
Sure, I agree. Some additional ones: With the current path:
|
Locally difficult to assess given long-time runs. My current workflow would be to:
|
Ok, let's do this for now because I don't have availability to investigate more |
Dear reviewers, thank you for volunteering to review the automatic translation of one episode:
The translated files are accessible in the "Files changed" tab of this PR. We are open to accepting your specific changes to one or multiple lines using the "Files changed" tab. To start your review, you can follow steps 5 to 8 from this how-to guide on Reviewing proposed changes in a pull request. If you prefer an alternative method for review, please let me know, and we can coordinate another platform according to your needs. Each episode could be reviewed on different platforms. Lastly, we mostly want your review of the Spanish translation of the text. If you have a thematic or technical improvement you would like the tutorials to have, please feel free to fill an issue. We aim to have all translations reviewed by the 4th of July. |
# EpiNow2::NonParametric() can also accept the PMF values | ||
generation_time_influenza <- | ||
EpiNow2::NonParametric( | ||
pmf = influenza_generation_pmf | ||
) | ||
|
||
# incubation period ------------------------------------------------------- | ||
|
||
# Read the incubation period | ||
influenza_incubation <- | ||
epiparameter::epidist_db( | ||
disease = "influenza", | ||
epi_dist = "incubation", | ||
single_epidist = TRUE | ||
) | ||
|
||
# Discretize incubation period | ||
influenza_incubation_discrete <- | ||
epiparameter::discretise(influenza_incubation) | ||
|
||
influenza_incubation_max <- | ||
quantile(influenza_incubation_discrete, p = 0.99) | ||
|
||
influenza_incubation_pmf <- | ||
density( | ||
influenza_incubation_discrete, | ||
at = 1:influenza_incubation_max | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# EpiNow2::NonParametric() can also accept the PMF values | |
generation_time_influenza <- | |
EpiNow2::NonParametric( | |
pmf = influenza_generation_pmf | |
) | |
# incubation period ------------------------------------------------------- | |
# Read the incubation period | |
influenza_incubation <- | |
epiparameter::epidist_db( | |
disease = "influenza", | |
epi_dist = "incubation", | |
single_epidist = TRUE | |
) | |
# Discretize incubation period | |
influenza_incubation_discrete <- | |
epiparameter::discretise(influenza_incubation) | |
influenza_incubation_max <- | |
quantile(influenza_incubation_discrete, p = 0.99) | |
influenza_incubation_pmf <- | |
density( | |
influenza_incubation_discrete, | |
at = 1:influenza_incubation_max | |
) | |
# EpiNow2::NonParametric() también puede recibir valores de PMF | |
generation_time_influenza <- | |
EpiNow2::NonParametric( | |
pmf = influenza_generation_pmf | |
) | |
# Periodo de incubación ------------------------------------------------------- | |
# Leer el periodo de incubación | |
influenza_incubation <- | |
epiparameter::epidist_db( | |
disease = "influenza", | |
epi_dist = "incubation", | |
single_epidist = TRUE | |
) | |
# Discretizar el periodo de incubación | |
influenza_incubation_discrete <- | |
epiparameter::discretise(influenza_incubation) | |
influenza_incubation_max <- | |
quantile(influenza_incubation_discrete, p = 0.99) | |
influenza_incubation_pmf <- | |
density( | |
influenza_incubation_discrete, | |
at = 1:influenza_incubation_max | |
) |
# EpiNow2::NonParametric() can also accept the PMF values | ||
incubation_time_influenza <- | ||
EpiNow2::NonParametric( | ||
pmf = influenza_incubation_pmf | ||
) | ||
|
||
# epinow ------------------------------------------------------------------ | ||
|
||
# Read data | ||
influenza_cleaned <- | ||
outbreaks::influenza_england_1978_school %>% | ||
select(date, confirm = in_bed) | ||
|
||
# Run epinow() | ||
epinow_estimates_igi <- epinow( | ||
# cases | ||
data = influenza_cleaned, | ||
# delays | ||
generation_time = generation_time_opts(generation_time_influenza), | ||
delays = delay_opts(incubation_time_influenza) | ||
) | ||
|
||
plot(epinow_estimates_igi) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# EpiNow2::NonParametric() can also accept the PMF values | |
incubation_time_influenza <- | |
EpiNow2::NonParametric( | |
pmf = influenza_incubation_pmf | |
) | |
# epinow ------------------------------------------------------------------ | |
# Read data | |
influenza_cleaned <- | |
outbreaks::influenza_england_1978_school %>% | |
select(date, confirm = in_bed) | |
# Run epinow() | |
epinow_estimates_igi <- epinow( | |
# cases | |
data = influenza_cleaned, | |
# delays | |
generation_time = generation_time_opts(generation_time_influenza), | |
delays = delay_opts(incubation_time_influenza) | |
) | |
plot(epinow_estimates_igi) | |
# EpiNow2::NonParametric() también puede recibit valores de PMF | |
incubation_time_influenza <- | |
EpiNow2::NonParametric( | |
pmf = influenza_incubation_pmf | |
) | |
# epinow ------------------------------------------------------------------ | |
# Leer datos | |
influenza_cleaned <- | |
outbreaks::influenza_england_1978_school %>% | |
select(date, confirm = in_bed) | |
# Usar epinow | |
epinow_estimates_igi <- epinow( | |
# casos | |
data = influenza_cleaned, | |
# retrasos | |
generation_time = generation_time_opts(generation_time_influenza), | |
delays = delay_opts(incubation_time_influenza) | |
) | |
plot(epinow_estimates_igi) |
|
||
¿Cómo obtener la media y la desviación típica de un tiempo de generación con *sólo* parámetros de distribución pero sin estadísticas de resumen como `mean` o `sd` para `EpiNow2::Gamma()` o `EpiNow2::LogNormal()`? | ||
|
||
Mira el `{epiparameter}` viñeta en [extracción y conversión de parámetros](https://epiverse-trace.github.io/epiparameter/articles/extract_convert.html) y su [casos de uso](https://epiverse-trace.github.io/epiparameter/articles/extract_convert.html#use-cases) ¡! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mira el `{epiparameter}` viñeta en [extracción y conversión de parámetros](https://epiverse-trace.github.io/epiparameter/articles/extract_convert.html) y su [casos de uso](https://epiverse-trace.github.io/epiparameter/articles/extract_convert.html#use-cases) ¡! | |
¡Mira en `{epiparameter}` la viñeta [extracción y conversión de parámetros](https://epiverse-trace.github.io/epiparameter/articles/extract_convert.html) y sus [casos de uso](https://epiverse-trace.github.io/epiparameter/articles/extract_convert.html#use-cases) ! |
Consulta este excelente tutorial sobre la estimación del intervalo seriado y el período de incubación de la Enfermedad X teniendo en cuenta *la censura* utilizando la inferencia bayesiana con paquetes como `{rstan}` y `{coarseDataTools}`. | ||
|
||
- Tutoría en inglés: <https://rpubs.com/tracelac/diseaseX> <!-- para solicitar --> | ||
- Tutorial en Español: <https://epiverse-trace.github.io/epimodelac/EnfermedadX.html> | ||
|
||
**Entonces,** después de obtener tus valores estimados, puedes crear manualmente tus propios` <epidist>` objetos de clase con `epiparameter::epidist()` ¡! Echa un vistazo a su [guía de referencia sobre "Crear un `<epidist>` objeto"](https://epiverse-trace.github.io/epiparameter/reference/epidist.html#ref-examples) ¡! | ||
|
||
Por último, echa un vistazo al último [`{epidist}` paquete R](https://epidist.epinowcast.org/) que proporciona métodos para abordar los principales retos de la estimación de distribuciones, como el truncamiento, la censura por intervalos y los sesgos dinámicos. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consulta este excelente tutorial sobre la estimación del intervalo seriado y el período de incubación de la Enfermedad X teniendo en cuenta *la censura* utilizando la inferencia bayesiana con paquetes como `{rstan}` y `{coarseDataTools}`. | |
- Tutoría en inglés: <https://rpubs.com/tracelac/diseaseX> <!-- para solicitar --> | |
- Tutorial en Español: <https://epiverse-trace.github.io/epimodelac/EnfermedadX.html> | |
**Entonces,** después de obtener tus valores estimados, puedes crear manualmente tus propios` <epidist>` objetos de clase con `epiparameter::epidist()` ¡! Echa un vistazo a su [guía de referencia sobre "Crear un `<epidist>` objeto"](https://epiverse-trace.github.io/epiparameter/reference/epidist.html#ref-examples) ¡! | |
Por último, echa un vistazo al último [`{epidist}` paquete R](https://epidist.epinowcast.org/) que proporciona métodos para abordar los principales retos de la estimación de distribuciones, como el truncamiento, la censura por intervalos y los sesgos dinámicos. | |
Consulta este excelente tutorial sobre la estimación del intervalo serial y el período de incubación de la Enfermedad X, teniendo en cuenta *la censura* por medio de inferencia bayesiana con paquetes como `{rstan}` y `{coarseDataTools}`. | |
- Tutorial en Inglés: <https://rpubs.com/tracelac/diseaseX> <!-- para solicitar --> | |
- Tutorial en Español: <https://epiverse-trace.github.io/epimodelac/EnfermedadX.html> | |
**Luego,** después de obtener tus valores estimados, ¡puedes crear manualmente tus propios objetos con clase ` <epidist>` por medio de `epiparameter::epidist()`! Echa un vistazo a su [guía de referencia sobre "Crear un objeto `<epidist>` "](https://epiverse-trace.github.io/epiparameter/reference/epidist.html#ref-examples) ¡! | |
Por último, echa un vistazo al último [paquete de R `{epidist}`](https://epidist.epinowcast.org/) que proporciona métodos para abordar los principales retos de la estimación de distribuciones, como el truncamiento, la censura por intervalos y los sesgos dinámicos. |
- Utilizar funciones de distribución con `<epidist>` para obtener estadísticas resumidas y parámetros informativos de las intervenciones de salud pública, como la Ventana de rastreo de contactos y la Duración de la cuarentena. | ||
- Utiliza `discretise()` para convertir distribuciones de retraso continuas en discretas. | ||
- Utiliza `{epiparameter}` para obtener los retardos de información necesarios en las estimaciones de transmisibilidad. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Utilizar funciones de distribución con `<epidist>` para obtener estadísticas resumidas y parámetros informativos de las intervenciones de salud pública, como la Ventana de rastreo de contactos y la Duración de la cuarentena. | |
- Utiliza `discretise()` para convertir distribuciones de retraso continuas en discretas. | |
- Utiliza `{epiparameter}` para obtener los retardos de información necesarios en las estimaciones de transmisibilidad. | |
- Utilizar funciones de distribución con `<epidist>` para obtener estadísticas de resumen y parámetros informativos de las intervenciones de salud pública, como la Ventana de rastreo de contactos y la Duración de la cuarentena. | |
- Utilizar `discretise()` para convertir distribuciones de retraso continuas en discretas. | |
- Utilizar `{epiparameter}` para obtener los retrasos de información necesarios en las estimaciones de transmisibilidad. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've had a look until line 536, @juan-umana will check the rest and then we can review each other's translation?
chunk_output_type: inline | ||
--- | ||
|
||
:::::::::::::::::::::::::::::::::::::: questions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:::::::::::::::::::::::::::::::::::::: questions | |
:::::::::::::::::::::::::::::::::::::: Preguntas |
|
||
:::::::::::::::::::::: callout | ||
|
||
`cfr_rolling()` es una función utilitaria que calcula automáticamente el CFR de cada día del brote con los datos disponibles hasta ese día, ahorrando tiempo al usuario. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`cfr_rolling()` es una función utilitaria que calcula automáticamente el CFR de cada día del brote con los datos disponibles hasta ese día, ahorrando tiempo al usuario. | |
`cfr_rolling()` es una función que calcula automáticamente la TL en cada día del brote con los datos disponibles hasta ese día, lo que ahorra tiempo al usuario, ya que no hace falta calcular este parámetro manualmente para cada momento. |
utils::tail(rolling_cfr_adjusted) | ||
``` | ||
|
||
Con `utils::tail()` mostramos que las últimas estimaciones de CFR. Las estimaciones ingenuas y las ajustadas al retraso tienen rangos superpuestos de intervalos de confianza del 95%. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Con `utils::tail()` mostramos que las últimas estimaciones de CFR. Las estimaciones ingenuas y las ajustadas al retraso tienen rangos superpuestos de intervalos de confianza del 95%. | |
Con `utils::tail()` mostramos como los últimos valores estimados de la TL ajustada y sin ajustar tienen rangos superpuestos de intervalos de confianza del 95%. |
|
||
Con `utils::tail()` mostramos que las últimas estimaciones de CFR. Las estimaciones ingenuas y las ajustadas al retraso tienen rangos superpuestos de intervalos de confianza del 95%. | ||
|
||
Ahora, visualicemos ambos resultados en una serie temporal. ¿Cómo se comportarían en tiempo real las estimaciones de CFR ingenuas y las ajustadas al retraso? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahora, visualicemos ambos resultados en una serie temporal. ¿Cómo se comportarían en tiempo real las estimaciones de CFR ingenuas y las ajustadas al retraso? | |
Ahora, visualicemos ambos resultados en una serie temporal. ¿Cómo se comportarían en tiempo real las estimaciones de TL ajustadas y sin ajustar? |
) | ||
``` | ||
|
||
La línea horizontal representa la CFR ajustada al retraso estimada al final del brote. La línea punteada significa que la estimación tiene un intervalo de confianza del 95% (IC 95%). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La línea horizontal representa la CFR ajustada al retraso estimada al final del brote. La línea punteada significa que la estimación tiene un intervalo de confianza del 95% (IC 95%). | |
La línea horizontal representa la TL ajustada al retraso temporal, estimada al final del brote. La línea punteada significa que la estimación tiene un intervalo de confianza del 95% (IC 95%). |
|
||
La línea horizontal representa la CFR ajustada al retraso estimada al final del brote. La línea punteada significa que la estimación tiene un intervalo de confianza del 95% (IC 95%). | ||
|
||
**Observa** que este cálculo ajustado al retardo es especialmente útil cuando un *curva epidémica de casos confirmados* es el único dato disponible (es decir, cuando no se dispone de datos individuales desde el inicio hasta la muerte, especialmente durante la fase inicial de la epidemia). Cuando hay pocas muertes o ninguna, hay que hacer una suposición para el *distribución del retraso* desde el inicio hasta la muerte, por ejemplo, a partir de la literatura basada en brotes anteriores. [Nishiura et al., 2009](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0006852) representan esto en las figuras con datos del brote de SRAS en Hong Kong, 2003. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Observa** que este cálculo ajustado al retardo es especialmente útil cuando un *curva epidémica de casos confirmados* es el único dato disponible (es decir, cuando no se dispone de datos individuales desde el inicio hasta la muerte, especialmente durante la fase inicial de la epidemia). Cuando hay pocas muertes o ninguna, hay que hacer una suposición para el *distribución del retraso* desde el inicio hasta la muerte, por ejemplo, a partir de la literatura basada en brotes anteriores. [Nishiura et al., 2009](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0006852) representan esto en las figuras con datos del brote de SRAS en Hong Kong, 2003. | |
**Observa** que este cálculo ajustado al retraso temporal entre síntomas y muerte es especialmente útil cuando los únicos datos disponibles son *curvas epidémica de casos confirmados* (es decir, cuando no se dispone de datos individuales, especialmente durante la fase inicial de la epidemia). Cuando hay pocas muertes o ninguna, hay que hacer una suposición para la *distribución temporal* desde la aparición de síntomas hasta la muerte, por ejemplo, a partir de la literatura basada en brotes anteriores. [Nishiura et al., 2009](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0006852) representan esto en las figuras con datos del brote de SARS en Hong Kong, 2003. |
|
||
Basándote en la figura anterior: | ||
|
||
- ¿Cuánta diferencia en días hay entre la fecha en la que el IC del 95% de la estimación *CFR ajustado por retraso* frente a *CFR ingenua* ¿cruzar con el CFR estimado al final del brote? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ¿Cuánta diferencia en días hay entre la fecha en la que el IC del 95% de la estimación *CFR ajustado por retraso* frente a *CFR ingenua* ¿cruzar con el CFR estimado al final del brote? | |
- ¿Cuántos días hay entre el inicio del brote y la fecha en la que el intervalo de confianza de la *TL ajustada* se cruza con el intervalo de confianza de la *TL sin ajustar*? ¿Los intervalos se cruzan con la TL estimada al final del brote? |
|
||
- ¿Cuánta diferencia en días hay entre la fecha en la que el IC del 95% de la estimación *CFR ajustado por retraso* frente a *CFR ingenua* ¿cruzar con el CFR estimado al final del brote? | ||
|
||
Discute: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discute: | |
Discusión: |
|
||
- Utiliza `{cfr}` para estimar la gravedad | ||
|
||
- Utiliza `cfr_static()` para estimar el CFR global con los últimos datos disponibles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Utiliza `cfr_static()` para estimar el CFR global con los últimos datos disponibles. | |
- Utiliza `cfr_static()` para estimar la TL global con los últimos datos disponibles. |
|
||
- Utiliza `cfr_static()` para estimar el CFR global con los últimos datos disponibles. | ||
|
||
- Utiliza `cfr_rolling()` para mostrar cuál sería el CFR estimado en cada día del brote. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Utiliza `cfr_rolling()` para mostrar cuál sería el CFR estimado en cada día del brote. | |
- Utiliza `cfr_rolling()` para mostrar cuál sería la TL estimada en cada día del brote. |
|
||
- Utiliza `cfr_rolling()` para mostrar cuál sería el CFR estimado en cada día del brote. | ||
|
||
- Utiliza la `delay_density` para ajustar el CFR según la distribución de retrasos correspondiente. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Utiliza la `delay_density` para ajustar el CFR según la distribución de retrasos correspondiente. | |
- Utiliza la `delay_density` para ajustar la TL según la distribución de retrasos correspondiente. |
|
||
Por ejemplo `dplyr::filter(data, condition)` utiliza `filter()` del `{dplyr}` paquete. | ||
|
||
Esto nos ayuda a recordar las funciones del paquete y a evitar conflictos de espacio de nombres. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esto nos ayuda a recordar las funciones del paquete y a evitar conflictos de espacio de nombres. | |
Esto nos ayuda a recordar las funciones requeridas y evitar usar funciones que fueron creadas con el mismo nombre pero provienen de otros paquetes. |
thank you all for your review. I'll start to accept comments or spin off any interesting question or topic as an issue to assess later. |
Co-authored-by: GeraldineGomez <[email protected]>
Co-authored-by: Julian Otero <[email protected]>
Co-authored-by: CarmenTamayo <[email protected]>
Co-authored-by: Juan D. Umaña <[email protected]>
all changes added. now this is ready to merge 🚀 thank you all! |
@avallecam, no need for an actual review but could you browse this quickly for a simple high-level check?
If it sounds good, I can:
For reference, to translate two episodes, I used almost 10% of my free monthly characters. Translating all lessons in a short amount of time may indeed require paying for DeepL, at least for 1 month.
Since babeldown is not really designed for the workbench, I had a couple of minor issue. I will coordinate with Maëlle in the coming months to see if we can streamline the process even more:
tutorials-middle/episodes/quantify-transmissibility.Rmd
Lines 178 to 179 in dc783bc
Post-processing: