← Back to team overview

dhis2-users team mailing list archive

Re: Connect to data

 

Thanks, Jason.

So far I've only been interacting with the database through the user interface, but it sounds like if I want to pull data I need to go straight to the database tables, right? I wouldn't mind exporting, but I'm trying to have DHIS also serve as a functional database that I can keep the data in and access directly.

Thanks again,
Tom

________________________________
From: Jason Pickering [mailto:jason.p.pickering@xxxxxxxxx]
Sent: 21 May 2012 12:24
To: Hiatt, Mr Tom (WPRO)
Cc: dhis2-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Dhis2-users] Connect to data

Hi again Tom,

As is the case in many tasks for R, there are numerous ways to do this. I have used  the RODBC and RPostgreSQL  packages of R to retrieve data from the DHIS2 database. Both of these are documented in the documentation. The trick of course is that you must write the SQL to retrieve the data into an R data frame.

Other ways might be to export the data as DXF or through the WebAPI and then parse the XML in R.   CSV is another good option of course, which DHIS2 supports in various modules, such as the report tables which can export CSV directly.

Regards,
Jason




On Mon, May 21, 2012 at 5:50 AM, <hiattt@xxxxxxxxxxxx<mailto:hiattt@xxxxxxxxxxxx>> wrote:

What's the best way to extract the DHIS data for further analysis, etc. in a statistical program like R? Is there a more automatic way to do it, or would I need to export the data manually in order to re-import it into R. I would have thought the API would do this, but it seems to only contain metadata as far as I can tell.



Thanks,

Tom






________________________________
This message was scanned for viruses with Trend Micro ScanMail, GFI MailSecurity and GFI MailEssentials by the World Health Organization Regional Office for the Western Pacific. However, the recipient is advised to scan this e-mail and any attached files for viruses.

Disclaimer:

This e-mail, together with any attachments, is intended for the named recipients only and is confidential. It may also be privileged or otherwise protected by law.

If you have received it in error, please notify the sender immediately by reply e-mail and delete it and any attachments from your system. You may not copy or disclose its contents to anyone.

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp





====================================================
This message was scanned for viruses with Trend Micro ScanMail, GFI MailSecurity and  GFI MailEssentials by the World Health Organization Regional Office for the Western Pacific.  However, the recipient is advised to scan this e-mail and any attached files for viruses.

Disclaimer:

This e-mail, together with any attachments, is intended for the named recipients only and is confidential. It may also be privileged or otherwise protected by law.

If you have received it in error, please notify the sender immediately by reply e-mail and delete it and any attachments from your system. You may not copy or disclose its contents to anyone.


Follow ups

References