Skip to main content

A database with multiple data sets that support drawing, These data sets are: World population data set, World Carbon dioxide Concentration data set, World Number of Cities data set, China number of population data set, China number of space vehicles data set......

Project description

A database with multiple data sets that support drawing, These data sets are: World population data set, World Carbon dioxide Concentration data set, World Number of Cities data set, China number of population data set, China number of space vehicles data set......

Issues Forks Stars License Commits Release version

简体中文

The README is still being written and the Wdata project is still under development......

You can use the Watch feature to keep an eye on Wdata project development.

Features

This project is a dataset with multiple functions, there are many datasets in it, and it has been uploaded to Pypi.

Download

This project uses Pypi, so it is recommended to use Pypi to download

Code: pip3 install Wdatabase

Use

The package name when we upload is not the same as the package name used in actual use When importing, use the following code

from Wdata import Wdata_class as main

The main class has the following functions:

Functions Introduction Syntax Return Type
Fetch_dict Get data Func() dict
draw Draw Func() None
Save_file Save file Func(filename:str) bool

Import Data

Wdata has a lot of data sets, here we use 200 years of population growth data as an example

The syntax of Wdata_class is as follows: Wdata_class(json_fname: str)

json_fname is the name of the dataset

from Wdata import Wdata_class as main
test = main('Population_growth') # import population growth over 200 years

Get data

We can use the Fetch_dict function to fetch the data

such as these codes

from Wdata import Wdata_class as main
test = main('Population_growth') # import population growth over 200 years
print(test.Fetch_dict())

after running

~/python test.py
{
    '1800': 900000000,
    '1820': 1100000000,
    '1840': 1200000000,
    '1860': 1300000000,
    '1880': 1400000000,
    '1900': 1650000000,
    '1920': 1800000000,
    '1940': 2200000000,
    '1960': 3000000000,
    '1980': 4400000000,
    '2000': 5900000000,
    '2022': 7400000000
    }

Drawing

Drawing functions use the draw() function as the following code

from Wdata import Wdata_class as main
test = main('Population_growth') # import population growth over 200 years
test.draw()

The result is this

Data save

You can use the Save_file() function to save data

The syntax of Save_file is Save_file(filename:str) -> None

Parameter Description: The filename parameter is used to describe the save file

as the following code

from Wdata import Wdata_class as main
test = main('Population_growth') # import population growth over 200 years
test.Save_file('Package_test') # This function will automatically add the .json suffix

What data do we have

Currently we have the following data

name description unit of measure
Population_growth Population Growth 1800-2022 People
Chinese_spacecraft 2017-2020.06 Chinese spacecraft launches Spacecraft
World_spacecraft 2017-2020.06 World Spacecraft Launches Spacecraft

The above data comes from Bing and Baidu. The author cannot guarantee the accuracy of the data and should not be used for professional purposes

Donate

Due to special reasons, the author was unable to register a Paypal account and was forced to use Alipay

For details, please see Donation Instructions

About Pypi

The Wdataorg team has used twine to upload this library to Pypi

Wdataorg Pypi account

Wdatabase Pypi warehouse address

License

This open source project uses Apache License 2.0

In the process of using this open source project, please use it strictly in accordance with the license

The final interpretation right belongs to the development team Wdataorg

Project License Link

Our closed beta

The closed beta will start in version 0.0.1b0, and we look forward to the feedback from users. Simple Chinese

功能介绍

本项目是一个含有多功能的数据集,里面有很多数据集,目前已经上传到Pypi。

下载

本项目使用Pypi,所以建议使用Pypi下载

代码:pip3 install Wdatabase

使用

我们上传时包名和实际使用时用的包名不太一样 导入时,使用以下代码

from Wdata import Wdata_class as main

主类中有以下函数:

函数 介绍 语法 返回类型
Fetch_dict 获取数据 Func() dict
draw 绘图 Func() None
Save_file 保存文档 Func(filename:str) bool

导入数据

Wdata有很多数据集,我们这里使用200年来人口增长数据举例

Wdata_class的语法如下: Wdata_class(json_fname: str)

json_fname为数据集的名字

from Wdata import Wdata_class as main 
test = main('Population_growth') # 导入200年来人口增长

获取数据

我们可以使用Fetch_dict函数获取数据

比如这些代码

from Wdata import Wdata_class as main 
test = main('Population_growth') # 导入200年来人口增长
print(test.Fetch_dict())

运行后

