Metadata-Version: 2.4
Name: jpcorpreg
Version: 1.7.0
Summary: jpcorpreg is a Python library that downloads corporate registry which is published in the Corporate Number Publication Site as a data frame.
Author: new-village
License: Apache-2.0
Project-URL: Homepage, https://github.com/new-village/jpcorpreg
Project-URL: Repository, https://github.com/new-village/jpcorpreg
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: bs4
Requires-Dist: pandas
Dynamic: license-file

# jpcorpreg  
[![Test](https://github.com/new-village/jpcorpreg/actions/workflows/test.yaml/badge.svg)](https://github.com/new-village/jpcorpreg/actions/workflows/test.yaml)
![PyPI - Version](https://img.shields.io/pypi/v/jpcorpreg)
  
**jpcorpreg** is a Python library that downloads corporate registry which is published in the [Corporate Number Publication Site](https://www.houjin-bangou.nta.go.jp/en/) as a data frame.
   
  
## Installation  
----------------------
jpcorpreg is available on pip installation.
```sh
$ python -m pip install jpcorpreg
```
  
### GitHub Install
Installing the latest version from GitHub:  
```sh
$ git clone https://github.com/new-village/jpcorpreg
$ cd jpcorpreg
$ pip install -e .
```
    
## Usage
This section demonstrates how to use this library to load and process data from the National Tax Agency's [Corporate Number Publication Site](https://www.houjin-bangou.nta.go.jp/).

### Direct Data Loading
To download data for a specific prefecture, use the `load` function. By passing the prefecture name as an argument, you can obtain a DataFrame containing data for that prefecture.  
```python
>>> import jpcorpreg
>>> df = jpcorpreg.load("Shimane")
```

To execute the `load` function without argument, data for all prefectures across Japan will be downloaded. 
```python
>>> import jpcorpreg
>>> df = jpcorpreg.load()
```

### CSV Data Loading
If you already have a downloaded CSV file, use the `read_csv` function. By passing the file path as an argument, you can obtain a DataFrame with headers from the CSV data.
```python
>>> import jpcorpreg
>>> df = jpcorpreg.read_csv("path/to/data.csv")
```
