# Connecting Python with DHIS2 and Applying ML algorithms

**URL:** <https://community.dhis2.org/t/connecting-python-with-dhis2-and-applying-ml-algorithms/61891>\
**Category:** Implementation - Implémentation\
**Tags:** python\
**Created:** [25 October 2024 18:24 UTC](https://community.dhis2.org/t/connecting-python-with-dhis2-and-applying-ml-algorithms/61891 "2024-10-25T18:24:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![LutfullahShifaa](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/lutfullahshifaa/32/26915_2.png) [@LutfullahShifaa](https://community.dhis2.org/u/LutfullahShifaa)\
**Post date:** [25 October 2024 18:24 UTC](https://community.dhis2.org/t/connecting-python-with-dhis2-and-applying-ml-algorithms/61891/1 "2024-10-25T18:24:54Z")

</div>

I would love to share my work with community on connecting python with DHIS2 and applying ML algorithms on available data.  
Its about finding low performing health facilities based on key indicators.  
Visit the post ([Area: Health for All | Lutfullah Shifaa](https://www.linkedin.com/posts/lutfullah-shifaa-a325091b5_dhis-2-demo-sierra-leone-activity-7255636352455589888-trox?utm_source=share&utm_medium=member_android)) here and feel free to share your comments and thoughts. I love to see other community members’ work around this topic and collaborate.  
Good Luck 👍

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [26 October 2024 11:32 UTC](https://community.dhis2.org/t/connecting-python-with-dhis2-and-applying-ml-algorithms/61891/2 "2024-10-26T11:32:32Z")

</div>

Thank you for sharing your innovation with the DHIS2 community!

It’s great to see you’ve been able to use the Play instances API to make this work. Have you tested this on any real instances?

Thanks!

---

<div class="post-metadata">

**Author:** ![LutfullahShifaa](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/lutfullahshifaa/32/26915_2.png) [@LutfullahShifaa](https://community.dhis2.org/u/LutfullahShifaa)\
**Post date:** [27 October 2024 15:51 UTC](https://community.dhis2.org/t/connecting-python-with-dhis2-and-applying-ml-algorithms/61891/3 "2024-10-27T15:51:58Z")

</div>

Hello @Gassim  
Yes, I am using it in our quarterly performance reviews to pull data from different sources including from Afghanistan DHIS2.  
Thanks

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [28 October 2024 08:34 UTC](https://community.dhis2.org/t/connecting-python-with-dhis2-and-applying-ml-algorithms/61891/4 "2024-10-28T08:34:07Z")

</div>

Nice! It’s great to hear it’s already being used in the field.

---

<div class="post-metadata">

**Author:** ![brian](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/brian/32/48251_2.png) [@brian](https://community.dhis2.org/u/brian)\
**Post date:** [7 November 2024 17:12 UTC](https://community.dhis2.org/t/connecting-python-with-dhis2-and-applying-ml-algorithms/61891/5 "2024-11-07T17:12:55Z")

</div>

thank you @LutfullahShifaa for sharing your results from a very novel case study in Afghanistan of triangulating data from various sources, including dhis2, and processing via ML for performance reviews.

I thought you might be interested in this analysis from the HIV sector in Kenya, which took a similar k means clustering approach, but the focus is here on reporting _consistency_ from counties (completeness and timeliness).

> **[Evaluating performance of health care facilities at meeting HIV-indicator...](https://bmcmedinformdecismak.biomedcentral.com/articles/10.1186/s12911-020-01367-9)**
>
> Background The ability to report complete, accurate and timely data by HIV care providers and other entities is a key aspect in monitoring trends in HIV prevention, treatment and care, hence contributing to its eradication. In many...

[Another paper here](https://bora.uib.no/bora-xmlui/bitstream/handle/11250/3002762/ICIMTH%2BProceedings%2B2022%2BGESICHO_BABIC.pdf?sequence=1&isAllowed=y) on sharing these insights from those analysis via dashboards

If other CoP members have similar experiences in processing dhis2 data with machine learning algorithms, this might be a good thread to build on and share 🙂

---

<div class="post-metadata">

**Author:** ![LutfullahShifaa](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/lutfullahshifaa/32/26915_2.png) [@LutfullahShifaa](https://community.dhis2.org/u/LutfullahShifaa)\
**Post date:** [8 November 2024 05:02 UTC](https://community.dhis2.org/t/connecting-python-with-dhis2-and-applying-ml-algorithms/61891/6 "2024-11-08T05:02:07Z")

</div>

Thank you @brian for sharing the papers and proposing to CoP members to share their experience also 👍👍👍I am totally in favor of it.
