Skip to main content

Data about Japan

Project description

JapanData

PyPI PyPI - License

JapanData is a python package which provides access to datasets about Japan. It includes:

Jupyter notebooks in the /examples folder demonstrate how to use these datasets.

This package is provided under a MPL 2.0 license. Each dataset is subject to its own license as noted below. The datasets themselves are hosted at the companion repository JapanData-sources. They are fetched by a local JapanData installation when first needed.

Installation

The latest release version of JapanData can be installed using pip

pip install japandata

If you wish to enhance or extend JapanData, you can make changes by cloning this repository and then either adding src/japandata directly to your python path or by installing the local version using pip

python3 -m build
pip install -e .

Available Datasets

Maps

japandata.maps.data provides maps of Japan, its prefectures, and its municipalities, from 1920 to today. These maps are sourced from Asanobu Kitamoto, ROIS-DS Center for Open Data in the Humanities, and they are licensed CC BY-SA 4.0. They take the form of geopandas dataframes containing topojson maps.

from japandata.maps.data import load_map

map_df = load_map(date, level, quality)

date should be a date (e.g. 2015-04-31) or a year (2015). Maps are available for a range of dates starting in 1920, and this function will return the most recent map available on or before date . Use the japandata.maps.data.get_dates() function to check the available dates.

level should be prefecture, local, local_dc, or japan. prefecture yields a geopandas dataframe of Japan's prefectures, local a dataframe of its localities, local_dc a dataframe in which the localities making up designated cities are merged, and japan a dataframe containing a single geometry object of the whole of japan.

quality should be one of coarse, low, medium, high and controls the geometrical detail of the map. For many purposes coarse is sufficient.

Population

japandata.population.data provides data about the population and demographics of japan, at the national, prefectural, and municipal level, annually from 1967 to 2020. This information is sourced from the Basic Register of Residents (住民基本台帳) via the Official Statistics Portal Site and is licensed CC BY 4.0 International.

from japandata.population.data import japan_pop_df, pref_pop_df, local_pop_df
  • japan_pop_df: Pandas dataframe with information about Japan, 1967-2020
  • pref_pop_df: Information about each prefecture, 1967-2020
  • local_pop_df: Information about each locality, 1995-2020. Contains redundancies: both designated cities and their constituent subdivisions are included.

The data gradually becomes more detailed as time goes on, with early data containing only the total population, the gender breakdown, and the number of households, while later data includes e.g. the number of births and deaths. Each year is a Japanese fiscal year, stretching from April 1st of the calendar year to March 31st of the subsequent calendar year. For example, the row marked '1995' contains the number of births from April 1st, 1995 to March 31st, 1996. The total population in the '1995' row is the population at the end of this period, on March 31st 1996.

Furusato Nouzei

japandata.furusatonouzei.data provides information about the Furusato Nouzei program. This Hometown Tax Transfer program is a Japanese government program in which taxpayers can divert part of the taxes which would fund their local government to instead go to a different local government. In exchange for doing so, the taxpayer receives various 'tokens of gratitude' with a value which can in principle be no more than 30% of the diverted tax amount.

The data provided here is collected from the Ministry of Internal Affairs and is licensed CC BY 4.0 International.

from japandata.furusatonouzei.data import fndata

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

JapanData-0.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

JapanData-0.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file JapanData-0.1.tar.gz.

File metadata

  • Download URL: JapanData-0.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for JapanData-0.1.tar.gz
Algorithm Hash digest
SHA256 3e51601b45c266cf30e3eacd803a1157461a745899c6ee20a1d470ae15c3884c
MD5 fc36ec1d96a01ae5245b66f6d0617603
BLAKE2b-256 f845a3d1f781e1a21e8528ed6665831f35f0e5ac80af1c16bdd90b69cefcc69b

See more details on using hashes here.

File details

Details for the file JapanData-0.1-py3-none-any.whl.

File metadata

  • Download URL: JapanData-0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for JapanData-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3a15586fef3635f6894deceae6a0ff11183c7dcf8591f92b008f1b0b5b47779
MD5 618bc45cc3bb67c0b2c8e1df1a467831
BLAKE2b-256 30e172e18753b0438f22f08043941b8c179c625bc454c2df5b36af36dd301a75

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page