semvec/pypi-packages huggingface dataset:
wikiserieswillemcli 0.1.1
A template to create python libraries
License: MIT
Keywords: wikiserieswillemcli

===================
wikiserieswillemcli
===================

A template to create python libraries


* Documentation: https://wikiserieswillemcli.readthedocs.org/en/latest


Development Workflow
====================

The workflow supports the following steps

 * lint
 * test
 * build
 * document
 * upload
 * graph

These actions are supported out of the box by the corresponding scripts under _CI/scripts directory with sane defaults based on best practices.
Sourcing setup_aliases.ps1 for windows powershell or setup_aliases.sh in bash on Mac or Linux will provide with handy aliases for the shell of all those commands prepended with an underscore.

The bootstrap script creates a .venv directory inside the project directory hosting the virtual environment. It uses pipenv for that.
It is called by all other scripts before they do anything. So one could simple start by calling _lint and that would set up everything before it tried to actually lint the project

Once the code is ready to be delivered the _tag script should be called accepting one of three arguments, patch, minor, major following the semantic versioning scheme.
So for the initial delivery one would call

    $ _tag --minor

which would bump the version of the project to 0.1.0 tag it in git and do a push and also ask for the change and automagically update HISTORY.rst with the version and the change provided.


So the full workflow after git is initialized is:

 * repeat as necessary (of course it could be test - code - lint :) )

   * code
   * lint
   * test
 * commit and push
 * develop more through the code-lint-test cycle
 * tag (with the appropriate argument)
 * build
 * upload (if you want to host your package in pypi)
 * document (of course this could be run at any point)


Important Information
=====================

This template is based on pipenv. In order to be compatible with requirements.txt so the actual created package can be used by any part of the existing python ecosystem some hacks were needed.
So when building a package out of this **do not** simple call

    $ python setup.py sdist bdist_egg

**as this will produce an unusable artifact with files missing.**
Instead use the provided build and upload scripts that create all the necessary files in the artifact.



Project Features
================

* TODO




History
-------

0.0.1 (01-05-2023)
---------------------

* First code creation
jpstat 0.0.5
A python library for accessing official statistics of Japan.
License: MIT
Requires Python: >=3.7,<4.0
Keywords: estat,japan,statistics,economics,data

# jpstat

A python package for accessing the official statistics of Japan.

## Features

- [estat api](#estat-api)
- [estat file](#estat-file)

## Install

```sh
pip install jpstat
```

## estat API

[estat](https://www.e-stat.go.jp/) is the official site for government statistics in Japan. Its api service offers data of over 250+ statistics in Japan. You need to register an api key to access to the statistics.

### Functions

All functions return one or multiple pandas DataFrames.

To see a list of statistics offered by estat api

```python
import jpstat
stat = jpstat.estat.get_stat(key=YOUR_API_KEY)
```

To search data by either the code of a statistic or some keywords

```python
data = jpstat.estat.get_list(statsCode="00400001")
data = jpstat.estat.get_list(searchWord="企業")
```

To download data and data note

```python
data, note = jpstat.estat.get_data(statsDataId="0000040001")
```

If there is an error related to accessing the data note, one can simply suppress outputting it by

```python
data = jpstat.estat.get_data(statsDataId="0000040001", return_note=False)
```

### Configuration

You can pass the estat api key to each function. Or you can set a configuration

```python
jpstat.options["estat.api_key"] = "MY_API_KEY"
```

You can also set the language from Japanese (default, "J") to English
(However it is strongly recommended to use "J" as it often returns more information about the data)

```python
jpstat.options["estat.lang"] = "E"
```

To see a list of valid configuration options

```python
jpstat.config.describe_options()
```

## estat File

Many statistics and datasets in estat can not be accessed through API, but are excel, csv, or pdf files and can be downloaded. Here jpstat provides the functions that scrape the information of statistics and download the files. Api key for estat is not needed, and the result is in Japanese only.

### Functions

To see a list of all statistics in estat that have downloadable files

```python
data = jpstat.estatFile.get_stat()
```

It will take some time to scraping the website of estat at the first time and then save the list to `options["estat.data_dir"]`. From then on, the function would first try to read the local file. You can force scraping again by setting `update=True`.

To search data files by code of a statistic and the survey year (optional)

```python
data = jpstat.estatFile.get_list(statsCode="00400001")
data = jpstat.estatFile.get_list(statsCode="00400001", year="1950")
```

Again, you can save the result by setting `save=True`, and from next time jpstat would first check if the result already exists.

To download the file by using the information of data id and file type ("EXCEL"/"CSV"/"PDF") gotten from the result of `estatFile.get_list`

```python
jpstat.estatFile.get_file(statsDataId="000029094935", file_type="EXCEL")
```

The file would be downloaded to current folder by default.