~/python test.py
{   
    '1800': 900000000,
    '1820': 1100000000, 
    '1840': 1200000000,
    '1860': 1300000000, 
    '1880': 1400000000, 
    '1900': 1650000000, 
    '1920': 1800000000, 
    '1940': 2200000000, 
    '1960': 3000000000,
    '1980': 4400000000, 
    '2000': 5900000000,
    '2022': 7400000000
    }

绘图

绘图功能使用draw()函数 如以下代码

from Wdata import Wdata_class as main 
test = main('Population_growth') # 导入200年来人口增长
test.draw()

结果是这样的

数据保存

你可以使用Save_file()函数来保存数据

Save_file的语法是Save_file(filename:str) -> None

参数说明: filename参数是用于说明保存文件

如以下代码

from Wdata import Wdata_class as main 
test = main('Population_growth') # 导入200年来人口增长
test.Save_file('Package_test') # 该函数会自动添加.json后缀

我们有哪些数据

目前我们有以下数据

名字 说明 计量单位
Population_growth 1800-2022年人口增长
Chinese_spacecraft 2017-2020.06中国航天器发射次数 航天器
World_spacecraft 2017-2020.06世界航天器发射次数 航天器

以上数据来源于Bing以及Baidu,作者无法确保数据的准确性,切勿用于专业用途

捐款

由于特殊原因,作者无法注册Paypal账号,被迫使用支付宝

具体详情请见捐款说明

有关Pypi

Wdataorg团队已经使用twine将本库上传到Pypi

Wdataorg Pypi账号

Wdatabase Pypi仓库地址

许可证

本开源项目使用Apache License 2.0

在使用本开源项目过程中,请严格按照许可证规定使用

最终解释权归开发团队Wdataorg所有

项目许可证链接

我们的内测

内测将在版本0.0.1b0中开始,我们期待使用者们提出的意见。

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

Wdatabase-0.0.1b0.tar.gz (20.1 kB view details)

Uploaded Source

Built Distributions

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

Wdatabase-0.0.1b0-py3.10.egg (17.8 kB view details)

Uploaded Egg

Wdatabase-0.0.1b0-py3.9.egg (17.7 kB view details)

Uploaded Egg

Wdatabase-0.0.1b0-py3.8.egg (17.7 kB view details)

Uploaded Egg

File details

Details for the file Wdatabase-0.0.1b0.tar.gz.

File metadata

  • Download URL: Wdatabase-0.0.1b0.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for Wdatabase-0.0.1b0.tar.gz
Algorithm Hash digest
SHA256 c78fbaf925651b65dbc1e48f33a03faae734204dd848673f0342cb1893b282d4
MD5 429101a9e2f3d03d5cc076fe0d20bc84
BLAKE2b-256 3a4b767365176dc76f3c94e9292a3ae332f89e0f853df08d1e0b4792e6d1919b

See more details on using hashes here.

File details

Details for the file Wdatabase-0.0.1b0-py3.10.egg.

File metadata

  • Download URL: Wdatabase-0.0.1b0-py3.10.egg
  • Upload date:
  • Size: 17.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for Wdatabase-0.0.1b0-py3.10.egg
Algorithm Hash digest
SHA256 5bc0d0023b9039a3ca6d5f014aa92278a5880086b60f2201d28f483b16d440d3
MD5 8c71e2d0f96a28fa34c5b416a2d6e6e1
BLAKE2b-256 1efe02c7dabb30b218a3854a2bd5e235ada6ffe9999fc4861bbd5deee1e840c5

See more details on using hashes here.

File details

Details for the file Wdatabase-0.0.1b0-py3.9.egg.

File metadata

  • Download URL: Wdatabase-0.0.1b0-py3.9.egg
  • Upload date:
  • Size: 17.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for Wdatabase-0.0.1b0-py3.9.egg
Algorithm Hash digest
SHA256 3ca8c5cf3f279941752e02918efe1a152e4921b2c9723bca559f8301336a68b4
MD5 a59f8f50d4c1357c3d4711783c8447a6
BLAKE2b-256 c2e1c4c96ea972cd6ff48416e289c3cc8a77a632f8f304c826ebbc563afb122d

See more details on using hashes here.

File details

Details for the file Wdatabase-0.0.1b0-py3.8.egg.

File metadata

  • Download URL: Wdatabase-0.0.1b0-py3.8.egg
  • Upload date:
  • Size: 17.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for Wdatabase-0.0.1b0-py3.8.egg
Algorithm Hash digest
SHA256 d59f70450ce6ecad71e115602c5858b4da7f44f2b7c0a4207ed812780d6a7aab
MD5 7599f6c2c6db30fc32db677f0ac77084
BLAKE2b-256 87e573c665bec1665da238a1cbc1f97cb1c9726902a9e12ae5c05f48d2c8274c

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