没有项目描述
forecastcards的Python项目详细描述
[![构建状态](https://travis-ci.org/e-lo/forecastcards.svg?branch=master)(https://travis ci.org/e-lo/forecast cards)
预测卡是一种简单的数据规范,用于存储有关旅行预测的关键信息,以便:
-评估预测随时间变化的性能,
-分析预测系统和机构随时间变化的总体性能,以及确定为高绩效预测贡献因素。
系统
-预测,即在关注点预测项目将做什么,
-观察,即用于评估预测的数据点
每个"卡"都是基于文本的csv文件。
forecast cards python库用于验证和组织符合forecastcards数据模式的
数据,它由四个主要类组成:
1。cardset:一组符合forecastcards数据模式的预测数据项目。数据集:将卡片集转换为[熊猫](https://pandas.pydata.org/)适合于估算目的的数据集
3。项目:验证单个项目(与cardset的许多功能相同)
4。架构:管理和验证数据架构
位置可以是
-描述github位置的字典,
-本地目录,或
-github网址。
gh-project={'username':'e-lo',
'repository':'forecastcards',
'branch':'master',
'subdir':'examples/ecdot-rx123-ybr_hov'}
ect的位置可以是
-描述github位置的字典,也可以是
-本地目录
gh-u data={'username':'e-lo',
'repository':'forecastcards',
'branch':'master',
'subdir':'examples'}
cardset walks th th浏览目录,查找项目,并根据正确的架构验证它们。
选择'u projects=['lu123'])
````
**数据集**
创建适合估计分位数回归的数据集。
`` python
r/>"subdir":"examples"}
cardset=forecastcards.cardset(data_loc=gh_data)
dataset=forecastcards.dataset(card_locs_by_type=cardset.card_locs_by_type,
file_to_project_id=cardset.file_to_project_id)
rame
dataset.df
```
[实体关系图](spec/en/forecast-cards-erd.png?raw=true"预测卡架构实体关系图")
![数据关系概述](spec/en/forecast-cards-rg.png?RAW ="预测卡数据关系"(
< BR/>预测卡)与[开放知识基金会]([无摩擦数据] ](HTTP://FrutsRealDATA.IO)[表模式](HTTPS://Github. COM/SouthSouthDATA/SPECs/Buff/Mask/Stss/Table Schema,MD)规范。使用[colaboratory]从您的Web浏览器获取的数据架构(https://colab.research.google.com):
[![在COLAB中打开](https://colab.research.google.com/assets/colab badge.svg)](https://colab.research.google.com/github/e-lo/forecastcards/blob/master/forecastcards/notebooks/explore_data_schemas.ipynb)
Erald City Dot对黄砖路的HOV扩展,包含在"ForecastCards/Examples/EmeraldCityDot-RX123-YellowBrickroadhov"中
此示例可与此目录的"笔记本"文件夹一起分析和运行,并可使用[Binder]或[Col]运行。中止(https://colab.research.google.com)。
[![在COLAB中打开](https://colab.research.google.com/assets/colab badge.svg)(https://colab.research.google.com/github/e-lo/forecastcards/blob/master/forecastcards/notebooks/estimate_quantiles.ipynb)
表格有效性状态:[![goodtables.io](https://goodtables.io/badge/github/e-lo/forecast cards.svg)](https://goodtables.io/github/e-lo/forecastcards)
以及文件夹结构:
b观察/
——观察结果-<;日期>;.csv
——预测/
——预测-<;方案ID>;-<;方案年份>;-<;预测创建>;-<;预测ID>;.csv
我如何开始自己的工作?
1.通过检查架构,确保您拥有所需的数据。
2。创建或格式化数据作为预测卡
-将数据输入浏览器并下载:[![在Colab中打开](https://colab.research.google.com/assets/colab badge.svg)](https://colab.research.google.com/github/e-lo/forecast cards/blob/master/forecastcards/notebooks/create\u forecastcards.ipynb)
-使用[csv模板](https://github.com/e-lo/forecastcards/tree/master/forecastcards/template/)并使用文本浏览器或电子表格应用程序输入数据
-使用[helper scripts on the way]转换现有数据(https://github.com/e-lo/forecastcards/issues/1)*
3。使用本地或托管远程服务器(即colaboratory)上的模板笔记本来清理数据和估计分位数回归。
在虚拟环境中(即[conda](https://conda.io/docs/)。
\,可以使用pip从本地克隆目录克隆此git存储库安装
:
`pip install--upgrade.`
日期。您可以使用以下命令覆盖默认编译器来成功安装它:
`cflags='-stdlib=libc++'pip-in暂停cchardet`
[在COLAB中打开](https://colab.research.google.com/assets/colab badge.svg)](https://colab.research.google.com/github/e-lo/forecast cards/blob/master/forecastcards/notebooks/create\u forecastcards.ipynb)
将文件夹从"forecastcards"包中的"template"文件夹复制到用于保存所有项目forecastcards的文件夹中。
2。根据模式重命名项目文件夹,注意不要复制分析范围内的任何项目id(通常是[ForecastCardData Store]的代理(https://github.com/e-lo/ForecastCardData))。
3。在确定或创建特定poi时,添加观测值、poi、预测运行和预测。
4。通过运行"validate_project.py"<;project_directory>;`确认新项目中的数据符合数据架构,或通过从该目录运行"validate_cardset.py"或"validate_project.py"<;cardset_directory>;`
ng project
在本地使用创建预测卡笔记本,或[![在colab中打开](https://colab.research.google.com/assets/colab badge.svg)](https://colab.research.google.com/github/e-lo/forecast cards/blob/master/forecastcards/notebooks/create\u forecastcards.ipynb)
添加一个新的预测csv文件,其中包含关注点
2的相关数据。在scenario csv文件中添加有关模型运行的条目
3。在poi csv文件中添加任何其他感兴趣的点
4。通过运行"validate_project.py"<;project_directory>;`确认项目中的新数据符合数据架构,或通过从该目录运行"validate_cardset.py"或"validate_project.py"<;cardset_directory>;`
ng project
在本地使用创建预测卡笔记本,或[![在Colab中打开](https://colab.research.google.com/assets/colab badge.svg)](https://colab.research.google.com/github/e-lo/forecast cards/blob/master/forecastcards/notebooks/create\u forecastcards.ipynb)
添加新的观察值csv
2。通过运行"validate_project.py<;project_directory>;"来确认项目中的新数据符合数据架构,或者通过从该目录运行"validate_cardset.py"或"validate_project.py<;cardset_directory>;"`
我在[![估算分位数.ipynb笔记本](https://colab.research.google.com/assets/colab badge.svg)(https://colab.research.google.com/github/e-lo/forecastcards/blob/master/forecastcards/notebooks/estimate\quantiles.ipynb)
1.选择要使用的卡
2。清洁和合并卡
3。创建任何其他类别变量
4。执行回归
使预测卡公开可用
有三种可能的选项可用于使数据可用:
1。github(不适合非常大的数据集)
2.amazon s3/microsoft azure/google cloud(即将推出功能)
3.其他代理托管的Web服务(即Socrata、Web服务器等)
提交[Pull请求到ForecastCardsData存储库](https://github.com/e-lo/ForecastCardsData/Pulls)
2。提交[问题](https://github.com/e-lo/forecastcardsdata/issues)并链接到数据的位置以及在存储库中托管它的权限。
3。将公共数据存储设置为镜像。
获取帮助
请[提交问题!](https://github.com/e-lo/forecastcards/issues)
预测卡是一种简单的数据规范,用于存储有关旅行预测的关键信息,以便:
-评估预测随时间变化的性能,
-分析预测系统和机构随时间变化的总体性能,以及确定为高绩效预测贡献因素。
系统
-预测,即在关注点预测项目将做什么,
-观察,即用于评估预测的数据点
每个"卡"都是基于文本的csv文件。
forecast cards python库用于验证和组织符合forecastcards数据模式的
数据,它由四个主要类组成:
1。cardset:一组符合forecastcards数据模式的预测数据项目。数据集:将卡片集转换为[熊猫](https://pandas.pydata.org/)适合于估算目的的数据集
3。项目:验证单个项目(与cardset的许多功能相同)
4。架构:管理和验证数据架构
位置可以是
-描述github位置的字典,
-本地目录,或
-github网址。
gh-project={'username':'e-lo',
'repository':'forecastcards',
'branch':'master',
'subdir':'examples/ecdot-rx123-ybr_hov'}
ect的位置可以是
-描述github位置的字典,也可以是
-本地目录
gh-u data={'username':'e-lo',
'repository':'forecastcards',
'branch':'master',
'subdir':'examples'}
cardset walks th th浏览目录,查找项目,并根据正确的架构验证它们。
选择'u projects=['lu123'])
````
**数据集**
创建适合估计分位数回归的数据集。
`` python
r/>"subdir":"examples"}
cardset=forecastcards.cardset(data_loc=gh_data)
dataset=forecastcards.dataset(card_locs_by_type=cardset.card_locs_by_type,
file_to_project_id=cardset.file_to_project_id)
rame
dataset.df
```
[实体关系图](spec/en/forecast-cards-erd.png?raw=true"预测卡架构实体关系图")
![数据关系概述](spec/en/forecast-cards-rg.png?RAW ="预测卡数据关系"(
< BR/>预测卡)与[开放知识基金会]([无摩擦数据] ](HTTP://FrutsRealDATA.IO)[表模式](HTTPS://Github. COM/SouthSouthDATA/SPECs/Buff/Mask/Stss/Table Schema,MD)规范。使用[colaboratory]从您的Web浏览器获取的数据架构(https://colab.research.google.com):
[![在COLAB中打开](https://colab.research.google.com/assets/colab badge.svg)](https://colab.research.google.com/github/e-lo/forecastcards/blob/master/forecastcards/notebooks/explore_data_schemas.ipynb)
Erald City Dot对黄砖路的HOV扩展,包含在"ForecastCards/Examples/EmeraldCityDot-RX123-YellowBrickroadhov"中
此示例可与此目录的"笔记本"文件夹一起分析和运行,并可使用[Binder]或[Col]运行。中止(https://colab.research.google.com)。
[![在COLAB中打开](https://colab.research.google.com/assets/colab badge.svg)(https://colab.research.google.com/github/e-lo/forecastcards/blob/master/forecastcards/notebooks/estimate_quantiles.ipynb)
表格有效性状态:[![goodtables.io](https://goodtables.io/badge/github/e-lo/forecast cards.svg)](https://goodtables.io/github/e-lo/forecastcards)
以及文件夹结构:
b观察/
——观察结果-<;日期>;.csv
——预测/
——预测-<;方案ID>;-<;方案年份>;-<;预测创建>;-<;预测ID>;.csv
我如何开始自己的工作?
1.通过检查架构,确保您拥有所需的数据。
2。创建或格式化数据作为预测卡
-将数据输入浏览器并下载:[![在Colab中打开](https://colab.research.google.com/assets/colab badge.svg)](https://colab.research.google.com/github/e-lo/forecast cards/blob/master/forecastcards/notebooks/create\u forecastcards.ipynb)
-使用[csv模板](https://github.com/e-lo/forecastcards/tree/master/forecastcards/template/)并使用文本浏览器或电子表格应用程序输入数据
-使用[helper scripts on the way]转换现有数据(https://github.com/e-lo/forecastcards/issues/1)*
3。使用本地或托管远程服务器(即colaboratory)上的模板笔记本来清理数据和估计分位数回归。
在虚拟环境中(即[conda](https://conda.io/docs/)。
\,可以使用pip从本地克隆目录克隆此git存储库安装
:
`pip install--upgrade.`
日期。您可以使用以下命令覆盖默认编译器来成功安装它:
`cflags='-stdlib=libc++'pip-in暂停cchardet`
[在COLAB中打开](https://colab.research.google.com/assets/colab badge.svg)](https://colab.research.google.com/github/e-lo/forecast cards/blob/master/forecastcards/notebooks/create\u forecastcards.ipynb)
将文件夹从"forecastcards"包中的"template"文件夹复制到用于保存所有项目forecastcards的文件夹中。
2。根据模式重命名项目文件夹,注意不要复制分析范围内的任何项目id(通常是[ForecastCardData Store]的代理(https://github.com/e-lo/ForecastCardData))。
3。在确定或创建特定poi时,添加观测值、poi、预测运行和预测。
4。通过运行"validate_project.py"<;project_directory>;`确认新项目中的数据符合数据架构,或通过从该目录运行"validate_cardset.py"或"validate_project.py"<;cardset_directory>;`
ng project
在本地使用创建预测卡笔记本,或[![在colab中打开](https://colab.research.google.com/assets/colab badge.svg)](https://colab.research.google.com/github/e-lo/forecast cards/blob/master/forecastcards/notebooks/create\u forecastcards.ipynb)
添加一个新的预测csv文件,其中包含关注点
2的相关数据。在scenario csv文件中添加有关模型运行的条目
3。在poi csv文件中添加任何其他感兴趣的点
4。通过运行"validate_project.py"<;project_directory>;`确认项目中的新数据符合数据架构,或通过从该目录运行"validate_cardset.py"或"validate_project.py"<;cardset_directory>;`
ng project
在本地使用创建预测卡笔记本,或[![在Colab中打开](https://colab.research.google.com/assets/colab badge.svg)](https://colab.research.google.com/github/e-lo/forecast cards/blob/master/forecastcards/notebooks/create\u forecastcards.ipynb)
添加新的观察值csv
2。通过运行"validate_project.py<;project_directory>;"来确认项目中的新数据符合数据架构,或者通过从该目录运行"validate_cardset.py"或"validate_project.py<;cardset_directory>;"`
我在[![估算分位数.ipynb笔记本](https://colab.research.google.com/assets/colab badge.svg)(https://colab.research.google.com/github/e-lo/forecastcards/blob/master/forecastcards/notebooks/estimate\quantiles.ipynb)
1.选择要使用的卡
2。清洁和合并卡
3。创建任何其他类别变量
4。执行回归
使预测卡公开可用
有三种可能的选项可用于使数据可用:
1。github(不适合非常大的数据集)
2.amazon s3/microsoft azure/google cloud(即将推出功能)
3.其他代理托管的Web服务(即Socrata、Web服务器等)
提交[Pull请求到ForecastCardsData存储库](https://github.com/e-lo/ForecastCardsData/Pulls)
2。提交[问题](https://github.com/e-lo/forecastcardsdata/issues)并链接到数据的位置以及在存储库中托管它的权限。
3。将公共数据存储设置为镜像。
获取帮助
请[提交问题!](https://github.com/e-lo/forecastcards/issues)