GithubHelp home page GithubHelp logo

compilerla / intake-html-table Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 88 KB

Intake plugins for HTML tables.

License: Apache License 2.0

Python 97.84% Shell 2.16%
intake data-catalog data-access

intake-html-table's Introduction

intake-html-table

Test coverage percentage

Intake plugin for HTML tables.

Installation

pip install -e git+https://github.com/compilerla/intake-html-table@main#egg=intake-html-table

Or

git clone https://github.com/compilerla/intake-html-table
cd intake-html-table/
pip install -e .

Usage

See examples/notebook.ipynb or view on nbviewer for more.

Use the html_table driver to read data from HTML tables. Pass additional kwargs to pandas.read_html():

metadata:
  version: 1
sources:
  table:
    description: Read from an HTML table with id=data, skipping the first 2 rows
    driver: html_table
    args:
      urlpath: "https://example.com/"
      attr:
        id: data
      skiprows: 2

Use the apache_dir driver to read a catalog from an Apache Server directory:

metadata:
  version: 1
sources:
  ncei:
    description: National Centers for Environmental Information data catalog
    driver: apache_dir
    args:
      urlpath: "https://www.ncei.noaa.gov/data/"

Tests

Run the test suite (from the root of the repository):

coverage run -m pytest

To view the coverage report with indicators for untested (missed) lines:

coverage report -m

To upate the README badge Test coverage percentage from the latest test run:

coverage-badge -f -o tests/coverage.svg

The -f argument ensures the existing badge is overwritten.

Tests also run via GitHub Action on events against the main branch.

intake-html-table's People

Contributors

angela-tran avatar pre-commit-ci[bot] avatar thekaveman avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

intake-html-table's Issues

Auto-generate and update coverage badge

We have the coverage-badge package available, which generates an SVG from the most recent coverage run, with a simple command:

coverage-badge -f -o tests/coverage.svg

How to run this automatically at some point when new code is introduced?

See #9 and #10 for more history.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.