Skip to main content

PyPI Downloads GitHub last commit GitHub Repo stars GitHub forks

国家自然科学基金数据查询系统

安装

pip3 install nsfc

数据下载

数据库文件较大,可通过百度网盘进行下载 (下载链接 提取码: 2nw5)

  • 下载所需的数据库文件,如project.A.sqlite3, 或全部数据project.all.sqlite3
  • 保存至nsfc的安装路径下的data目录下, 如:/path/to/site-packages/nsfc/data/project.db
  • 或者保存至HOME路径下的nsfc_data目录下,如~/nsfc_data/project.db
  • 也可以通过-d参数指定要使用的数据库文件

使用示例

本地查询

# 查看帮助
nsfc query

# 列出可用的查询字段
nsfc query -K

# 输出数量
nsfc query -C

# 按批准年份查询
nsfc query -C -s approval_year 2019

# 按批准年份+学科代码(模糊)
nsfc query -C -s approval_year 2019 -s subject_code "%A%"

# 批准年份也可以是一个区间
nsfc query -C -s approval_year 2015-2019 -s subject_code "%C01%"

# 结果输出为.jl文件
nsfc query -s approval_year 2019 -s subject_code "%C0501%" -o C0501.2019.jl

# 结果输出为xlsx文件
nsfc query -s approval_year 2019 -s subject_code "%C0501%" -o C0501.2019.xlsx -F xlsx

# 限制最大输出条数
nsfc query -L 5 -s approval_year 2019                                           

结题报告下载

nsfc report 20671004

nsfc report 20671004 -o out.pdf

其他功能

LetPub数据获取

nsfc crawl

本地数据库构建/更新

nsfc build

其他说明

  • 目前基本上只有2019年之前的数据,2020年的数据很少
  • 后续有数据时会再更新

更新记录

  • [2021-11-10] version 2.0.3
    • update base_url of Official
    • update url of Official.get_conclusion_data

Download files

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

Source Distribution

nsfc-2.0.4.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

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

nsfc-2.0.4-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file nsfc-2.0.4.tar.gz.

File metadata

  • Download URL: nsfc-2.0.4.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.3

File hashes

Hashes for nsfc-2.0.4.tar.gz
Algorithm Hash digest
SHA256 ad906217f180e56d4e2c8dcfe648e167a0cf4205a6f883500c776c241423aa0f
MD5 a37ee1a1b39d9f0faabb6962dfdf2f60
BLAKE2b-256 83efedbb844b0ac053e43e11677e4716c2ab3a8ec9a8f32340ae0abb5cc083a0

See more details on using hashes here.

File details

Details for the file nsfc-2.0.4-py3-none-any.whl.

File metadata

  • Download URL: nsfc-2.0.4-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.3

File hashes

Hashes for nsfc-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 47344e7ecd60355a97d9014a2b0b26bf363c93813dc83a366b7e40a2973988d4
MD5 d30c3dec87d6b2bd786a44c02adcf07c
BLAKE2b-256 01864d3a8f21af3c4bc8b1e8463044227873641ffe91d641d4111fd14b70eb85

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.4 This release

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

1.0.0

1 file

Supported by

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