<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Javier Ruiz on Medium]]></title>
        <description><![CDATA[Stories by Javier Ruiz on Medium]]></description>
        <link>https://medium.com/@ruiz.javier_54262?source=rss-7a2214e988df------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*xYLVUM7bPoOGcGA2f9VpWw.png</url>
            <title>Stories by Javier Ruiz on Medium</title>
            <link>https://medium.com/@ruiz.javier_54262?source=rss-7a2214e988df------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 19:26:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ruiz.javier_54262/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[5 Simple Steps to Process Unstructured Data in Snowflake]]></title>
            <link>https://medium.com/snowflake/5-simple-steps-to-process-unstructured-data-in-snowflake-8b073d34e4ee?source=rss-7a2214e988df------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b073d34e4ee</guid>
            <category><![CDATA[unstructured-data]]></category>
            <category><![CDATA[snowflake]]></category>
            <dc:creator><![CDATA[Javier Ruiz]]></dc:creator>
            <pubDate>Sun, 11 Dec 2022 14:02:04 GMT</pubDate>
            <atom:updated>2022-12-11T14:02:04.299Z</atom:updated>
            <content:encoded><![CDATA[<p>Did you know you can store and process unstructured files inside Snowflake?</p><figure><img alt="Binary files in Snowflake" src="https://cdn-images-1.medium.com/max/1024/0*mlZymemRDaGMT4Y4" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This guide will take you through these 5 simple steps to process unstructured data inside Snowflake.</p><p>We will use a Java Class I wrote that detects and extracts file metadata using the <a href="https://tika.apache.org/">Apache Tika</a> toolkit.</p><p><strong>1. Download the Java Class that processes the files</strong></p><p>You can download the jar containing the Class using the link below:</p><p><a href="https://tinyurl.com/SnowProcessObject">SnowProcessObject.jar</a></p><p><strong>2. Upload the Java Class into a Snowflake stage</strong></p><p>Load the jar file from step 1 into a stage named <strong><em>code</em></strong>. Alternatively, you can upload the jar file into another stage (either internal or external); however, do not forget to update any references below to point to the stage where the jar file is located.</p><pre>put file:///Users/.../.../SnowProcessObject.jar @code auto_compress=false;</pre><p>Let’s check the file is in our stage</p><pre>list @code;</pre><p><strong>3. Create the functions to process the files</strong></p><p>Run the following script to create the 3 functions the class file enables us to process files.</p><pre>create or replace function get_object_metadata(file string)<br>    returns string<br>    language java<br>    imports = (&#39;@code/SnowProcessObject.jar&#39;)<br>    handler = &#39;ProcessObject.GetMetadata&#39;<br>;<br> <br>create or replace function parse_document(file string)<br>    returns string<br>    language java<br>    imports = (&#39;@code/SnowProcessObject.jar&#39;)<br>    handler = &#39;ProcessObject.Parse&#39;<br>;<br> <br>create or replace function get_content_type(file string)<br>    returns string<br>    language java<br>    imports = (&#39;@code/SnowProcessObject.jar&#39;)<br>    handler = &#39;ProcessObject.GetType&#39;<br>;</pre><p>Now that we have set up the code that will process our files, let’s load some files and process them.</p><p><strong>4. Create the stage that will hold the files that we will process</strong></p><p>In the same database, create a stage named <strong><em>objects, </em></strong>with any folder structure you want. For example, you may have a subfolder for images, documents, videos, audio, and others.</p><p>When creating the stage, make sure to enable the encryption and directory features of Snowflake:</p><pre>create or replace stage objects <br>    encryption = (type = &#39;SNOWFLAKE_SSE&#39;)<br>   , directory = (enable = true);</pre><p><strong>5. Load sample files</strong></p><p>Load sample files using the same process we used to load the class file into Snowflake.</p><pre>put file:&#39;///path/path/path/my file with spaces.pdf&#39; @objects/documents auto_compress=false;<br><br>put file:///path/path/path/myimage.jpeg @objects/images auto_compress=false;<br><br>put file:///path/path/path/myvideo.mov @objects/videos auto_compress=false;<br><br>put file:///path/path/path/myaudio.m4a @objects/audio auto_compress=false;<br><br>put file:///path/path/path/somefile @objects/others auto_compress=false;</pre><p>Presto! Now we have our files loaded in Snowflake, let’s test and see what output we get when we process the files with the java class we loaded into Snowflake.</p><h3><strong>Processing the files in Snowflake</strong></h3><p>With the files inside Snowflake, now it is very easy to extract the file type, file metadata, or any text inside the file (as long as the file is a document). To do this, we call the newly created functions as follows:</p><pre>-- The function parse document extracts any text from a document<br><br>select parse_document(&#39;@objects/my file with spaces.pdf&#39;);<br><br>-- The function get_object_metadata returns a JSON object with the file metadata<br><br>select get_object_metadata(&#39;@objects/my file with spaces.pdf&#39;);<br><br>-- The get_content_type function returns the file type<br><br>select get_content_type(&#39;@objects/my file with spaces.pdf&#39;);</pre><p>In the above examples, each line will bring back a single row with the information we asked for. But, can we make this work for all the files in a stage?</p><h3>Using Directory Tables in Snowflake</h3><p>A <a href="https://docs.snowflake.com/en/user-guide/data-load-dirtables.html">directory table</a> will give us the metadata of the files stored in a stage. We will use it to feed the file names to our newly created functions to get the details of all the files in a stage in a single view.</p><blockquote>Make sure the stage where the files are located has the <strong><em>directory</em></strong> and <strong><em>encryption</em></strong> settings set to <strong><em>true</em></strong> and <strong><em>SNOWFLAKE_SSE</em></strong> respectively; see step number 4 above.</blockquote><p>When new files are loaded into the stage, make sure to refresh the directory table:</p><pre>alter stage objects refresh;</pre><p>Check the documentation as for <a href="https://docs.snowflake.com/en/user-guide/data-load-dirtables-manage.html#automatically-refreshing-directory-table-metadata">certain stages</a>, the refresh can happen automatically.</p><p><strong>Putting it all together</strong></p><p>The following view uses our newly created functions to provide us with all the metadata on the files in the stage, including file type, file type metadata, and any text that is included inside the file.</p><pre>select <br>      right(relative_path, len(relative_path)-charindex(&#39;/&#39;,relative_path)) Filename<br>    , left(relative_path, charindex(&#39;/&#39;,relative_path)) Path<br>    , relative_path<br>    , size<br>    , file_url<br>    , last_modified<br>    , get_content_type(&#39;@Objects/&#39;||relative_path) Content_type<br>    , try_parse_json(get_object_metadata(&#39;@Objects/&#39;||relative_path)) Object_Metadata<br>    , case when Content_type like &#39;%pdf%&#39; then parse_document(&#39;@Objects/&#39;||relative_path) else &#39;NA&#39; end  Content<br>    , get_presigned_url(https://medium.com/@Objects,%20relative_path) presigned_url<br>from directory(@objects);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*giSw-Ana72W4Ggd9" /><figcaption>Sample Output from our view</figcaption></figure><p>You can create a table or view with the results from the query to use the results in a dashboard or to derive analytics from the files. The query provided includes the signed URL in case we want to include the URL within a dashboard or provide a link to download the file.</p><h3><strong>But wait, there’s more …</strong></h3><p>We can very easily extract key information from the JSON metadata depending on the type of file that we are processing:</p><pre>select <br>      right(relative_path, len(relative_path)-charindex(&#39;/&#39;,relative_path)) Filename<br>    , left(relative_path, charindex(&#39;/&#39;,relative_path)) Path<br>    , relative_path<br>    , size<br>    , file_url<br>    , last_modified<br>    , get_content_type(&#39;@Objects/&#39;||relative_path) Content_type<br>    , try_parse_json(get_object_metadata(&#39;@Objects/&#39;||relative_path)) Object_Metadata<br>    , case when Content_type like &#39;%pdf%&#39; then parse_document(&#39;@Objects/&#39;||relative_path) else &#39;NA&#39; end  Content<br>    , get_presigned_url(https://medium.com/@Objects,%20relative_path) presigned_url<br>    -- Audio files<br>    , case when Content_type like &#39;%audio%&#39; then coalesce(Object_Metadata:&quot;xmpDM:audioSampleRate&quot;,&#39;&#39;) else &#39;&#39; end AudioSampleRate<br>    , case when Content_type like &#39;%audio%&#39; then coalesce(Object_Metadata:&quot;xmpDM:duration&quot;,&#39;&#39;) else &#39;&#39; end AudioDuration<br>    -- Video files<br>    , case when Content_type like &#39;%video%&#39; then coalesce(Object_Metadata:&quot;xmpDM:videoCompressor&quot;,&#39;&#39;) else &#39;&#39; end CODEC<br>    , case when Content_type like &#39;%video%&#39; then coalesce(Object_Metadata:&quot;xmpDM:duration&quot;,&#39;&#39;) else &#39;&#39; end VideoDuration<br>    -- Image files<br>    , case when Content_type like &#39;%image%&#39; then coalesce(Object_Metadata:&quot;height&quot;||&#39;x&#39;||Object_Metadata:&quot;width&quot;,Object_Metadata:&quot;Image Height&quot;||&#39;x&#39;||Object_Metadata:&quot;Image Width&quot;,&#39;&#39;) else &#39;&#39; end Resolution<br>    , case when Content_type like &#39;%image%&#39; then coalesce(Object_Metadata:&quot;Chroma ColorSpaceType&quot;,Object_Metadata:&quot;ICC:Blue Colorant&quot;,Object_Metadata:&quot;Number of Components&quot;,&#39;&#39;) else &#39;&#39; end Color<br>from directory(@objects)<br>;</pre><h3>Now what …</h3><p>In a few steps, you are now able to process files within Snowflake using Java. From this example, you can create other classes to process files; the options are limitless.</p><p>Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b073d34e4ee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snowflake/5-simple-steps-to-process-unstructured-data-in-snowflake-8b073d34e4ee">5 Simple Steps to Process Unstructured Data in Snowflake</a> was originally published in <a href="https://medium.com/snowflake">Snowflake Builders Blog: Data Engineers, App Developers, AI, &amp; Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coronavirus — Un estimado para México]]></title>
            <link>https://medium.com/@ruiz.javier_54262/coronavirus-un-estimado-para-m%C3%A9xico-353c767e811e?source=rss-7a2214e988df------2</link>
            <guid isPermaLink="false">https://medium.com/p/353c767e811e</guid>
            <category><![CDATA[español]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[mexico]]></category>
            <category><![CDATA[covid19]]></category>
            <dc:creator><![CDATA[Javier Ruiz]]></dc:creator>
            <pubDate>Wed, 25 Mar 2020 17:41:09 GMT</pubDate>
            <atom:updated>2020-03-25T18:14:07.524Z</atom:updated>
            <content:encoded><![CDATA[<h3>Coronavirus — Un estimado para México</h3><h4>¿Qué pasa si el virus se propaga en México igual que en otros países?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ryp2zhHmp_lzaeS2dh2tOg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@blackpoetry?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">pixpoetry</a> on <a href="https://unsplash.com/s/photos/coronavirus-hospital?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>El objetivo de este artículo es mostrar un estimado de casos para México tomando como base los datos hasta ahora reportados en el país y asumiendo una progresión de la enfermedad similar a los países del mundo mayor afectados por la enfermedad.</p><h3><strong>El Coronavirus en el Mundo</strong></h3><p>Vemos como se ha desarrollado la enfermedad en los países de la gráfica; el comportamiento es exponencial, salvo en Corea del Sur, en dónde se ha logrado controlar la enfermedad.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*1xWeeQhQiPt-ZbDh6KJ6AQ.png" /><figcaption>Casos por día para distintos países</figcaption></figure><p>La siguiente gráfica muestra las curvas de casos confirmados, a una escala menor, para China, Italia, Korea del Sur, Mexico, España, Suiza, y Estados Unidos. Si analizamos con detenimiento, México se encuentra apenas comenzando el ciclo de la enfermedad; razón por la cual no es fácil estimar lo que va a pasar; sin embargo, si asumimos, en el peor de los casos, que siga una tendencia similar a la de los otros países, los próximos 7 días son críticos para saber como se va a comportar la enfermedad. Esto tiene una correlación con la cantidad de pruebas que se administren.</p><p>Si los diagnósticos son contabilizados de manera similar, el punto en donde se encuentra Mexico, es cuando los demás países comenzaron el período de aceleración; es decir la pendiente de la curva aumenta rápidamente y de manera exponencial.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*geRqQAL43rzxuSXV-KHwDQ.png" /></figure><h3><strong>Estimación de casos en México</strong></h3><p>Asumiendo un comportamiento similar al de los otros países, utilizando los datos de casos registrados hasta el 24 de marzo en México, se puede generar un estimado de crecimiento exponencial similar al de Italia, España, o Estados Unidos. Si existe la medición adecuada y el comportamiento de la enfermedad es similar, México se aproximaría a los 53 mil casos alrededor del día 51 (hoy estamos en el día 27).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*8Clfs3j8WtlrpiQMGCgArg.png" /><figcaption>Estimado de crecimiento exponencial de nuevos casos México</figcaption></figure><h3><strong>Camas y Ventiladores</strong></h3><p>Según cifras <a href="https://www.cdc.gov/coronavirus/2019-ncov/hcp/clinical-guidance-management-patients.html">generales</a>, como el 80% sólo tienen síntomas leves, y el otro 20% necesita hospitalizarse. De estos, aproximadamente, del 20 al 30% necesitan cuidados intensivos para ayudarlos a respirar (según el Centro de Control de Enfermedades de Estados Unidos o CDC). Una vez que un paciente está en ventilación, puede tardar entre 3 y 6 semanas utilizando el ventilador. Un factor determinante en la mortandad es el número de ventiladores disponibles para tratar a los pacientes de la pulmonía adquirida por el COVID-19.</p><p>En México, distribuidos en el país, existen aproximadamente 2,050 <a href="https://www.eluniversal.com.mx/nacion/sector-salud-con-4291-camas-y-2053-ventiladores-para-combatir-coronavirus">respiradores</a> y 4,291 camas de hospital; si asumimos que el 20% de los enfermos necesitarán hospitalizarse, y de estos, entre el 20% al 30% requerirán un ventilador, podemos presentar un estimado sencillo de cuánto durará el equipo actual. Para este estimado, asumimos, además, que ventiladores y pacientes se encuentran cerca geográficamente y que se utiliza un ventilador por paciente. Bajo estas premisas, analizando los números estimados junto con la capacidad de camas y ventiladores, entonces, no habrá disponibilidad de camas de hospital alrededor del día 47 y de ventiladores entre el día 49 y 51.</p><p>El ritmo de desocupación de ventiladores de 3 a 6 semanas no da lo suficiente para reutilizar los ventiladores nuevamente.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*5RAUOIIHTRAokC8K633UUA.png" /><figcaption>Estimado de utilización de camas de hospital y ventiladores en México</figcaption></figure><p>El caso presentado sería ideal, si todos los ventiladores y pacientes se encuentran en el mismo lugar; sin embargo, probablemente no es así, y razón por la cual en otros lugares como en Italia, tienen que decidir a quién ponerle el ventilador. Prácticamente sellando el destino de una de las dos personas y dándole a otra la posibilidad de la vida, pero no garantizarla.</p><p>Asumiendo una propagación similar a la de otros países dadas las medidas de distanciamiento tomadas por la población y que no exista una medicina que afecte la curva, podemos observar un estimado de nuevos casos exponencial. Haciendo una correlación con el número de recursos de cuidado intensivo necesarios (camas y ventiladores), el análisis presenta los días en los que se podrían terminar las camas bajo un escenario ideal.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=353c767e811e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coronavirus — La voz de los datos]]></title>
            <link>https://medium.com/@ruiz.javier_54262/coronavirus-los-datos-hablan-a3b2774020e8?source=rss-7a2214e988df------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3b2774020e8</guid>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[español]]></category>
            <category><![CDATA[healthcare]]></category>
            <category><![CDATA[virus]]></category>
            <dc:creator><![CDATA[Javier Ruiz]]></dc:creator>
            <pubDate>Tue, 17 Mar 2020 08:06:22 GMT</pubDate>
            <atom:updated>2020-03-17T14:40:18.958Z</atom:updated>
            <content:encoded><![CDATA[<h4>Visualizando el comportamiento exponencial del COVID-19</h4><h3>Coronavirus — La voz de los datos</h3><h4>Existe suficiente evidencia, HOY, para que los países tomen acciones firmes y prevengan la propagación exponencial del virus y eviten daños graves a la población y los sistemas de salud</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dkaaQANPIRundBMKN-6c4Q.jpeg" /><figcaption>Fuente: Markus Spiske — Unsplash</figcaption></figure><p><em>Versión en inglés </em><a href="https://medium.com/@ruiz.javier_54262/coronavirus-what-the-data-shows-5753e3cdd87"><em>aquí</em></a><em>.</em></p><p>He trabajado en el área de análisis de datos por más de 20 años; hasta ahora, no había encontrado un mejor momento para analizar y entender datos públicos tan importantes como los de la pandemia COVID-19.</p><p>Para este análisis, hemos usado <a href="https://data.humdata.org/dataset/novel-coronavirus-2019-ncov-cases">datos</a> publicados por el Centro de Sistemas e Ingeniería de la Universidad John Hopkins; estos consisten en el reporte de nuevos casos detectados, fallecimientos y mejorías diarias desde el 22 de enero hasta el 15 de marzo del 2020. Para este artículo, se graficaron estos datos para observar el comportamiento de la enfermedad basándose en los números reportados por los países afectados por el coronavirus.</p><p>El propósito de este artículo es describir gráficamente los datos sobre COVID-19; le corresponde a cada individuo, organización, o entidad tomar decisiones basadas en los datos descritos a continuación.</p><h3>Casos diagnosticados</h3><p>Los datos recabados comienzan a partir del 22 de enero del 2020; momento en el cual ya había 548 incidencias del padecimiento en China. Podemos observar que el número de casos crece de manera exponencial a partir del día 10 al 25 antes de comenzar a estabilizarse como resultado de las acciones tomadas por el gobierno Chino.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zFMhus0hXe_LXFjH_LycBw.jpeg" /><figcaption>Casos nuevos de COVID-19</figcaption></figure><p>Para el resto de los países, se puede observar que los casos nuevos comienzan a crecer rápidamente a partir del 28 de febrero, exceptuando a Corea del Sur, en todos los países se puede observar un crecimiento exponencial.</p><p><strong>Asumiendo condiciones similares entre los países</strong>, si toman las mismas medidas tomadas por China en el mismo momento dentro del ciclo de la enfermedad para cada país, el número de casos se estabilizaría alrededor del día 40, contados a partir de un mínimo de 500 casos de COVID-19.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vl2Le3MI68i3Utfm0fdvCA.jpeg" /><figcaption>Casos Nuevos de COVID-19 (excluyendo China)</figcaption></figure><p>Corea del Sur ha podido controlar la enfermedad; aun con un alza rápida de casos, probablemente debido al alto índice de pruebas, el número de casos se ha estabilizado alrededor de 8,000 con un total de 75 fallecimientos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*4E3ehuhAoNaIc309x-hmSA.jpeg" /><figcaption>Crecimiento exponencial de casos diagnosticados (excepto Corea del Sur)</figcaption></figure><p>La tabla anterior muestra el crecimiento exponencial de incidencias de COVID-19 para China y se compara con Iran, Italia, Corea del Sur, España, y Estados Unidos.</p><blockquote>La similitud en la forma en la cual crece el número de casos, excepto en Corea del Sur, es impresionante.</blockquote><h3><strong>Mortandad</strong></h3><p>Los fallecimientos en China han llegado alrededor de 3,203 casos; se puede observar, además, que la tasa de mortandad se ha reducido significativamente en los últimos 10 días.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*phUOReE1677AzhYwNn2LVg.jpeg" /><figcaption>Fallecimientos causados por el COVID-19</figcaption></figure><p>Si analizamos a detalle los brotes de la enfermedad en los países con menos de 2,000 casos, se puede observar que la aceleración rápida de nuevos casos en Italia, probablemente más rápido que China con el mismo nivel de mortandad, seguido por Irán y España. Hoy, no se puede saber si Irán y España tendrán una aceleración similar a la de Italia; los días próximos serán críticos para estos países.</p><blockquote>Hoy, no se puede saber si Irán y España tendrán una aceleración similar a la de Italia; los días próximos serán críticos para estos países.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qUhJAD2bM-KJqLb8FIxj8w.jpeg" /><figcaption>Fallecimiento para países con menos de 2000 muertos de COVID-19</figcaption></figure><p>Si analizamos con más detalle el extremo derecho inferior de la gráfica, podemos observar que en los países con menos de 100 fallecimientos, la tendencia exponencial es evidente; con Francia y Estados Unidos acelerando rápidamente. <strong>Ante condiciones similares</strong>, para la mayoría de los países en la gráfica con menos de 100 fallecimientos, se podrá ver el mismo tipo de crecimiento en los próximos 10 días.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wvqNULIjsPXNX7PvDI_jxw.jpeg" /><figcaption>Análisis de tendencia para países con menos de 100 fallecimientos</figcaption></figure><p>Podemos notar, como la tendencia de Corea del Sur, no ha mostrado una tendencia exponencial si la comparamos con la de otros países. La tasa de mortandad de Corea del Sur es aproximadamente 0.92 %, contrastando con la de China de 3.95 %.</p><h3><strong>Recuperaciones</strong></h3><p>Aunque hay miles de fallecimientos como resultado de la pandemia, también hay muchos casos con una recuperación satisfactoria. En China, ha habido 70,220 recuperaciones, 3,203 fallecimientos, y 7,508 personas siguen enfermas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iud9JigJE3TRROukUhpjPg.jpeg" /><figcaption>Recuperaciones</figcaption></figure><p>En Italia, al 15 de marzo, hay un total de 24,747 casos, 1,809 fallecimientos¹, 2,335 recuperaciones, y 20,603 personas siguen enfermas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3TOr67wb9BrT-ILauI5J5A.jpeg" /><figcaption>Recuperaciones excluyendo China</figcaption></figure><h3><strong>Nuevos Casos Diagnosticados y Resultados Clínicos</strong></h3><p>Es importante analizar la relación entre nuevos casos diagnosticados y los resultados clínicos; es decir, una gráfica en donde se muestren la trayectoria de casos nuevos y la de los resultados clínicos, ya sea fallecimiento o recuperación, para determinar el ciclo de la enfermedad y el lapso de tiempo en el cual se logra controlar la pandemia.</p><p>Para este análisis, China es el único país que tiene suficientes datos para poder entender mejor el ciclo de la enfermedad. Podemos ver como el número de enfermos (diferencia entre nuevos diagnósticos y resultados clínicos) se reduce gradualmente. Al menos que algo cambie, si todo continua como ahorita, el número de enfermos debe reducirse significativamente en los próximos 10 días; casi cerrando el ciclo para China.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I_LihyadoCdYfTQJrSHx5A.jpeg" /><figcaption>Análisis de número de pacientes enfermos en China</figcaption></figure><h3><strong>COVID-19 en Latinoamérica</strong></h3><p>En el continente Americano los casos de COVID-19 están incrementando rápidamente, con Estados Unidos reportando el mayor número de casos, seguido por Canadá, Brasil, Chile y Perú. Se empieza a distinguir la tendencia exponencial en el número de nuevos diagnósticos, algunos países más acelerados que otros, pero la tendencia exponencial, hasta ahora, es evidente.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*baF0QS6rZwj6tWtQlSOzUg.jpeg" /><figcaption>COVID-19 en el continente Americano</figcaption></figure><p>Si analizamos a detalle los países que presentan entre 10 y 60 casos, se distingue también la tendencia exponencial que se ha visto en China, Europa, y en Estados Unidos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8twC61RujPIMb8DpDgvLFg.jpeg" /><figcaption>COVID-19 en el continente americano; países con menos de 60 casos</figcaption></figure><p>La siguiente tabla muestra una comparación entre los países más afectados en el mundo y los países con más casos en el continente americano; los próximos días van a ser muy importantes para determinar si los países latinoamericanos pueden frenar la tendencia exponencial. Analizando los números en la tabla, para la mayoría de los países que han sobrepasado los 1,000 casos, en cuestión de días continúa duplicando el número de casos hasta que se desacelera y estabiliza, como es el caso de China.</p><blockquote>Ante la falta de acción oportuna, se puede desencadenar un incremento exponencial en el número de personas afectadas en un país.</blockquote><blockquote>Este incremento genera una demanda elevada de servicios de salud, lo cual ocasiona además un incremento en la mortandad.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*ccL25F8mp3VPyNHIHkm1vg.jpeg" /><figcaption>Tendencia exponencial en el número de casos</figcaption></figure><p>El objetivo de este artículo ha sido describir el comportamiento, basado en nuevos diagnósticos, fallecimientos, y recuperaciones del COVID-19 en China y los 147 países a los cuales se ha propagado esta enfermedad.</p><p>Existe suficiente evidencia, <strong>HOY</strong>, para que la mayoría de los países tomen acciones firmes y prevengan la propagación exponencial del virus y eviten daños graves a la población y los sistemas de salud.</p><p>[1] Para el 16 de marzo, el número de fallecimientos aumentó a 2,158 en Italia</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3b2774020e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coronavirus — What the data shows]]></title>
            <link>https://medium.com/@ruiz.javier_54262/coronavirus-what-the-data-shows-5753e3cdd87?source=rss-7a2214e988df------2</link>
            <guid isPermaLink="false">https://medium.com/p/5753e3cdd87</guid>
            <dc:creator><![CDATA[Javier Ruiz]]></dc:creator>
            <pubDate>Mon, 16 Mar 2020 08:58:45 GMT</pubDate>
            <atom:updated>2020-03-17T06:12:57.289Z</atom:updated>
            <content:encoded><![CDATA[<h4>Visualizing the exponential behavior of COVID-19</h4><h3>Coronavirus — What the data shows</h3><h4>There is enough evidence, TODAY, for countries to take steadfast action and prevent the virus from spreading exponentially and take a high toll on its population and health services</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U7svfxpqXfhXxinM9P3jIw.png" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Markus Spiske</a> on <a href="https://unsplash.com/s/photos/coronavirus?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>After working in the Data Analytics field for more than 20 years, there has never been another time when analyzing and understanding public data is as important as today with the COVID-19 disease.</p><p>For this analysis, I used <a href="https://data.humdata.org/dataset/novel-coronavirus-2019-ncov-cases">data published</a> by the John Hopkins University Center for Systems Science and Engineering; the data consists of new cases, deaths, and recoveries daily since January 22, 2020 through March 15, 2020. I plotted these data sets plus the combined new cases and outcomes (deaths plus recoveries) to see the overall behavior of the disease based on actual numbers.</p><p>The purpose of this article is to graphically describe the facts surrounding COVID-19; it is up to each individual, organization, or entity to make decisions based on the data described herein.</p><h3><strong>New Cases</strong></h3><p>The data set begins with cases as of January 22nd, 2020 where there were already 548 incidents reported in China. We can see the number of cases grow exponentially from day 10 to 25 before it begins to flatten out as a result of the measures taken by the Chinese government.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zFMhus0hXe_LXFjH_LycBw.jpeg" /></figure><p>For the rest of the countries, we can see the new cases start to grow faster around February 18th; except for South Korea, they all exhibit an exponential growth pattern.</p><p><strong>Assuming everything else equal</strong>, if the countries were to take the same measures as China did at the same time after about 500 cases of the disease in each country, we would expect the number of new cases to taper off around day 40 after reaching the 500 threshold of COVID-19 cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vl2Le3MI68i3Utfm0fdvCA.jpeg" /></figure><p>South Korea has been able to manage the disease, although they had a quick increase in number of new cases, more than likely due to extensive testing, the number has stabilized at around 8,000 with a total of 75 deaths.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*4E3ehuhAoNaIc309x-hmSA.jpeg" /><figcaption>Table showing the exponential growth for new cases (except South Korea)</figcaption></figure><p>The table depicts the exponential behavior of the COVID-19 for China and compares it with Iran, Italy, South Korea, Spain, and the United States.</p><blockquote>The similarities in how the number of cases progress, except for South Korea, is striking.</blockquote><h3><strong>Mortalities</strong></h3><p>Mortality in China has risen to 3,203 cases; however, it has slowed down significantly over the last 10 days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*phUOReE1677AzhYwNn2LVg.jpeg" /></figure><p>If we lower the limit of the axis to analyze the current outbreaks in more detail, we see Italy spiking fast, probably faster than China at the same level of deaths, followed by Iran and Spain. Today, we cannot tell if Iran and Spain will spike similarly to Italy; however, the next few days will be crucial for these countries.</p><blockquote>Today, we cannot tell if Iran and Spain will spike similarly to Italy; however, the next few days will be crucial for these countries.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qUhJAD2bM-KJqLb8FIxj8w.jpeg" /></figure><p>If we analyze in more detail the bottom right portion of the graph, looking at countries that have fewer than 100 deaths, we can see an exponential trend starting to form; with France and the United States ramping up. All things being equal, the bulk of the countries, from day 50 to 55 on the chart, may start to see the same kind of growth over the next 10 days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wvqNULIjsPXNX7PvDI_jxw.jpeg" /></figure><p>Notice the trend in South Korea has not followed an exponential trend when compared with other countries. South Korea’s overall mortality rate is about 0.92 %; compared to China’s 3.95 % rate.</p><h3><strong>Recovered Patients</strong></h3><p>Although there are thousands of deaths, there are many more recoveries. In China, we have seen 70,220 patients recover, 3,203 deaths, and 7,508 people still ill with the disease.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iud9JigJE3TRROukUhpjPg.jpeg" /></figure><p>In Italy, as of March 15, we there are a total 24,747 cases, 1,809 deaths, 2,335 recoveries, and 20,603 people still ill.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3TOr67wb9BrT-ILauI5J5A.jpeg" /></figure><h3><strong>New Cases and Outcomes</strong></h3><p>For me, it is important to see how the New Cases and overall Outcomes relate; that is, plot of New Cases and the outcomes (mortality plus recoveries) to determine the cycle of the disease and how much one lags from the other.</p><p>China is the only country where we can get a better idea of what this cycle looks like. We can see that the gap between new cases and total outcomes is reducing. Unless something else happens, if the behaviors continue exactly the same, we should see the outcomes approach the total number of cases within the next 10 days; thus almost closing the cycle for China.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I_LihyadoCdYfTQJrSHx5A.jpeg" /></figure><p>The goal of this article has been to describe the behavior — based on new cases, deaths, and recoveries — of the COVID-19 disease in China and the 147 countries it has propagated to.</p><p>I believe there is enough evidence, <strong><em>TODAY</em></strong>, for countries where the disease cycle is just beginning, to take steadfast action and prevent the virus from spreading exponentially and take a high toll on its population and health services.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5753e3cdd87" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>