一个来自api.kolada.se/v2的统计数据的刮刀,建立在statscaper之上。

kolada_scraper的Python项目详细描述


这是一个来自http://api.kolada.se/v2/的统计数据刮刀,它构建在statscaper包的顶部<;https://github.com/jplusplus/statscaper>;

安装

pip install -r requirements.txt

示例用法

fromkoladaimportKoladaScraperscraper=KoladaScraper()dataset=scraper.items["N00002"]# pass a KPI id# Query by yeardata=dataset.fetch({'period':[2016,2015],})# ...or by municipalitytowns=[x.valueforxindataset.dimensions['municipality'].allowed_values]data=dataset.fetch({'municipality':towns[:5],})# ... or by bothdata=dataset.fetch({'period':[2016,2015],'municipality':towns[:5],})# And then do something with the results.print(data.pandas)

待办事项

  • 添加更多允许值
  • 传递不允许的值时实现错误
  • 实施地区
  • updatechunkify()函数,以便更好地构建url

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
jenkins在java代码的csv中使用前导零传递数字   终止java应用程序javaw。exe eclipse   java平均字长。文本   java在事务中关闭连接时会发生什么?   java如何为rich faces extendedDatatable启用可调整大小的列?   SpringJavaWebApp头nosniff不适合js和css文件   Java:抛出异常   java获取拒绝ArrayList中存在的用户名的代码。   关于编写JNDI服务提供者的java教程   java Android emulator电子书示例已停止   java如何防止双向关系中的循环   在Java中,如何将接口的实现作为变量传递给方法?   java有没有办法通过注释来监听CoreNLP处理的进度?   java Eclipse错误:导入项目时“无法读取项目描述文件”   java为什么findViewById返回null?