pdftables

Programmatic Conversion of PDF Tables With R

https://github.com/expersso/pdftables

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.9%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Programmatic Conversion of PDF Tables With R

Basic Info
  • Host: GitHub
  • Owner: expersso
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 119 KB
Statistics
  • Stars: 40
  • Watchers: 2
  • Forks: 6
  • Open Issues: 0
  • Releases: 0
Created over 10 years ago · Last pushed almost 10 years ago
Metadata Files
Readme

README.Rmd

---
output:
  md_document:
    variant: markdown_github
---

# pdftables

[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/pdftables)](http://cran.r-project.org/web/packages/pdftables)
[![Travis-CI Build Status](https://travis-ci.org/expersso/pdftables.svg?branch=master)](https://travis-ci.org/expersso/pdftables)
[![Cranlogs Downloads](http://cranlogs.r-pkg.org/badges/grand-total/pdftables)](http://cran.r-project.org/web/packages/pdftables)

```{r options, echo=FALSE}
knitr::opts_chunk$set(cache = FALSE, warning = FALSE, error = FALSE, 
                      fig.path = "", eval=FALSE)
```

### Introduction

The `pdftables` package allows the user to convert PDF tables to formats more
amenable to analysis (csv, XML, or XLSX) by wrapping the 
[PDFTables API](https://pdftables.com).

The package can be installed from either CRAN or Github (development version):

```{r install}
# From CRAN
install.packages("pdftables")

# From Github
library(devtools)
install_github("expersso/pdftables")

library(pdftables)
```

To use the package the user first needs to sign up to the 
[PDFTables API](https://pdftables.com/join) to get an API token (they offer a 
free package that allows up to 50 pages).

### Usage Example

In the following example we first write the `iris` dataset to a `.csv` file. We 
then open that file and print it as a `.pdf` file. Using the `convert_pdf`
function we then upload that PDF to the [PDFTables API](https://pdftables.com)
which parses and returns the converted file as `test2.csv`.

(Note: All functions in the package require that you provide your api key in the
`api_key` argument. By default this looks for an environment variable called
`pdftable_api`, but you can also provide it directly.)

```{r}
write.csv(head(iris, 20), file = "test.csv", row.names = FALSE)

# Open test.csv and print as PDF to "test.pdf"

convert_pdf("test.pdf", "test2.csv")
# Converted test.pdf to test2.csv
```

![](vignettes/example.png)

If the `output_file` argument is omitted, the name of the output file will be
the same as the input file, but with the right file extension.

The package (and API) supports converting PDFs to `.csv`, `.xml`, and `.xlsx`.

Note that the conversion sometimes fails to recover the underlying data exactly,
so you may have to open the retrieved file and make some manual corrections.

The `get_remaining` function shows you how many pages you have remaining.

```{r}
get_remaining()
```

Owner

  • Name: EP
  • Login: expersso
  • Kind: user

GitHub Events

Total
  • Watch event: 1
  • Fork event: 1
Last Year
  • Watch event: 1
  • Fork event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 11
  • Total Committers: 3
  • Avg Commits per committer: 3.667
  • Development Distribution Score (DDS): 0.455
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Expersso e****5@g****m 6
Joran Elias j****s@u****u 3
Steven Maude g****t@s****k 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: over 2 years ago

All Time
  • Total issues: 0
  • Total pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: about 6 hours
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • joranE (1)
  • StevenMaude (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 255 last-month
  • Total docker downloads: 43,390
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: pdftables

Programmatic Conversion of PDF Tables

  • Versions: 1
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 255 Last month
  • Docker Downloads: 43,390
Rankings
Docker downloads count: 0.6%
Stargazers count: 7.9%
Forks count: 9.6%
Average: 14.4%
Dependent packages count: 18.1%
Dependent repos count: 24.0%
Downloads: 26.4%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • httr * imports
  • tools * imports
  • knitr * suggests
  • rmarkdown * suggests