-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Progress on retrieving subcounty data
- Loading branch information
Showing
3 changed files
with
73 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
import tabula | ||
from tabula.io import read_pdf | ||
import pandas as pd | ||
import re | ||
|
||
|
||
def getPopulation(): | ||
table = tabula.read_pdf(file,pages=22) | ||
|
||
import pdb;pdb.set_trace() | ||
file = "VOLUME-1-KPHC-2019.pdf" | ||
|
||
raw = read_pdf(file, pages=[22, 23, 24, 25, 26, 27, 2, 29, 30], area=[ | ||
100.8125, 0.6425, 1000.2825, 1000.1025 | ||
]) | ||
|
||
table1 = raw[1].dropna( | ||
subset=['National/ County'] | ||
).drop(columns='Unnamed: 0').drop(2).drop(3) | ||
|
||
import pdb | ||
pdb.set_trace() | ||
|
||
# table2 = read_pdf(file, pages=23) | ||
# table3 = read_pdf(file, pages=24) | ||
|
||
# tables = [table1, table2, table3] | ||
|
||
|
||
getPopulation() |