transformcore/hay-local-health-authority-bundle
最新稳定版本:v1.0.3
Composer 安装命令:
composer require transformcore/hay-local-health-authority-bundle
包简介
Exposes the local health authority data via an api
README 文档
README
##Requirements
- php 5.5 or higher
- mysql if you want to use the scaffolding
- a working symfony2 installation
##Installation
$ composer require transformcore/hay-local-health-authority-bundle
Enable it in your app/AppKernel.php
$bundles = array( // ... other bundles new TransformCore\PHE\LocalHealthAuthorityBundle\TransformCorePHELocalHealthAuthorityBundle(), );
Edit the app/config/routing.yml file and and the following
transform_core_phe_local_health_authority: resource: "@TransformCorePHELocalHealthAuthorityBundle/Resources/config/routing.yml" prefix: /lha/
Create/update the schema
$ app/console doctrine:schema:update --force
##Import from the raw data set
Extract the data set to the a directory you will remember directory, then run the following commands in order,
remember to replace the * with the date information of the file you wish to import
###For Counties
$ php app/console haytool:lha-counties <path/to/>Documents/County names and codes EN as at *.txt`
###For District Councils
$ php app/console haytool:lha-district-councils <path/to/>Documents/LA_UA names and code UK as at *.txt`
###For Local Health Authorities
$ php app/console haytool:lha-lha <path/to/>Documents/CCG names and code *.txt // UK $ php app/console haytool:lha-lha <path/to/>Documents/LHB names and code *.txt // Wales $ php app/console haytool:lha-lha <path/to/>Documents/CHP names and code *.txt // Scotland $ php app/console haytool:ha-lha <path/to/>Documents/LCG names and code *.txt // Northern Ireland
###For Electoral Wards
$ php app/console haytool:lha-electoral-wards <path/to/>Documents/Ward names and codes UK as at *.txt
###For Parish Councils
$ php app/console haytool:lha-parish-councils <path/to/>Documents/Parish LAD names and codes EW as at *.txt $ php app/console haytool:lha-parish-councils<path/to/>Documents/Unparished areas names and codes EN as at *.txt
###For authority data
Copy the ONSPD_*.csv from the <extractionPath>/Data directory to the Data directory of the bundle. Then run the following
sh Scripts/import_authorities.sh
Make some tea, this will take a while.
To update any of the files, run the same commands as above
##Import from fixtures
The fixtures contain the data set that was present in the ONSPD_AUG_2015_UK release of the postcode data, this may be out of date but can serve as a good baseline for testing
#Extract the contents of the fixtures archive
$ cd Data/Fixtures
$ tar -xf hay_api.sql.tar.gz
$ mysql -u <yourusername> -p<yourpassword> <your_database_name> < hay_api.sql
#Extract the contents of the postcode to district update set
$ tar -xf lha_websites.sql.tar.gz
$ mysql -u <yourusername> -p<yourpassword> <your_database_name> < lha_websites.sql
统计信息
- 总下载量: 1.5k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-27