Building a Care Significance Graph for the Philippines
I spent about three months last year putting together a visual breakdown of how care is distributed across Philippine provinces using DOH statistics, PSA census data, and some NGO reports. The result was a graph that tracks hospital density, nurse-to-patient ratios, and out-of-pocket healthcare spending by region. It turned out to be messier than I expected. Here is how I did it, what broke, and what you should watch out for if you try something similar.
The Heart Of Care Unpacking The Significance Of Care In The Philippines Graph
Before I dive into the mechanics, a quick definition of what we are actually building. This is a multi-variable visualization that maps the availability, accessibility, and quality of care across different Philippine regions. The core data points usually come from the Department of Health's Health Facilities Inventory, the Philippine Statistics Authority's labor reports, and the Social Amelioration Program payout records during the pandemic. What makes it useful is layering those three together so you can see where care is actually present versus where it is only on paper. My first attempt used a simple choropleth map colored by hospital count per capita. That looked clean at first. Then I cross-referenced it with the nurse shortage data from the Professional Regulation Commission and the map fell apart. Provinces like Batangas and Cavite had plenty of hospitals on the map but their nurse ratios were among the worst in the country. The graph was technically correct and completely misleading. That was the first thing I learned about this kind of visualization.
The Data Pipeline
I pulled the raw data from three sources. The DOH Hospital Inventory gives you facility counts by region and type. The PSA Labor Force Survey gives you health worker distribution but the reporting lag is usually two years behind. The third source is the DSWD's registry of accredited care service providers, which is useful for community-based and home care coverage. I loaded everything into Python and used pandas to merge the datasets by province code. The join was never clean because each agency uses a slightly different regional classification system. DOH groups the CARAGA region one way, PSA breaks it into separate province lines, and DSWD sometimes collapses smaller provinces into cluster codes. I wrote a mapping dictionary that aligned all three systems and manually verified about forty entries that did not match automatically. That part took two full days. For the visualization itself I used a combination of matplotlib for the base maps and plotly for the interactive layer. The graph ends up as a scrollable map where you can toggle between hospital density, nurse ratios, and out-of-pocket spending. Each region shows a tooltip with the exact figures and a small trend line if you hover over it. The trend lines only go back to 2019 because earlier data was not digitized consistently across all regions.
Get the Full Details

The Edge Case That Slowed Me Down
About halfway through the project I noticed that Metropolitan Manila was skewing every average. It has roughly twelve percent of the population but nearly thirty-five percent of the specialized hospitals and nearly half the practicing specialists. When I included Metro Manila in the regional averages, everything outside the capital looked worse than it actually was. When I excluded it, the graph looked completely different and the narrative shifted from "the provinces are neglected" to "Metro Manila hoards resources." Both were true. Neither told the whole story. The workaround was simple but not obvious at first. I built the graph in two passes. The main view shows the Luzon, Visayas, and Mindanao averages with Metro Manila stripped out. A secondary toggle lets you overlay the Metro Manila data separately. I added a note in the legend that flags the exclusion so nobody misses it. This approach is standard in health economics but easy to forget when you are building a single dashboard under a deadline.
Pitfalls That Will Waste Your Time
The biggest problem with care graphs in the Philippines is informal care. A lot of caregiving in the provinces happens through family networks, parishes, and informal community health workers who are never counted in official statistics. The DOH inventory tracks licensed facilities. It does not track the woman in Isabela who runs a small boarding house for elderly patients or the barangay health worker who makes house calls without formal accreditation. Your graph will systematically undercount care capacity in rural areas because the data source itself is incomplete. Another issue is the timing mismatch. The PSA data I used is from 2022. The DOH facility data has entries from 2023 and 2024 that overlap but are not synchronized. If you want a graph that is accurate for a specific year, you have to acknowledge that each layer is pulling from a different time window. I solved this by adding a transparency flag to each data point that shows which year it comes from. It makes the graph look cluttered but it stops you from making false precision claims.
When This Approach Fails
This type of graph works fine for broad regional comparisons. It breaks down quickly if you try to use it for municipal-level decisions. The data simply does not go that deep in most provinces. I tried once to pull city-level data for Cebu and found that three of the six component cities had no DOH facility records on file at all. The graph would have shown them as empty space, which implies no care infrastructure exists there, which is wrong. It just means the data does not exist. For granular analysis you are better off using the DOH's own Health Facility and Services Bureau datasets directly rather than building your own graph. Their API is limited but the raw tables are more complete than anything I managed to scrape together in a weekend.
Download and Access
The graph I built is available on my GitHub repository. I included the full Python notebook, the merged dataset, and a Jupyter Book version that explains each mapping decision in detail. The raw CSV files are also there if you want to build a different visualization with the same data. The repo link is in my profile. If you use this for anything academic or policy-related, cite the DOH and PSA as primary sources. The graph itself is derivative and I am not claiming authority over the underlying numbers. I just organized them in a way that made the regional disparities visible without hiding Metro Manila in the average. The code is licensed under MIT. Feel free to fork it, modify it, or build something else entirely. The mapping dictionary alone took me longer than I wanted to spend and if someone else can reuse it, that is a win.