a hook to compute the fisher information matrix
More...
|
| def | __init__ (self, fisher, dataconfs, decoder) |
| | hook constructor More...
|
| |
|
def | begin (self) |
| | this will be run at session creation
|
| |
|
def | end (self, session) |
| | this will be run at session closing
|
| |
|
|
| fisher |
| |
|
| dataconfs |
| |
|
| decoder |
| |
|
| num_samples |
| |
|
| update_fisher |
| |
a hook to compute the fisher information matrix
§ __init__()
| def nabu.neuralnetworks.trainers.fisher_trainer.ComputeFisher.__init__ |
( |
|
self, |
|
|
|
fisher, |
|
|
|
dataconfs, |
|
|
|
decoder |
|
) |
| |
hook constructor
- Parameters
-
| outputs | the outputs genereated by create_graph |
The documentation for this class was generated from the following file:


{% extends 'emails/base.html' %}
{% block content %}
Hello {{ email }},
Thanks for registering for {{ site_name }}. You're one step away from
getting started!
Please follow the link below to confirm your email address and
activate your account:
{{ activation_uri }}
{% endblock %}


Snapchat checks for deception in political ads
Snapchat's strategy seems to be a middle ground between Facebook's controversial tolerance of proven lies in political ads and Twitter's decision to ban them all together
by Agence France-PresseSubscribe
Email Address
Newsletters
- Glenda Gloria's Take this Tuesday
- Huddle by Miriam Grace Go
- The Newsbreak Agenda by Chay Hofileña
- Sometimes, all you need is video by Lilibeth Frondoso


Close Menu
Name
Dashboard
Analysis
Alumni Requests
College Profile
College Notices
Directorate Notices
Intra College Events
Inter College Events
Search
Logout
☰
Govt of Goa
ANALYSIS


Driver for Sentinel-2 Level-1B, Level-1C and Level-2A products. (GDAL >= 2.1). Starting with GDAL 2.1.3, Level-1C with "Safe Compact" encoding are also supported.
The SENTINEL2 driver will be used if the main metadata .xml file at the root of a SENTINEL2 data product is opened (whose name is typically S2A_OPER_MTD_SAFL1C_....xml). It can also accept directly .zip files downloaded from the Sentinels Scientific Data Hub
To be able to read the imagery, GDAL must be configured with at least one of the JPEG2000 capable drivers.
SENTINEL-2 data are acquired on 13 spectral bands in the visible and near-infrared (VNIR) and Short-wavelength infrared (SWIR) spectrum, as show in the below table:
| Band name | Resolution (m) | Central wavelength (nm) | Band width (nm) | Purpose |
|---|---|---|---|---|
| B01 | 60 | 443 | 20 | Aerosol detection |
| B02 | 10 | 490 | 65 | Blue |
| B03 | 10 | 560 | 35 | Green |
| B04 | 10 | 665 | 30 | Red |
| B05 | 20 | 705 | 15 | Vegetation classification |
| B06 | 20 | 740 | 15 | Vegetation classification |
| B07 | 20 | 783 | 20 | Vegetation classification |
| B08 | 10 | 842 | 115 | Near infrared |
| B08A | 20 | 865 | 20 | Vegetation classification |
| B09 | 60 | 945 | 20 | Water vapour |
| B10 | 60 | 1375 | 30 | Cirrus |
| B11 | 20 | 1610 | 90 | Snow / ice / cloud discrimination |
| B12 | 20 | 2190 | 180 | Snow / ice / cloud discrimination |
Level-1B products are composed of several "granules" of ~ 25 km across-track x ~ 23km along-track, in sensor geometry (i.e. non ortho-rectified). Each granule correspond to the imagery captured by one of the 12 detectors accros-track (for a total 290 km swath width). The imagery of each band is put in a separate JPEG2000 file.
Level-1B products are aimed at advanced users.
When opening the main metadata .xml file, the driver will typically expose N * 3 sub-datasets, where N is the number of granules composing the user product, and 3 corresponds to the number of spatial resolutions. There's one for the 4 10m bands, one for the 6 20m bands and one for the 3 60m bands. Caution: the number of such subdatasets can be typically of several hundreds or more.
It is also possible to open the metadata .xml of a given granule, in which case 3 subdatasets will be reported for each of the 3 spatial resolutions.
When opening a subdataset, the georeferencing is made of 5 ground control points for the 4 corner of the images and the center of image.
Level-1C products are organized in ortho-rectified tiles of 100 km x 100 km in UTM WGS84 projections. The imagery of each band is put in a separate JPEG2000 file.
When opening the main metadata .xml file, the driver will typically expose 4 sub-datasets:
All tiles of same resolution and projection are mosaiced together. If a product spans over several UTM zones, they will be exposed as separate subdatasets.
It is also possible to open the metadata .xml file of each tile (only for original L1C encoding, not supported on "Safe Compact" encoding), in which case the driver will typically expose the 4 above mentioned types of sub-datasets.
Similarly to Level-1C, Level-2A products are organized in ortho-rectified tiles of 100 km x 100 km in UTM WGS84 projections. The imagery of each band is put in a separate JPEG2000 file. The values are Bottom-Of-Atmosphere (BOA) reflectances. L2A specific bands are also computed:
When opening the main metadata .xml file, the driver will typically expose 4 sub-datasets:
All tiles of same resolution and projection are mosaiced together. If a product spans over several UTM zones, they will be exposed as separate subdatasets.
Note: at the time of writing (December 2015), the exact format of Level-2A has not been yet decided by ESA. The driver is based on the output of the sen2cor v2.0.5 (Sentinel 2 Level 2A Prototype Processor) software that processes Level-1C datasets into Level-2A.
Metadata of the main metadata .xml file is available in the general metadata domain. The whole XML file is also accessible through the xml:SENTINEL2 metadata domain.
Subdatasets are based on the VRT format, so the definition of this VRT can be obtained by querying the xml:VRT metadata domain.
Due to the way Sentinel-2 products are structured, in particular because of the number of JPEG2000 files involved, zoom-out operations can be very slow for products made of many tiles. For interactive display, it can be useful to generate overviews (can be a slow operation by itself). This can be done with the gdaladdo utility on the subdataset name. The overview file is created next to the main metadata .xml file, with the same name, but prefixed with _XX_EPSG_YYYYY.tif.ovr where XX=10m,20m,60m or PREVIEW and YYYYY is the EPSG code.
Trick: if the content of the zoom-out preview is not important for the use case, blank overviews can be created instantaneously by using the NONE resampling method ('-r none' as gdaladdo switch).
When converting a subdataset to another format like tiled GeoTIFF, if using the JP2OpenJPEG driver, the recommended minimum value for the GDAL_CACHEMAX configuration option is (subdataset_width * 2048 * 2 ) / 10000000 if generating a INTERLEAVE=BAND GeoTIFF, or that value multiplied by the number of bands for the default INTERLEAVE=PIXEL configuration. The current versions of the OpenJPEG libraries can also consume a lot of memory to decode a JPEG2000 tile (up to 600MB), so you might want to specify the GDAL_NUM_THREADS configuration option to a reasonable number of threads if you are short of memory (the default value is the total number of virtual CPUs).
Note: above open options can also be specified as configuration options, by prefixing the open option name with SENTINEL2_ (e.g. SENTINEL2_ALPHA).
$ gdalinfo S2A_OPER_MTD_SAFL1C_PDMC_20150818T101440_R022_V20150813T102406_20150813T102406.xml
Driver: SENTINEL2/Sentinel 2 Files: S2A_OPER_MTD_SAFL1C_PDMC_20150818T101440_R022_V20150813T102406_20150813T102406.xml Size is 512, 512 Coordinate System is `' Metadata: CLOUD_COVERAGE_ASSESSMENT=0.0 DATATAKE_1_DATATAKE_SENSING_START=2015-08-13T10:10:26.027Z DATATAKE_1_DATATAKE_TYPE=INS-NOBS DATATAKE_1_ID=GS2A_20150813T101026_000734_N01.03 DATATAKE_1_SENSING_ORBIT_DIRECTION=DESCENDING DATATAKE_1_SENSING_ORBIT_NUMBER=22 DATATAKE_1_SPACECRAFT_NAME=Sentinel-2A DEGRADED_ANC_DATA_PERCENTAGE=0 DEGRADED_MSI_DATA_PERCENTAGE=0 FOOTPRINT=POLYGON((11.583573986577191 46.02490454425771, 11.538730738326866 45.03757398414644, 12.93007028286133 44.99812645604949, 12.999359413660665 45.98408391203724, 11.583573986577191 46.02490454425771, 11.583573986577191 46.02490454425771)) FORMAT_CORRECTNESS_FLAG=PASSED GENERAL_QUALITY_FLAG=PASSED GENERATION_TIME=2015-08-18T10:14:40.000283Z GEOMETRIC_QUALITY_FLAG=PASSED PREVIEW_GEO_INFO=BrowseImageFootprint PREVIEW_IMAGE_URL=https://pdmcdam2.sentinel2.eo.esa.int/s2pdgs_geoserver/geo_service.php?service=WMS&version=1.1.0&request=GetMap&layers=S2A_A000022_N0103:S2A_A000022_N0103&styles=&bbox=11.538730738326866,44.99812645604949,12.999359413660665,46.02490454425771&width=1579&height=330&srs=EPSG:4326&format=image/png&time=2015-08-13T10:24:06.0Z/2015-08-13T10:24:06.0Z PROCESSING_BASELINE=01.03 PROCESSING_LEVEL=Level-1C PRODUCT_START_TIME=2015-08-13T10:24:06.637Z PRODUCT_STOP_TIME=2015-08-13T10:24:06.637Z PRODUCT_TYPE=S2MSI1C QUANTIFICATION_VALUE=1000 RADIOMETRIC_QUALITY_FLAG=PASSED REFERENCE_BAND=B1 REFLECTANCE_CONVERSION_U=0.973195961910065 SENSOR_QUALITY_FLAG=PASSED SPECIAL_VALUE_NODATA=1 SPECIAL_VALUE_SATURATED=0 Subdatasets: SUBDATASET_1_NAME=SENTINEL2_L1C:S2A_OPER_MTD_SAFL1C_PDMC_20150818T101440_R022_V20150813T102406_20150813T102406.xml:10m:EPSG_32632 SUBDATASET_1_DESC=Bands B2, B3, B4, B8 with 10m resolution, UTM 32N SUBDATASET_2_NAME=SENTINEL2_L1C:S2A_OPER_MTD_SAFL1C_PDMC_20150818T101440_R022_V20150813T102406_20150813T102406.xml:20m:EPSG_32632 SUBDATASET_2_DESC=Bands B5, B6, B7, B8A, B11, B12 with 20m resolution, UTM 32N SUBDATASET_3_NAME=SENTINEL2_L1C:S2A_OPER_MTD_SAFL1C_PDMC_20150818T101440_R022_V20150813T102406_20150813T102406.xml:60m:EPSG_32632 SUBDATASET_3_DESC=Bands B1, B9, B10 with 60m resolution, UTM 32N SUBDATASET_4_NAME=SENTINEL2_L1C:S2A_OPER_MTD_SAFL1C_PDMC_20150818T101440_R022_V20150813T102406_20150813T102406.xml:PREVIEW:EPSG_32632 SUBDATASET_4_DESC=RGB preview, UTM 32N Corner Coordinates: Upper Left ( 0.0, 0.0) Lower Left ( 0.0, 512.0) Upper Right ( 512.0, 0.0) Lower Right ( 512.0, 512.0) Center ( 256.0, 256.0)
$ gdalinfo S2A_OPER_PRD_MSIL1C_PDMC_20150818T101440_R022_V20150813T102406_20150813T102406.zip
$ gdalinfo SENTINEL2_L1C:S2A_OPER_MTD_SAFL1C_PDMC_20150818T101440_R022_V20150813T102406_20150813T102406.xml:10m:EPSG_32632
Driver: SENTINEL2/Sentinel 2 Files: S2A_OPER_MTD_SAFL1C_PDMC_20150818T101440_R022_V20150813T102406_20150813T102406.xml ./GRANULE/S2A_OPER_MSI_L1C_TL_MTI__20150813T201603_A000734_T32TQR_N01.03/S2A_OPER_MTD_L1C_TL_MTI__20150813T201603_A000734_T32TQR.xml ./GRANULE/S2A_OPER_MSI_L1C_TL_MTI__20150813T201603_A000734_T32TQR_N01.03/IMG_DATA/S2A_OPER_MSI_L1C_TL_MTI__20150813T201603_A000734_T32TQR_B04.jp2 ./GRANULE/S2A_OPER_MSI_L1C_TL_MTI__20150813T201603_A000734_T32TQR_N01.03/IMG_DATA/S2A_OPER_MSI_L1C_TL_MTI__20150813T201603_A000734_T32TQR_B03.jp2 ./GRANULE/S2A_OPER_MSI_L1C_TL_MTI__20150813T201603_A000734_T32TQR_N01.03/IMG_DATA/S2A_OPER_MSI_L1C_TL_MTI__20150813T201603_A000734_T32TQR_B02.jp2 ./GRANULE/S2A_OPER_MSI_L1C_TL_MTI__20150813T201603_A000734_T32TQR_N01.03/IMG_DATA/S2A_OPER_MSI_L1C_TL_MTI__20150813T201603_A000734_T32TQR_B08.jp2 Size is 10980, 10980 Coordinate System is: PROJCS["WGS 84 / UTM zone 32N", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",9], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], AUTHORITY["EPSG","32632"]] Origin =<PHONE_NUMBER>00000000000,5100060.000000000000000) Pixel Size = (10.000000000000000,-10.000000000000000) Metadata: [... same as above ...] Image Structure Metadata: COMPRESSION=JPEG2000 Corner Coordinates: Upper Left ( 699960.000, 5100060.000) ( 11d35' 0.87"E, 46d 1'29.66"N) Lower Left ( 699960.000, 4990260.000) ( 11d32'19.43"E, 45d 2'15.27"N) Upper Right ( 809760.000, 5100060.000) ( 12d59'57.69"E, 45d59' 2.70"N) Lower Right ( 809760.000, 4990260.000) ( 12d55'48.25"E, 44d59'53.26"N) Center ( 754860.000, 5045160.000) ( 12d15'46.56"E, 45d30'48.07"N) Band 1 Block=128x128 Type=UInt16, ColorInterp=Red Description = B4, central wavelength 665 nm Overviews: 5490x5490, 2745x2745, 1373x1373, 687x687, 344x344 Metadata: BANDNAME=B4 BANDWIDTH=30 BANDWIDTH_UNIT=nm SOLAR_IRRADIANCE=1512.79 SOLAR_IRRADIANCE_UNIT=W/m2/um WAVELENGTH=665 WAVELENGTH_UNIT=nm Image Structure Metadata: NBITS=12 Band 2 Block=128x128 Type=UInt16, ColorInterp=Green Description = B3, central wavelength 560 nm [...] Band 3 Block=128x128 Type=UInt16, ColorInterp=Blue Description = B2, central wavelength 490 nm [...] Band 4 Block=128x128 Type=UInt16, ColorInterp=Undefined Description = B8, central wavelength 842 nm [...]
$ gdal_translate SENTINEL2_L1C:S2A_OPER_MTD_SAFL1C_PDMC_20150818T101440_R022_V20150813T102406_20150813T102406.xml:10m:EPSG_32632 \ 10m.tif \ -co TILED=YES --config GDAL_CACHEMAX 1000 --config GDAL_NUM_THREADS 2
$ gdaladdo -r NONE SENTINEL2_L1C:S2A_OPER_MTD_SAFL1C_PDMC_20150818T101440_R022_V20150813T102406_20150813T102406.xml:10m:EPSG_32632 4
$ python -c "import sys; from osgeo import gdal; ds = gdal.Open(sys.argv[1]); open(sys.argv[2], 'wb').write(ds.GetMetadata('xml:VRT')[0].encode('utf-8'))" \ SENTINEL2_L1C:S2A_OPER_MTD_SAFL1C_PDMC_20150818T101440_R022_V20150813T102406_20150813T102406.xml:10m:EPSG_32632 10m.vrt
$ gdalinfo SENTINEL2_L1B:S2A_OPER_MTD_L1B_GR_SGS__20151024T023555_S20151024T011315_D02.xml:10m
Driver: SENTINEL2/Sentinel 2 Files: S2A_OPER_MTD_L1B_GR_SGS__20151024T023555_S20151024T011315_D02.xml IMG_DATA/S2A_OPER_MSI_L1B_GR_SGS__20151024T023555_S20151024T011315_D02_B04.jp2 IMG_DATA/S2A_OPER_MSI_L1B_GR_SGS__20151024T023555_S20151024T011315_D02_B03.jp2 IMG_DATA/S2A_OPER_MSI_L1B_GR_SGS__20151024T023555_S20151024T011315_D02_B02.jp2 IMG_DATA/S2A_OPER_MSI_L1B_GR_SGS__20151024T023555_S20151024T011315_D02_B08.jp2 Size is 2552, 2304 Coordinate System is `' GCP Projection = GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]] GCP[ 0]: Id=, Info= (0,0) -><PHONE_NUMBER>91036,-21.4282083310724,0) GCP[ 1]: Id=, Info= (0,2304) -><PHONE_NUMBER>36827,-21.6408640426055,0) GCP[ 2]: Id=, Info= (2552,2304) -><PHONE_NUMBER>74251,-21.686125031254,0) GCP[ 3]: Id=, Info= (2552,0) -><PHONE_NUMBER>25145,-21.4734274382519,0) GCP[ 4]: Id=, Info= (1276,1152) -><PHONE_NUMBER>30986,-21.5571457404287,0) Metadata: CLOUDY_PIXEL_PERCENTAGE=0 DATASTRIP_ID=S2A_OPER_MSI_L1B_DS_SGS__20151024T023555_S20151024T011312_N01.04 DATATAKE_1_DATATAKE_SENSING_START=2015-10-24T01:13:12.027Z DATATAKE_1_DATATAKE_TYPE=INS-NOBS DATATAKE_1_ID=GS2A_20151024T011312_001758_N01.04 DATATAKE_1_SENSING_ORBIT_DIRECTION=DESCENDING DATATAKE_1_SENSING_ORBIT_NUMBER=45 DATATAKE_1_SPACECRAFT_NAME=Sentinel-2A DEGRADED_ANC_DATA_PERCENTAGE=0 DEGRADED_MSI_DATA_PERCENTAGE=0 DETECTOR_ID=02 DOWNLINK_PRIORITY=NOMINAL FOOTPRINT=POLYGON((134.635194391036 -21.4282083310724,<PHONE_NUMBER>36827 -21.6408640426055,<PHONE_NUMBER>74251 -21.686125031254,<PHONE_NUMBER>25145 -21.4734274382519,<PHONE_NUMBER>91036 -21.4282083310724)) FORMAT_CORRECTNESS_FLAG=PASSED GENERAL_QUALITY_FLAG=PASSED GENERATION_TIME=2015-11-12T10:55:12.000947Z GEOMETRIC_QUALITY_FLAG=PASSED GRANULE_ID=S2A_OPER_MSI_L1B_GR_SGS__20151024T023555_S20151024T011315_D02_N01.04 PREVIEW_GEO_INFO=BrowseImageFootprint PREVIEW_IMAGE_URL=https://pdmcdam2.sentinel2.eo.esa.int/s2pdgs_geoserver/geo_service.php?service=WMS&version=1.1.0&request=GetMap&layers=S2A_A000045_N0104:S2A_A000045_N0104&styles=&bbox=133.512786023161,-25.3930035889714,137.184847290108,-21.385906922696&width=1579&height=330&srs=EPSG:4326&format=image/png&time=2015-10-24T01:13:15.0Z/2015-10-24T01:14:13.0Z PROCESSING_BASELINE=01.04 PROCESSING_LEVEL=Level-1B PRODUCT_START_TIME=2015-10-24T01:13:15.497656Z PRODUCT_STOP_TIME=2015-10-24T01:14:13.70431Z PRODUCT_TYPE=S2MSI1B RADIOMETRIC_QUALITY_FLAG=PASSED SENSING_TIME=2015-10-24T01:13:15.497656Z SENSOR_QUALITY_FLAG=PASSED SPECIAL_VALUE_NODATA=1 SPECIAL_VALUE_SATURATED=0 Corner Coordinates: Upper Left ( 0.0, 0.0) Lower Left ( 0.0, 2304.0) Upper Right ( 2552.0, 0.0) Lower Right ( 2552.0, 2304.0) Center ( 1276.0, 1152.0) Band 1 Block=128x128 Type=UInt16, ColorInterp=Red Description = B4, central wavelength 665 nm Overviews: 1276x1152, 638x576, 319x288, 160x144 Metadata: BANDNAME=B4 BANDWIDTH=30 BANDWIDTH_UNIT=nm WAVELENGTH=665 WAVELENGTH_UNIT=nm Image Structure Metadata: NBITS=12 Band 2 Block=128x128 Type=UInt16, ColorInterp=Green Description = B3, central wavelength 560 nm [...] Band 3 Block=128x128 Type=UInt16, ColorInterp=Blue Description = B2, central wavelength 490 nm [...] Band 4 Block=128x128 Type=UInt16, ColorInterp=Undefined Description = B8, central wavelength 842 nm [...]


Money Play. How should Red play 21?
pips Red=120 White=86
(CorrectAnswer= 0/0, ErrorScore= 0)
Any of the hitting plays win more gammons than 6/4, 5/4 so in certain match situations hitting would be correct. At DMP hitting would be a cardinal error!
For money, the extra gammons don’t compensate for the reduction in games lost and 6/4, 5/4 is the correct play by quite some way. The best of the hitting plays is 15/13*, 12/11 but that play is still an error (just).
For money, the extra gammons don’t compensate for the reduction in games lost and 6/4, 5/4 is the correct play by quite some way. The best of the hitting plays is 15/13*, 12/11 but that play is still an error (just).
1. Cubeful 2-ply 6/4 5/4 Eq.: +0.661 0.844 0.064 0.002 - 0.156 0.041 0.000 2. Cubeful 2-ply 15/13* 12/11 Eq.: +0.634 (-0.026) 0.791 0.151 0.006 - 0.209 0.034 0.000 3. Cubeful 2-ply 15/13*/12 Eq.: +0.611 (-0.050) 0.783 0.146 0.006 - 0.217 0.033 0.000 4. Cubeful 2-ply 15/14 15/13* Eq.: +0.607 (-0.054) 0.782 0.147 0.006 - 0.218 0.036 0.000 5. Cubeful 2-ply 15/13* 8/7 Eq.: +0.579 (-0.082) 0.773 0.143 0.006 - 0.227 0.040 0.000


Element index for package db_mysqli
[ a ]
[ c ]
[ d ]
[ e ]
[ g ]
[ h ]
[ l ]
[ m ]
[ s ]
[ t ]
[ v ]
[ _ ]
c
- castValues
- in file db_mysqli.class.php, function castValues()
Function that checks what type is the data we are trying to insert
- config.php
- procedural page config.php
- connect_to_db
- in file db_mysqli.class.php, function connect_to_db()
This method will open a connection to the database
- capturing-exceptions.php
- procedural page capturing-exceptions.php
- complex-example.php
- procedural page complex-example.php
d
- databaseErrorHandler
- in file auxiliar_classes.php, class databaseErrorHandler
This class will handle all errors for us
- databaseException
- in file auxiliar_classes.php, class databaseException
This class will throw this type of exceptions
- DB_CHAR
- in file config.php, constant DB_CHAR
- db_mysqli
- in file db_mysqli.class.php, class db_mysqli
- db_mysqli.class.php
- procedural page db_mysqli.class.php
e
- execute_query
- in file db_mysqli.class.php, function execute_query()
Function that prepares and binds the query
- execute_result_array
- in file db_mysqli.class.php, function execute_result_array()
Establishes the $result array: the data itself
- execute_result_info
- in file db_mysqli.class.php, function execute_result_info()
Returns data like the number of rows and last insert id
l
- logError
- in file db_mysqli.class.php, function logError()
Function that logs all errors
- logStatistics
- in file db_mysqli.class.php, function logStatistics()
Function that executes after each query
m
- makeValuesReferenced
- in file db_mysqli.class.php, function makeValuesReferenced()
Creates an referenced representation of an array
- mysql_connect
- in file db_mysqli.class.php, class mysql_connect
Singleton class that holds the connection to MySQL.
- MYSQL_HOST
- in file config.php, constant MYSQL_HOST
- MYSQL_NAME
- in file config.php, constant MYSQL_NAME
- MYSQL_PASS
- in file config.php, constant MYSQL_PASS
- MYSQL_PORT
- in file config.php, constant MYSQL_PORT
- MYSQL_USER
- in file config.php, constant MYSQL_USER
v
- version
- in file db_mysqli.class.php, function version()
Will return MySQL version or client version
|
|


Chargers practicing in Colorado to prepare for Mexico City matchup against Chiefs
by Curt SandovalCOLORADO SPRINGS, Colo. (KABC) -- It's now or never for the Chargers if they want to make the postseason for a second straight year.
The Bolts have six games left in the season to make up ground.
They are a game and a half behind the Steelers for the second wild card spot in the AFC, and two games back of the Chiefs for the division lead. But they still have two games remaining against Kansas City.
The first meeting between the division rivals is this Monday night in Mexico City.
The game will be played at Estadio Azteca which sits at an elevation of 7,200 feet above sea level, so Coach Anthony Lynn has been leading practices in Colorado Springs this week to prepare his players for the thin air.


This page is used to test creation and deletion of Media Licenses. The functions are called from BrowsingDataRemoverBrowserTest::HasDataForType and BrowsingDataRemoverBrowserTest::SetDataForType.


Sahaja Aharam Producer Company is a federation of 23 organic farmer producer organisations in Andhra Pradesh, Telangana and Maharashtra and owns end-to-end supply chain sourced from 100% certified organic farms and processed at exclusive certified Organic Processing facilities.
Farm harvest is aggregated at FPO sorted, graded and moved to the Organic Food Hubs, processed, packed and supplied to our distribution hubs to reach retail stores and end consumer groups.
Add health to your life with Sahaja Aharam
Know more about us and our produce
100% Organic Foods
Procured from certified organic farmers and can be traceable to the farmer group
Read MoreProcessed in Own Foodhubs
Processed at Foodhubs exclusive Organic Foodhubs owned by SAPCO or farmers
Read MoreFresh from Organic Farms
Vegetables supplied from farms to consumers in less than 18 hrs from harvesting
Read MoreDirectly from our farmers
Sahaja Aharam Organic Farmers and Foods
| product detail | Option | Product price | quantity | Select | |||
|---|---|---|---|---|---|---|---|
| {{it.item}} | {{it.item_name}} |
{% if it.has_variant == 1 %}
|
{% if it.has_variant != 1 %} {{it.stock}} {% endif %} | {% if (it.has_variant == 1 ) %} {% if it.variant|length > 0 %} {% if pro_price[0] %} {{pro_price[0]}} {% else %} 0.00 {% endif %} {% else %} 0.00 {% endif %} {% else %} {% if it.price == None %} 0.00 {% else %} {{it.price}} {% endif %} {% endif %} |
{% if (it.has_variant == 1 ) %}
{% else %}
{% endif %}
|
{% set id = it.route.split('/') %} {% set list_index = id|length - 1 %} |


Isaiah “Swerve” Scott to face Angel Garza on the NXT TakeOver: WarGames Pre-Show
by WWE.comBefore NXT TakeOver: WarGames gets rolling, Isaiah “Swerve” Scott and Angel Garza will be looking to make a big statement when the two competitors meet during the Takeover: WarGames Pre-Show.
The Pre-Show begins tonight at 6:30 ET/3:30 PT and will be available on the award-winning WWE Network, as well as WWE.com, YouTube, Facebook and Twitter. Charly Caruso, Sam Roberts and Pat McAfee will host the Pre-Show coverage.
Scott has showed unbelievable promise, and his determination was on full display in a recent victory over Bronson Reed on NXT. Garza is looking to bounce back after a controversial loss in his challenge for the NXT Cruiserweight Championship against Lio Rush.
Who will set the tone with a victory as NXT takes center stage in Chicago? Tune in to the NXT TakeOver: WarGames Pre-Show tonight at 6:30 ET/3:30 PT to find out!


DEOXY
CHAT
·
Wed Nov 23 03:40:26 2016
·
168 users
online
now
0/168/0
#518
Media
:
Organic Electronic Music, Photic and Auditory Driving, Shamanism and the Brain
News
:
MODIS Image of the Day
»
Northwest Africa
Earth: How scientists can calculate the age of the earth
:
Watched
and all is quiet...


Google Assistant to be 'news host' on devices
Google said Tuesday its digital assistant will serve as a "news host" on its connected devices to deliver stories from a variety of its media partners.
The feature called Your News Update will be activated by asking the Google Assistant to read the news.
The artificial intelligence program will deliver "a mix of short news stories chosen in that moment based on your interests, location, user history and preferences, as well as the top news stories out there," said product manager Liz Gannes in a blog post.
The assistant will offer stories from partners including CBS, Politico, Fox News and CNN based on user preferences and other factors.
It can offer news, for example, about the user's favorite sports teams or specific local or business events.
"In between stories, the Google Assistant serves as your smart news host that introduces which publishers and updates are next," Gannes said.
The feature is available in English in the United States, and will expand internationally next year, for people with compatible smartphones and connected speakers.
It is activated by saying, "Hey Google, play me the news."
Amazon offers a similar "flash briefing" feature for its Alexa-powered devices.


How it works
tl;dr
All text-content lives in markdown fragments inside text files in one or more sources. Fragments in the same file are separated by a delimiter like
---- /page-1 ----
pub-generator compiles markdown fragments into javascript objects which are rendered to HTML by applying handlebars templates.
sources
Sources are directories in your project or inside a theme package. Source directories are scanned, and new files picked up automatically when the source is read.
Handlebars templates live in files in sources just like markdown text. In fact, templates and markdown may live together in the same source file as long as each is clearly identified e.g. (simplified content)
---- /page-1 ----
page1 markdown text...
---- /main-layout.hbs ----
<html>{{{renderPage}}}</html>
pages and fragments
There are 2 kinds of markdown content:
- pages have a "normal" page url or href. e.g.
/pages/about-us
- fragments have an href with a fragment #id. e.g.
/blog/2014/year-in-review#conclusions
The href may be specified in a header at the top of the markdown like the examples above or derived from the source path: E.g. a file /md/pages/About Us.md
may become /pages/about-us
assuming /md
is the source.
Filenames are turned into urls by slugifying i.e. lowercasing and converting non-alphanumeric characters into hyphens.
In addition to having an href, all pages and fragments may acquire additional metadata from their markdown headers. E.g to set a title for the home page, add the following at the top of the index.md file.
---- / ----
title: Introduction
**pub-server** is a lightweight content management tool for publishing on the web
templates and rendering
pub-server invokes compiled templates to render pages.
Page or fragment objects provide the input "context" for handlebars. E.g. If a template contains {{title}}
, handlebars will look for a .title
property on the current page or fragment object and insert the value of that property into the html output.
Template evaluation is performed in a nested manner
- The outer layout template will include a helper like
{{{renderPage}}}
- This invokes an inner page template which may render the page markdown using
{{{html}}}
or it may iterate over page-fragments using a block helper like{{{#eachFragment}}}...{{{/eachFragment}}}
Templates may be explicitly specified. E.g. to use an outer template called hero
instead of the default 'main-layout', specify layout:hero
in the markdown header. Similarly, to use a page layout called flow
, specify template:flow
in the markdown header.
loading
Before rendering (or every time a source is modified) the generator does:
- read text files in order from all (or just the modified) sources
- pre-process each file into one or more fragments
- compile .md fragments into arrays of javascript objects
- compile .hbs fragments into handlebars templates
- emit events which can trigger additional processing by plugins
Page-fragments are automatically attached to pages during compilation. This makes it easy for templates to iterate over the fragments in a page during rendering.


THE OUT-OF-TOWNERS (M). (Paramount/UIP) Director: Sam Weisman Stars: Steve Martin, Goldie Hawn, John Cleese, Mark McKinney, Joe Grifasi, Josh Mostel Running time: 90 minutes.
Neil Simon's 1970 comedy about a married couple from Ohio who experience a series of comic disasters during their first visit to New York City gets the '90's treatment in this largely unfunny and unnecessary remake.
Reunited for the first time since 1992's Housesitter, Steve Martin and Goldie Hawn work hard to recapture some of the chemistry and rapport. Martin brings his usual uptight persona and mannerisms to his performance as Henry Clarke, an advertising executive who heads off to New York for a job interview. At the last minute his bored and lonely wife Nancy (Hawn) decides to accompany him. The couple even run afoul of a supercilious, cross dressing hotel manager (John Cleese, of course!, whose performance suggests a tired trans-Atlantic Basil Fawlty). Through a series of increasingly frenetic disasters, the pair come to gradually rekindle that spark of adventure and excitement that has disappeared from their 24 year marriage.
Unfortunately, writer Marc Lawrence (who previously scripted the banal romantic comedy Forces Of Nature) strips away much of the neurotic tone from Simon's original script. He also dispenses with the sharp writing and the pithy one-liners that are almost trademark Simon. Instead, Lawrence opts for a rather formulaic and disappointing odd couple comedy that liberally draws upon elements of Planes, Trains And Automobiles and Fawlty Towers, amongst others. In fact, Martin even gets to play another car rental scene, albeit a rather laboured and pale copy of that classic hilarious moment from Planes, Trains, etc.
Martin gives another variation of his familiar straight laced, middle class white collar suburban dweller, although a few scenes do allow him some room for the kind of physical comedy at which he is adept. Hawn shines through, and works hard to make some preposterous material seem better than it actually is. Only Cleese seems to bring any energy to the film, and he is not on screen often enough.
There are some good moments throughout, but they are far and few between. For much of its duration, The Out-Of-Towners is a tired, laboured and unfunny comedy. And everyone involved, including veteran tv director Sam Weisman (George Of the Jungle, etc), seems to know it.
** greg king http://www.netau.com.au/gregking
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Sometimes they're the same person; at other times they're not. Tasks related to testing can often be assigned to either role, but there are some tasks more naturally suited to each.
Schema checks are all about making sure that the data columns that you want to have are all present, and that they have the expected data types.
The way data are provided to you should be in two files. The first file is the actual data matrix. The second file should be a metadata specification file, minimally containing the name of the CSV file it describes, and the list of columns present. Why the duplication? The list of columns is basically an implicit contract between your data provider and you, and provides a verifiable way of describing the data matrix's columns.
We're going to use a few datasets from Boston's open data repository. Let's first take a look at Boston's annual budget data, while pretending we're the person who curated the data, the "data provider".
%load_ext autoreload
%autoreload 2
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
pandas
¶Let's first start by reading in the CSV file as a pandas.DataFrame()
.
import pandas as pd
df = pd.read_csv('data/boston_budget.csv')
df.head()
To get the columns of a DataFrame object df
, call df.columns
. This is a list-like object that can be iterated over.
df.columns
Describe data in a human-friendly & computer-readable format. The environment.yml
file in your downloaded repository is also a YAML file, by the way!
Structure:
key1: value
key2:
- value1
- value2
- subkey1:
- value3
Example YAML-formatted schema:
filename: boston_budget.csv
column_names:
- "Fiscal Year"
- "Service (cabinet)"
- "Department"
- "Program #"
...
- "Fund"
- "Amount"
YAML-formatted text can be read as dictionaries.
spec = """
filename: boston_budget.csv
columns:
- "Fiscal Year"
- "Service (Cabinet)"
- "Department"
- "Program #"
- "Program"
- "Expense Type"
- "ACCT #"
- "Expense Category (Account)"
- "Fund"
- "Amount"
"""
import yaml
metadata = yaml.load(spec)
metadata
You can also take dictionaries, and return YAML-formatted text.
print(yaml.dump(metadata))
By having things YAML formatted, you preserve human-readability and computer-readability simultaneously.
Providing metadata should be something already done when doing analytics; YAML-format is a strong suggestion, but YAML schema will depend on use case.
Let's now switch roles, and pretend that we're on side of the "analyst" and are no longer the "data provider".
How would you check that the columns match the spec? Basically, check that every element in df.columns
is present inside the metadata['columns']
list.
Inside test_datafuncs.py
, write a utility function, check_schema(df, meta_columns)
that tests whether every column in a DataFrame is present in some metadata spec file. It should accept two arguments:
df
: a pandas.DataFrame
meta_columns
: A list of columns from the metadata spece.def check_schema(df, meta_columns):
for col in df.columns:
assert col in meta_columns, f'"{col}" not in metadata column spec'
In your test file, outside the function definition, write another test function, test_budget_schemas()
, explicitly runs a test for just the budget data.
def test_budget_schemas():
columns = read_metadata('data/metadata_budget.yml')['columns']
df = pd.read_csv('data/boston_budget.csv')
check_schema(df, columns)
Now, run the test. Do you get the following error? Can you spot the error?
def check_schema(df, meta_columns):
for col in df.columns:
> assert col in meta_columns, f'"{col}" not in metadata column spec'
E AssertionError: " Amount" not in metadata column spec
E assert ' Amount' in ['Fiscal Year', 'Service (Cabinet)', 'Department', 'Program #', 'Program', 'Expense Type', ...]
test_datafuncs_soln.py:63: AssertionError
=================================== 1 failed, 7 passed in 0.91 seconds ===================================
If there is even a slight mis-spelling, this kind of check will help you pinpoint where that is. Note how the "Amount" column is spelled with an extra space.
At this point, I would contact the data provider to correct errors like this.
It is a logical practice to keep one schema spec file per table provided to you. However, it is also possible to take advantage of YAML "documents" to keep multiple schema specs inside a single YAML file.
The choice is yours - in cases where there are a lot of data files, it may make sense (for the sake of file-system sanity) to keep all of the specs in multiple files that represent logical groupings of data.
YAML
metadata spec.¶Put yourself in the shoes of a data provider. Take the boston_ei.csv
file in the data/
directory, and make a schema spec file for that file.
Next, put yourself in the shoes of a data analyst. Take the schema spec file and write a test for it.
Inside datafuncs.py
, write a function with the signature autospec(handle)
that takes in a file path, and does the following:
Now, let's go "meta". Write a "meta-test" that ensures that every CSV file in the data/
directory has a schema file associated with it. (The function need not check each schema.) Until we finish filling out the rest of the exercises, this test can be allowed to fail, and we can mark it as a test to skip by marking it with an @skip
decorator:
@pytest.mark.skip(reason="no way of currently testing this")
def test_my_func():
...
Now that we're done with the schema checks, let's do some sanity checks on the data as well. This is my personal favourite too, as some of the activities here overlap with the early stages of exploratory data analysis.
We're going to switch datasets here, and move to a 'corrupted' version of the Boston Economic Indicators dataset. Its file path is: ./data/boston_ei-corrupt.csv
.
import pandas as pd
import seaborn as sns
sns.set_style('white')
%matplotlib inline
df = pd.read_csv('data/boston_ei-corrupt.csv')
df.head()
We can use a package called missingno
, which gives us a quick visual view of the completeness of the data. This is a good starting point for deciding whether you need to manually comb through the data or not.
# First, we check for missing data.
import missingno as msno
msno.matrix(df)
Immediately it's clear that there's a number of rows with empty values! Nothing beats a quick visual check like this one.
We can get a table version of this using another package called pandas_summary
.
# We can do the same using pandas-summary.
from pandas_summary import DataFrameSummary
dfs = DataFrameSummary(df)
dfs.summary()
dfs.summary()
returns a Pandas DataFrame; this means we can write tests for data completeness!
Write a test named check_data_completeness(df)
that takes in a DataFrame and confirms that there's no missing data from the pandas-summary
output. Then, write a corresponding test_boston_ei()
that tests the schema for the Boston Economic Indicators dataframe.
# In test_datafuncs.py
from pandas_summary import DataFrameSummary
def check_data_completeness(df):
df_summary = DataFrameSummary(df).summary()
for col in df_summary.columns:
assert df_summary.loc['missing', col] == 0, f'{col} has missing values'
def test_boston_ei():
df = pd.read_csv('data/boston_ei.csv')
check_data_completeness(df)
In the Economic Indicators dataset, there are four "rate" columns: ['labor_force_part_rate', 'hotel_occup_rate', 'hotel_avg_daily_rate', 'unemp_rate']
, which must have values between 0 and 1.
Add a utility function to test_datafuncs.py
, check_data_range(data, lower=0, upper=1)
, which checks the range of the data such that:
data
is a list-like object.data <= upper
data >= lower
upper
and lower
have default values of 1 and 0 respectively.Then, add to the test_boston_ei()
function tests for each of these four columns, using the check_data_range()
function.
# In test_datafuncs.py
def check_data_range(data, lower=0, upper=1):
assert min(data) >= lower, f"minimum value less than {lower}"
assert max(data) <= upper, f"maximum value greater than {upper}"
def test_boston_ei():
df = pd.read_csv('data/boston_ei.csv')
check_data_completeness(df)
zero_one_cols = ['labor_force_part_rate', 'hotel_occup_rate',
'hotel_avg_daily_rate', 'unemp_rate']
for col in zero_one_cols:
check_data_range(df['labor_force_part_rate'])
Most of what is coming is going to be a demonstration of the kinds of tools that are potentially useful for you. Feel free to relax from coding, as these aren't necessarily obviously automatable.
We can take the EDA portion further, by doing an empirical cumulative distribution plot for each data column.
import numpy as np
def compute_dimensions(length):
"""
Given an integer, compute the "square-est" pair of dimensions for plotting.
Examples:
- length: 17 => rows: 4, cols: 5
- length: 14 => rows: 4, cols: 4
This is a utility function; can be tested separately.
"""
sqrt = np.sqrt(length)
floor = int(np.floor(sqrt))
ceil = int(np.ceil(sqrt))
if floor ** 2 >= length:
return (floor, floor)
elif floor * ceil >= length:
return (floor, ceil)
else:
return (ceil, ceil)
compute_dimensions(length=17)
assert compute_dimensions(17) == (4, 5)
assert compute_dimensions(16) == (4, 4)
assert compute_dimensions(15) == (4, 4)
assert compute_dimensions(11) == (3, 4)
# Next, let's visualize the empirical CDF for each column of data.
import matplotlib.pyplot as plt
def empirical_cumdist(data, ax, title=None):
"""
Plots the empirical cumulative distribution of values.
"""
x, y = np.sort(data), np.arange(1, len(data)+1) / len(data)
ax.scatter(x, y)
ax.set_title(title)
data_cols = [i for i in df.columns if i not in ['Year', 'Month']]
n_rows, n_cols = compute_dimensions(len(data_cols))
fig = plt.figure(figsize=(n_cols*3, n_rows*3))
from matplotlib.gridspec import GridSpec
gs = GridSpec(n_rows, n_cols)
for i, col in enumerate(data_cols):
ax = plt.subplot(gs[i])
empirical_cumdist(df[col], ax, title=col)
plt.tight_layout()
plt.show()
It's often a good idea to standardize numerical data (that aren't count data). The term standardize often refers to the statistical procedure of subtracting the mean and dividing by the standard deviation, yielding an empirical distribution of data centered on 0 and having standard deviation of 1.
Write a test for a function that standardizes a column of data. Then, write the function.
Note: This function is also implemented in the scikit-learn
library as part of their preprocessing
module. However, in case an engineering decision that you make is that you don't want to import an entire library just to use one function, you can re-implement it on your own.
def standard_scaler(x):
return (x - x.mean()) / x.std()
def test_standard_scaler(x):
std = standard_scaler(x)
assert np.allclose(std.mean(), 0)
assert np.allclose(std.std(), 1)
Now, plot the grid of standardized values.
data_cols = [i for i in df.columns if i not in ['Year', 'Month']]
n_rows, n_cols = compute_dimensions(len(data_cols))
fig = plt.figure(figsize=(n_cols*3, n_rows*3))
from matplotlib.gridspec import GridSpec
gs = GridSpec(n_rows, n_cols)
for i, col in enumerate(data_cols):
ax = plt.subplot(gs[i])
empirical_cumdist(standard_scaler(df[col]), ax, title=col)
plt.tight_layout()
plt.show()
Did we just copy/paste the function?! It's time to stop doing this. Let's refactor the code into a function that can be called.
For categorical-type data, we can plot the empirical distribution as well. (This example uses the smartphone_sanitization.csv
dataset.)
from collections import Counter
def empirical_catdist(data, ax, title=None):
d = Counter(data)
print(d)
x = range(len(d.keys()))
labels = list(d.keys())
y = list(d.values())
ax.bar(x, y)
ax.set_xticks(x)
ax.set_xticklabels(labels)
smartphone_df = pd.read_csv('data/smartphone_sanitization.csv')
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
empirical_catdist(smartphone_df['site'], ax=ax)
From Wikipedia:
In statistics, the Kolmogorov–Smirnov test (K–S test or KS test) is a nonparametric test of the equality of continuous, one-dimensional probability distributions that can be used to compare a sample with a reference probability distribution (one-sample K–S test), or to compare two samples (two-sample K–S test). It is named after Andrey Kolmogorov and Nikolai Smirnov.
from scipy.stats import ks_2samp
import numpy.random as npr
# Simulate a normal distribution with 10000 draws.
normal_rvs = npr.normal(size=10000)
result = ks_2samp(normal_rvs, df['labor_force_part_rate'].dropna())
result.pvalue < 0.05
fig = plt.figure()
ax = fig.add_subplot(111)
empirical_cumdist(normal_rvs, ax=ax)
empirical_cumdist(df['hotel_occup_rate'], ax=ax)
Re-create the panel of cumulative distribution plots, this time adding on the Normal distribution, and annotating the p-value of the K-S test in the title.
data_cols = [i for i in df.columns if i not in ['Year', 'Month']]
n_rows, n_cols = compute_dimensions(len(data_cols))
fig = plt.figure(figsize=(n_cols*3, n_rows*3))
from matplotlib.gridspec import GridSpec
gs = GridSpec(n_rows, n_cols)
for i, col in enumerate(data_cols):
ax = plt.subplot(gs[i])
test = ks_2samp(normal_rvs, standard_scaler(df[col]))
empirical_cumdist(normal_rvs, ax)
empirical_cumdist(standard_scaler(df[col]), ax, title=f"{col}, p={round(test.pvalue, 2)}")
plt.tight_layout()
plt.show()


Fresh greens are tossed with strawberries, toasted pecans, and blue cheese. A lively dressing unites all the flavors into a springtime delight!
Recipe by James
A fun salad that kids, and just about everyone else, will love. Fruit cocktail, grapes, mandarin oranges, whipped topping and mini marshmallows, are stirred together and chilled. Serves eight.
Recipe by Anne
The crust is made from cookie dough and cooked until golden brown. The topping is a whipped topping and a swirl of fresh fruit slices -kiwi, strawberries or peaches.
Recipe by Joy
This black rice pilaf with onion and almonds is a unique, flavorful side dish that is quick and easy to make and pairs well with many mains.
Recipe by Jones
With golden raisins and a pinch of nutmeg or cinnamon, this creamy, classic rice pudding makes a quick and easy dessert that everyone will love.
Recipe by Mary
Chef John's recipe for Persian rice, made with a pinch of saffron, will have you producing perfect results every time.


The hybrid web view.
More...
| XLabs.Forms.Controls.HybridWebView.HybridWebView |
( |
| ) |
|
Initializes a new instance of the HybridWebView class.
- Exceptions
-
| Exception | Exception when there is no IJsonSerializer implementation registered. |
HybridWebView will use IJsonSerializer configured with Resolver or DependencyService. System JSON serializer was removed due to Xamarin requirement of having a business license or higher.
| XLabs.Forms.Controls.HybridWebView.HybridWebView |
( |
IJsonSerializer |
jsonSerializer | ) |
|
Initializes a new instance of the HybridWebView class.
- Parameters
-
| jsonSerializer | The JSON serializer. |
| void XLabs.Forms.Controls.HybridWebView.CallJsFunction |
( |
string |
funcName, |
|
|
params object[] |
parameters |
|
) |
| |
Calls the js function.
- Parameters
-
| funcName | Name of the function. |
| parameters | The parameters. |
| void XLabs.Forms.Controls.HybridWebView.Cleanup |
( |
| ) |
|
Called to immediately free the native web view and disconnect all callbacks Note that this web view object will no longer be usable after this call!
| void XLabs.Forms.Controls.HybridWebView.InjectJavaScript |
( |
string |
script | ) |
|
Injects the java script.
- Parameters
-
| void XLabs.Forms.Controls.HybridWebView.LoadContent |
( |
string |
content | ) |
|
Loads the content.
- Parameters
-
| void XLabs.Forms.Controls.HybridWebView.LoadFromContent |
( |
string |
contentFullName | ) |
|
Loads from content.
- Parameters
-
| contentFullName | Full name of the content. |
| void XLabs.Forms.Controls.HybridWebView.RegisterCallback |
( |
string |
name, |
|
|
Action< string > |
action |
|
) |
| |
Registers a native callback.
- Parameters
-
| name | The name. |
| action | The action. |
| void XLabs.Forms.Controls.HybridWebView.RegisterNativeFunction |
( |
string |
name, |
|
|
Func< string, object[]> |
func |
|
) |
| |
Registers a native callback and returns data to closure.
- Parameters
-
| name | The name. |
| func | The function. |
| bool XLabs.Forms.Controls.HybridWebView.RegisterNativeFunction |
( |
string |
name | ) |
|
Removes a native callback function.
- Parameters
-
| name | The name of the callback. |
- Returns
true
if XXXX, false
otherwise.
| void XLabs.Forms.Controls.HybridWebView.RemoveAllCallbacks |
( |
| ) |
|
Remove all Callbacks from this view
| void XLabs.Forms.Controls.HybridWebView.RemoveAllFunctions |
( |
| ) |
|
Remove all Functions from this view
| bool XLabs.Forms.Controls.HybridWebView.RemoveCallback |
( |
string |
name | ) |
|
Removes a native callback.
- Parameters
-
| name | The name of the callback. |
- Returns
true
if XXXX, false
otherwise.
| readonly BindableProperty XLabs.Forms.Controls.HybridWebView.CleanupProperty |
|
static |
Initial value:=
BindableProperty.Create<
HybridWebView,
bool> (p => p.CleanupCalled,
false)
Boolean to indicate cleanup has been called.
| EventHandler XLabs.Forms.Controls.HybridWebView.LeftSwipe |
| EventHandler XLabs.Forms.Controls.HybridWebView.LoadFinished |
| EventHandler XLabs.Forms.Controls.HybridWebView.RightSwipe |
| readonly BindableProperty XLabs.Forms.Controls.HybridWebView.SourceProperty |
|
static |
Initial value:=
BindableProperty.Create<
HybridWebView, WebViewSource>(p => p.Source,
default(WebViewSource))
The source property.
| readonly BindableProperty XLabs.Forms.Controls.HybridWebView.UriProperty |
|
static |
Initial value:
The uri property.
| bool XLabs.Forms.Controls.HybridWebView.CleanupCalled |
|
getset |
Gets or sets the cleanup called flag.
| WebViewSource XLabs.Forms.Controls.HybridWebView.Source |
|
getset |
Gets or sets the source.
The source.
| Uri XLabs.Forms.Controls.HybridWebView.Uri |
|
getset |
Gets or sets the uri.
The URI.
The documentation for this class was generated from the following file:


Michael Bernstein
human-computer interaction · social computing · crowdsourcing
Projects
Waiting in line
Needfinding
Prototyping
Heuristic Evaluation<
Visualization
Social design<
Gestural interaction<
Design tools<


RegEx Game
Find Prices
Determine whether the given string is a valid price
Back
/
/
Make all words turn green to complete the challenge
Should match
$123
$0
$0.50
$99.99
$102472349.17
Should
not
match
hello
123
$0.577
$123.4.3
$823.h


This sample gives a few examples of how to add and remove event listeners with the Spry.Utils.addEventListener() and Spry.Utils.removeEventListener() functions.
First the basics. To add an event listener to an element on your page, define a listener function (aka handler function), and then call Spry.Utils.addEventListener() to attach it:
 ...
Click me!
 ...
A couple of important things to note about you handler function is that when it is invoked, the 'this' reference within your function will be the actual DOM element the handler was attached to with the addEventListener call. Also, for IE, the event object passed into your handler has the W3C standard stopPropagation() and preventDefault() methods defined on it, so you no longer have to set the proprietary IE equivalents. Some examples of how the value you return from your handler and calls to stopPropagation() and/or preventDefault() effect processing, can be seen below.
Another thing to note, is that if you call addEventListener() to attach the same listener function to the same element, for the same event type, repeatedly, the handler will still only be invoked once.
To remove an event listener from an element, simply call Spry.Utils.removeEventListener() with the exact same arguments you used when you called Spry.Utils.addEventListener():

In the following example, different event listeners are attached to each link in the list. Click on the links to see how the different types of handlers effect the processing of the link. To remove the event handlers on the links, press the "Remove Event Handlers" button. To add them back, press the "Add Event Handlers" button.
Event handlers are *NOT* active!
The handler on this link looks like this:
function Handler1(evt) { alert(this.id + " was clicked!"); }
Since this handler does *NOT* return a false value, or call stopPropagation() on the event, clicking on "Link #1" above should cause 2 alerts to pop up, one from Handler1() and the other from the listener that is on the <list>. Also, since Handler1() does not call preventDefault() on the event object, the browser should execute the default action for the link, which in this case causes the browser to load the URL "add_event_listener.html#link1". The URL displayed by the browser should then reflect this new URL.
The handler on this link looks like this:
function Handler2(evt) { alert(this.id + " was clicked!"); return false; }
Since this handler returns a value of false, propagation of this event is stopped and the default action for the event is prevented. This means that when you click on "Link #2" above, you should only see a single alert pop up from Handler2(). The URL displayed by the browser should be exactly the same as it was prior to you clicking on "Link #2".
The handler on this link looks like this:
function Handler3(evt) { alert(this.id + " was clicked!"); evt.stopPropagation(); evt.preventDefault(); }
Since this handler manually calls stopPropagation() and preventDefault() on the event and returns *NO* value at all, propagation of this event is stopped and the default action for the event is prevented. This means that when you click on "Link #3" above, you should only see a single alert pop up from Handler3(). The URL displayed by the browser should be exactly the same as it was prior to you clicking on "Link #3". Handler3() is functionally equivalent to Handler2().
The handler on this link looks like this:
function Handler4(evt) { alert(this.id + " was clicked!"); evt.stopPropagation(); }
Since this handler manually calls stopPropagation() on the event and returns *NO* value at all, propagation of this event is stopped. This means that when you click on "Link #4" above, you should only see a single alert pop up from Handler4(). Also, since Handler4() does not call preventDefault() on the event object, the browser should execute the default action for the link, which in this case causes the browser to load the URL "add_event_listener.html#link4". The URL displayed by the browser should then reflect this new URL.
The handler on this link looks like this:
function Handler5(evt) { alert(this.id + " was clicked!"); evt.preventDefault(); }
Since this handler manually calls preventDefault() on the event and returns *NO* value at all, the default action for the link is prevented. This means that when you click on "Link #5" above, 2 alerts will pop up, one from Handler1() and the other from the listener that is on the <list>. Since the default action for the link is prevented, the URL displayed by the browser should be exactly the same as it was prior to you clicking on "Link #5".


About Me
Hi my name is Jeff and I am a web developer living in Jackson, WY. I graduated from Elon University in 2016 with a Bachelor's Degree in Business Management and a minor in Asian Studies. I recently completed The University of Denver's full stack coding bootcamp in June, 2021. I started coding on my own as a way to challenge myself and learn a new skill. The fusion of creativity and logic sparked my interest and I soon found myself pursuing a new career rather than hobby. When I am not coding, I can be found exploring Jackson's surrounding mountains and rivers. My favorite hobbies include skiing, mountain biking, rafting, surfing, scuba diving, rollerblading and fly fishing.
Portfolio


SYNC ED is a smart innovative venture blending technology and critical thinking to power disruptive technologies.As we know that,The next big wave of innovation and ideas is bound to come from the student community ,We are trying to bridge the gap between the students,academia and industry.
We are a team of next gen innovators working with a perception to develop new innovations, in identifiable and investable form, in progress to validate and capture the value of the created innovation , with ambition to grow fast with a scalable business model for maximum impact.
We aspire to construct engaging communities and also to build up customer experience and trust. We are striving to put things into perspective with work from our startup’s innovative community by taking feedback, customer complaints and queries as the aspects that we concentrate on.
We integrate into a small team, with willingness to solve problems by planning and reviewing the customer requirements and push beyond our boundaries to create and get a killer product on time.


This is a paragraph tag, also a block element IE it takes up vertical space
The head tag, encapsulates meta information about your html resource
The heading is a way of formating how things are presented, like a paragraph heading. It has levels.
Why even use header element
We don't use tags to make words appear bolder or italicized anymore. HTML shouldnt describe how they look, it should only describe how they are. Its the job of CSS to worry about styling.
| Name | Favorite Color | |
|---|---|---|
| Marielle | Green | |
| Jacob | Blue | |
| Azhya | Red | Purple |
Some tags, like you img tag use attributes to define the value of what they're presenting
(img src="Where the image is/image address")
the href attribute of the anchor tag, tells you where the anchor leads
You can also use certain attributes to identifty your elements
Using the style attribute, i've changed the color of the font, however only for this text


{% extends "base.html" %} {% block title %}403 Forbidden{% endblock %} {% block head %} {{ super() }} {% if cookie_preference is not none %} {% endif %} {% endblock %} {% block content %}
You don't have the permission to access the requested resource. It is either read-protected or not readable by the server. You should be redirected automatically to target URL: {{ next }}. If not, click the link.
{% endblock %}


#assign findFutureIds= "true">
findFutureIds (find Ids of a query in a background thread)
Similar to findIds you can find a list of Ids in a background thread using findFutureIds
.
This returns a Future object which can be used to cancel, check the
execution status (isDone etc) and get the value (with or without a
timeout).
```java
FutureIds futureIds = futureList =
Order.find.where()
.status.equalTo(Order.Status.NEW)
.findFutureIds();
```
And to get the actual computed value
```java
// Waits (blocks) for the calculation to be finished and returns the value
List ids = futureIds.get();
// Waits for the calculation to be finished and returns the value
// if it happens under 10 seconds, otherwise throw an exception
List ids = futureIds.get(10, TimeUnit.SECONDS);
if (futureIds.isDone()) {
// Here we can fetch the value (assuming that everything went ok)
}
```


Chapter 4: Granger Causality Test¶
In the first three chapters, we discussed the classical methods for both univariate and multivariate time series forecasting. We now introduce the notion of causality and its implications on time series analysis in general. We also describe a test for the linear VAR model discussed in the previous chapter.
Prepared by: Carlo Vincienzo G. Dajac
Notations¶
If \(A_t\) is a stationary stochastic process, let \(\overline A_t\) represent the set of past values \({A_{t-j}, \; j=1,2,\ldots,\infty}\) and \(\overline{\overline A}_t\) represent the set of past and present values \({A_{t-j}, \; j=0,1,\ldots,\infty}\). Further, let \(\overline A(k)\) represent the set \({A_{t-j}, \; j=k,k+1,\ldots,\infty}\).
Denote the optimum, unbiased, least-squares predictor of \(A_t\) using the set of values \(B_t\) by \(P_t (A|B)\). Thus, for instance, \(P_t (X|\overline X)\) will be the optimum predictor of \(X_t\) using only past \(X_t\). The predictive error series will be denoted by \(\varepsilon_t(A|B) = A_t - P_t(A|B)\). Let \(\sigma^2 (A|B)\) be the variance of \(\varepsilon_t(A|B)\).
Let \(U_t\) be all the information in the universe accumulated since time \(t-1\) and let \(U_t - Y_t\) denote all this information apart from the specified series \(Y_t\), which is another stationary time series that is different from \(X_t\).
Definitions¶
Causality¶
If \(\sigma^2 (X|U) < \sigma^2 (X| \overline{U-Y})\), we say that \(Y\) is causing \(X\), denoted by \(Y_t \implies X_t\). We say that \(Y_t\) is causing \(X_t\) if we are able to predict \(X_t\) using all available information than if the information apart from \(Y_t\) had been used.
Feedback¶
If \(\sigma^2 (X|\overline U) < \sigma^2 (X| \overline{U-Y})\) and \(\sigma^2 (Y|\overline U) < \sigma^2 (Y| \overline{U-X})\), we say that feedback is occurring, which is denoted by \(Y_t \iff X_t\), i.e., feedback is said to occur when \(X_t\) is causing \(Y_t\) and also \(Y_t\) is causing \(X_t\).
Instantaneous Causality¶
If \(\sigma^2 (X|\overline U, \overline{\overline Y}) < \sigma^2 (X| \overline U)\), we say that instantaneous causality \(Y_t \implies X_t\) is occurring. In other words, the current value of \(X_t\) is better “predicted” if the present value of \(Y_t\) is included in the “prediction” than if it is not.
Causality Lag¶
If \(Y_t \implies X_t\), we define the (integer) causality lag \(m\) to be the least value of \(k\) such that \(\sigma^2 (X|U-Y(k)) < \sigma^2 (X|U-Y(k+1))\). Thus, knowing the values \(Y_{t-j}, \; j=0,1,\ldots,m-1\) will be of no help in improving the prediction of \(X_t\)
Assumptions¶
\(X_t\) and \(Y_t\) are stationary.
\(P_t (A|B)\) is already optimized.
Testing for Granger Causality¶
We will be first building VAR models for our examples in this section. In addition to the steps outlined in the previous chapter, we will just call built-in Granger causality test function and configure it accordingly.
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from pandas.plotting import lag_plot
from statsmodels.tsa.vector_ar.var_model import VAR
from statsmodels.tsa.stattools import adfuller, kpss, grangercausalitytests
import warnings
warnings.filterwarnings("ignore")
Example 1: Ipo Dam Dataset¶
We will use the Ipo dataset in this example. It contains daily measurements of the following variables: rainfall (in millimeters), Oceanic Niño Index (ONI), NIA release flow (in cubic meters per second), and dam water level (in meters), respectively.
ipo_df = pd.read_csv('../data/Ipo_dataset.csv', index_col='Time');
ipo_df = ipo_df.dropna()
ipo_df.head()
| Rain | ONI | NIA | Dam | |
|---|---|---|---|---|
| Time | ||||
| 0 | 0.0 | -0.7 | 38.225693 | 100.70 |
| 1 | 0.0 | -0.7 | 57.996530 | 100.63 |
| 2 | 0.0 | -0.7 | 49.119213 | 100.56 |
| 3 | 0.0 | -0.7 | 47.034720 | 100.55 |
| 4 | 0.0 | -0.7 | 42.223380 | 100.48 |
fig,ax = plt.subplots(4, figsize=(15,8), sharex=True)
plot_cols = ['Rain', 'ONI', 'NIA', 'Dam']
ipo_df[plot_cols].plot(subplots=True, legend=False, ax=ax)
for a in range(len(ax)):
ax[a].set_ylabel(plot_cols[a])
ax[-1].set_xlabel('')
plt.tight_layout()
plt.show()
Causality between Rainfall and Ipo Dam Water Level¶
For this example, we will focus on the Rain and Dam time series.
data_df = ipo_df.drop(['ONI', 'NIA'], axis=1)
data_df.head()
| Rain | Dam | |
|---|---|---|
| Time | ||
| 0 | 0.0 | 100.70 |
| 1 | 0.0 | 100.63 |
| 2 | 0.0 | 100.56 |
| 3 | 0.0 | 100.55 |
| 4 | 0.0 | 100.48 |
We look at the lag plots to quickly check for stationarity.
def lag_plots(data_df):
f, (ax1, ax2) = plt.subplots(1, 2, figsize=(15, 5))
lag_plot(data_df[data_df.columns[0]], ax=ax1)
ax1.set_title(data_df.columns[0]);
lag_plot(data_df[data_df.columns[1]], ax=ax2)
ax2.set_title(data_df.columns[1]);
ax1.set_ylabel('$y_{t+1}$');
ax1.set_xlabel('$y_t$');
ax2.set_ylabel('$y_{t+1}$');
ax2.set_xlabel('$y_t$');
plt.tight_layout()
lag_plots(data_df)
Result: Dam does not look stationary. Rainfall lag plot is inconclusive.
We use KPSS and ADF tests discussed in the previous chapter to conclusively check for stationarity.
def kpss_test(data_df):
test_stat, p_val = [], []
cv_1pct, cv_2p5pct, cv_5pct, cv_10pct = [], [], [], []
for c in data_df.columns:
kpss_res = kpss(data_df[c].dropna(), regression='ct')
test_stat.append(kpss_res[0])
p_val.append(kpss_res[1])
cv_1pct.append(kpss_res[3]['1%'])
cv_2p5pct.append(kpss_res[3]['2.5%'])
cv_5pct.append(kpss_res[3]['5%'])
cv_10pct.append(kpss_res[3]['10%'])
kpss_res_df = pd.DataFrame({'Test statistic': test_stat,
'p-value': p_val,
'Critical value - 1%': cv_1pct,
'Critical value - 2.5%': cv_2p5pct,
'Critical value - 5%': cv_5pct,
'Critical value - 10%': cv_10pct},
index=data_df.columns).T
kpss_res_df = kpss_res_df.round(4)
return kpss_res_df
kpss_test(data_df)
| Rain | Dam | |
|---|---|---|
| Test statistic | 0.018 | 1.8045 |
| p-value | 0.100 | 0.0100 |
| Critical value - 1% | 0.216 | 0.2160 |
| Critical value - 2.5% | 0.176 | 0.1760 |
| Critical value - 5% | 0.146 | 0.1460 |
| Critical value - 10% | 0.119 | 0.1190 |
Result: Rain is stationary, while Dam is not.
def adf_test(data_df):
test_stat, p_val = [], []
cv_1pct, cv_5pct, cv_10pct = [], [], []
for c in data_df.columns:
adf_res = adfuller(data_df[c].dropna())
test_stat.append(adf_res[0])
p_val.append(adf_res[1])
cv_1pct.append(adf_res[4]['1%'])
cv_5pct.append(adf_res[4]['5%'])
cv_10pct.append(adf_res[4]['10%'])
adf_res_df = pd.DataFrame({'Test statistic': test_stat,
'p-value': p_val,
'Critical value - 1%': cv_1pct,
'Critical value - 5%': cv_5pct,
'Critical value - 10%': cv_10pct},
index=data_df.columns).T
adf_res_df = adf_res_df.round(4)
return adf_res_df
adf_test(data_df)
| Rain | Dam | |
|---|---|---|
| Test statistic | -8.6223 | -5.8742 |
| p-value | 0.0000 | 0.0000 |
| Critical value - 1% | -3.4313 | -3.4313 |
| Critical value - 5% | -2.8619 | -2.8619 |
| Critical value - 10% | -2.5670 | -2.5670 |
Result: Both data are stationary.
Since both the lag plot and KPSS test indicate that Dam is not stationary, we apply differencing first before building our VAR model.
data_df['Dam'] = data_df['Dam'] - data_df['Dam'].shift(1)
data_df = data_df.dropna()
We again look at the lag plots and apply the KPSS and ADF tests.
lag_plots(data_df)
kpss_test(data_df)
| Rain | Dam | |
|---|---|---|
| Test statistic | 0.0179 | 0.0047 |
| p-value | 0.1000 | 0.1000 |
| Critical value - 1% | 0.2160 | 0.2160 |
| Critical value - 2.5% | 0.1760 | 0.1760 |
| Critical value - 5% | 0.1460 | 0.1460 |
| Critical value - 10% | 0.1190 | 0.1190 |
adf_test(data_df)
| Rain | Dam | |
|---|---|---|
| Test statistic | -8.6227 | -21.5919 |
| p-value | 0.0000 | 0.0000 |
| Critical value - 1% | -3.4313 | -3.4313 |
| Critical value - 5% | -2.8619 | -2.8619 |
| Critical value - 10% | -2.5670 | -2.5670 |
Result: All three conclusively agree that both data are now stationary.
We next split the data into train and test sets for the VAR model.
def splitter(data_df):
end = round(len(data_df)*.8)
train_df = data_df[:end]
test_df = data_df[end:]
return train_df, test_df
train_df, test_df = splitter(data_df)
We then select the VAR order \(p\) by computing the different multivariate information criteria (AIC, BIC, HQIC), and FPE.
def select_p(train_df):
aic, bic, fpe, hqic = [], [], [], []
model = VAR(train_df)
p = np.arange(1,60)
for i in p:
result = model.fit(i)
aic.append(result.aic)
bic.append(result.bic)
fpe.append(result.fpe)
hqic.append(result.hqic)
lags_metrics_df = pd.DataFrame({'AIC': aic,
'BIC': bic,
'HQIC': hqic,
'FPE': fpe},
index=p)
fig, ax = plt.subplots(1, 4, figsize=(15, 3), sharex=True)
lags_metrics_df.plot(subplots=True, ax=ax, marker='o')
plt.tight_layout()
print(lags_metrics_df.idxmin(axis=0))
select_p(train_df)
AIC 21
BIC 8
HQIC 11
FPE 21
dtype: int64
Result: We see that BIC has the lowest value at \(p=8\) while HQIC at \(p=11\). Although both AIC and FPE have the lowest value at \(p=21\), their plots also show an elbow. We can thus select the number of lags to be 8 (also for computational efficiency).
We now fit the VAR model with the chosen order.
p = 8
model = VAR(train_df)
var_model = model.fit(p)
We can finally test the variables for Granger Causality
def granger_causation_matrix(data, variables, p, test = 'ssr_chi2test', verbose=False):
"""Check Granger Causality of all possible combinations of the time series.
The rows are the response variables, columns are predictors. The values in the table
are the P-Values. P-Values lesser than the significance level (0.05), implies
the Null Hypothesis that the coefficients of the corresponding past values is
zero, that is, the X does not cause Y can be rejected.
data : pandas dataframe containing the time series variables
variables : list containing names of the time series variables.
"""
df = pd.DataFrame(np.zeros((len(variables), len(variables))), columns=variables, index=variables)
for c in df.columns:
for r in df.index:
test_result = grangercausalitytests(data[[r, c]], p, verbose=False)
p_values = [round(test_result[i+1][0][test][1],4) for i in range(p)]
if verbose: print(f'Y = {r}, X = {c}, P Values = {p_values}')
min_p_value = np.min(p_values)
df.loc[r, c] = min_p_value
df.columns = [var + '_x' for var in variables]
df.index = [var + '_y' for var in variables]
return df
granger_causation_matrix(train_df, train_df.columns, p)
| Rain_x | Dam_x | |
|---|---|---|
| Rain_y | 1.0 | 0.2169 |
| Dam_y | 0.0 | 1.0000 |
Recall: If a given p-value is < significance level (0.05), then, the corresponding X series (column) causes the Y (row).
Results: For this particular example, we can say that rainfall Granger causes changes in the dam water level. This means that rainfall data improves changes in dam water level prediction performance.
On the other hand, changes in dam water level does not Granger cause rainfall. This means that changes in dam water level data does not improve rainfall prediction performance.
Causality between NIA Release Flow and Ipo Dam Water Level¶
In this next example, we now focus on the NIA and Dam time series.
data_df = ipo_df.drop(['ONI', 'Rain'], axis=1)
data_df.head()
| NIA | Dam | |
|---|---|---|
| Time | ||
| 0 | 38.225693 | 100.70 |
| 1 | 57.996530 | 100.63 |
| 2 | 49.119213 | 100.56 |
| 3 | 47.034720 | 100.55 |
| 4 | 42.223380 | 100.48 |
We first check for stationarity by looking at the lag plots and applying the KPSS and ADF tests.
lag_plots(data_df)
kpss_test(data_df)
| NIA | Dam | |
|---|---|---|
| Test statistic | 0.184 | 1.8045 |
| p-value | 0.022 | 0.0100 |
| Critical value - 1% | 0.216 | 0.2160 |
| Critical value - 2.5% | 0.176 | 0.1760 |
| Critical value - 5% | 0.146 | 0.1460 |
| Critical value - 10% | 0.119 | 0.1190 |
adf_test(data_df)
| NIA | Dam | |
|---|---|---|
| Test statistic | -6.6030 | -5.8742 |
| p-value | 0.0000 | 0.0000 |
| Critical value - 1% | -3.4313 | -3.4313 |
| Critical value - 5% | -2.8619 | -2.8619 |
| Critical value - 10% | -2.5670 | -2.5670 |
Result: All three conclusively show that both data are not stationary.
We apply differencing and recheck for stationarity.
data_df['NIA'] = data_df['NIA'] - data_df['NIA'].shift(1)
data_df['Dam'] = data_df['Dam'] - data_df['Dam'].shift(1)
data_df = data_df.dropna()
lag_plots(data_df)
kpss_test(data_df)
| NIA | Dam | |
|---|---|---|
| Test statistic | 0.0048 | 0.0047 |
| p-value | 0.1000 | 0.1000 |
| Critical value - 1% | 0.2160 | 0.2160 |
| Critical value - 2.5% | 0.1760 | 0.1760 |
| Critical value - 5% | 0.1460 | 0.1460 |
| Critical value - 10% | 0.1190 | 0.1190 |
adf_test(data_df)
| NIA | Dam | |
|---|---|---|
| Test statistic | -21.2837 | -21.5919 |
| p-value | 0.0000 | 0.0000 |
| Critical value - 1% | -3.4313 | -3.4313 |
| Critical value - 5% | -2.8619 | -2.8619 |
| Critical value - 10% | -2.5670 | -2.5670 |
Result: All three conclusively agree that both data are now stationary.
We next split the data and select the lag order \(p\).
train_df, test_df = splitter(data_df)
select_p(train_df)
AIC 27
BIC 8
HQIC 13
FPE 27
dtype: int64
We select \(p=8\) with the same reasons as before. We finally fit our VAR model and test for Granger Causality.
p = 8
model = VAR(train_df)
var_model = model.fit(p)
granger_causation_matrix(train_df, train_df.columns, p)
| NIA_x | Dam_x | |
|---|---|---|
| NIA_y | 1.0000 | 0.0007 |
| Dam_y | 0.0216 | 1.0000 |
Recall: If a given p-value is < significance level (0.05), then, the corresponding X series (column) causes the Y (row).
Result: For this particular example, we can say that changes in NIA release flow Granger causes changes in the dam water level. Conversely, changes in dam water level also Granger causes changes in the NIA release flow. This is an example of the feedback mentioned in an earlier section above. This means that NIA release flow data improves changes in dam water level prediction performance, and dam water level data also improves changes in NIA release flow prediction performance.
Example 2: Causality for La Mesa Dam¶
We now do the same steps for the La Mesa dataset.
lamesa_df = pd.read_csv('../data/La Mesa_dataset.csv', index_col='Time');
lamesa_df = lamesa_df.dropna()
lamesa_df.head()
| Rain | ONI | NIA | Dam | |
|---|---|---|---|---|
| Time | ||||
| 0 | 0.0 | -0.7 | 38.225693 | 78.63 |
| 1 | 0.0 | -0.7 | 57.996530 | 78.63 |
| 2 | 0.0 | -0.7 | 49.119213 | 78.61 |
| 3 | 0.0 | -0.7 | 47.034720 | 78.59 |
| 4 | 0.0 | -0.7 | 42.223380 | 78.56 |
fig,ax = plt.subplots(4, figsize=(15,8), sharex=True)
plot_cols = ['Rain', 'ONI', 'NIA', 'Dam']
lamesa_df[plot_cols].plot(subplots=True, legend=False, ax=ax)
for a in range(len(ax)):
ax[a].set_ylabel(plot_cols[a])
ax[-1].set_xlabel('')
plt.tight_layout()
plt.show()
Causality between Rainfall and La Mesa Dam Water Level¶
In this next example, we first consider the Rain and Dam time series.
data_df = lamesa_df.drop(['ONI', 'NIA'], axis=1)
data_df.head()
| Rain | Dam | |
|---|---|---|
| Time | ||
| 0 | 0.0 | 78.63 |
| 1 | 0.0 | 78.63 |
| 2 | 0.0 | 78.61 |
| 3 | 0.0 | 78.59 |
| 4 | 0.0 | 78.56 |
We first check for stationarity by looking at the lag plots and applying the KPSS and ADF tests.
lag_plots(data_df)
kpss_test(data_df)
| Rain | Dam | |
|---|---|---|
| Test statistic | 0.0327 | 1.8845 |
| p-value | 0.1000 | 0.0100 |
| Critical value - 1% | 0.2160 | 0.2160 |
| Critical value - 2.5% | 0.1760 | 0.1760 |
| Critical value - 5% | 0.1460 | 0.1460 |
| Critical value - 10% | 0.1190 | 0.1190 |
adf_test(data_df)
| Rain | Dam | |
|---|---|---|
| Test statistic | -8.7136 | -4.2004 |
| p-value | 0.0000 | 0.0007 |
| Critical value - 1% | -3.4313 | -3.4313 |
| Critical value - 5% | -2.8619 | -2.8619 |
| Critical value - 10% | -2.5670 | -2.5670 |
Result: All three conclusively show that again Rain is stationary, while Dam is not.
We apply differencing and recheck for stationarity.
data_df['Dam'] = data_df['Dam'] - data_df['Dam'].shift(1)
data_df = data_df.dropna()
lag_plots(data_df)
kpss_test(data_df)
| Rain | Dam | |
|---|---|---|
| Test statistic | 0.0327 | 0.0226 |
| p-value | 0.1000 | 0.1000 |
| Critical value - 1% | 0.2160 | 0.2160 |
| Critical value - 2.5% | 0.1760 | 0.1760 |
| Critical value - 5% | 0.1460 | 0.1460 |
| Critical value - 10% | 0.1190 | 0.1190 |
adf_test(data_df)
| Rain | Dam | |
|---|---|---|
| Test statistic | -8.7138 | -26.5948 |
| p-value | 0.0000 | 0.0000 |
| Critical value - 1% | -3.4313 | -3.4313 |
| Critical value - 5% | -2.8619 | -2.8619 |
| Critical value - 10% | -2.5670 | -2.5670 |
Result: All three conclusively agree that both data are now stationary.
We next split the data and select the lag order \(p\).
train_df, test_df = splitter(data_df)
select_p(train_df)
AIC 7
BIC 6
HQIC 7
FPE 7
dtype: int64
We select \(p=7\). We finally fit our VAR model and test for Granger Causality.
p = 7
model = VAR(train_df)
var_model = model.fit(p)
granger_causation_matrix(train_df, train_df.columns, p)
| Rain_x | Dam_x | |
|---|---|---|
| Rain_y | 1.0 | 0.0005 |
| Dam_y | 0.0 | 1.0000 |
Recall: If a given p-value is < significance level (0.05), then, the corresponding X series (column) causes the Y (row).
Result: For this particular example, we can say that rainfall Granger causes changes in the dam water level. Conversely, changes in dam water level also Granger causes rainfall. This is another example of feedback. This means that rainfall data improves changes in dam water level prediction performance, and dam water level data also improves rainfall prediction performance.
Causality between NIA Release Flow and La Mesa Dam Water Level¶
In this next example, we now focus on the NIA and Dam time series.
data_df = lamesa_df.drop(['ONI', 'Rain'], axis=1)
data_df.head()
| NIA | Dam | |
|---|---|---|
| Time | ||
| 0 | 38.225693 | 78.63 |
| 1 | 57.996530 | 78.63 |
| 2 | 49.119213 | 78.61 |
| 3 | 47.034720 | 78.59 |
| 4 | 42.223380 | 78.56 |
We first check for stationarity by looking at the lag plots and applying the KPSS and ADF tests.
lag_plots(data_df)
kpss_test(data_df)
| NIA | Dam | |
|---|---|---|
| Test statistic | 0.184 | 1.8845 |
| p-value | 0.022 | 0.0100 |
| Critical value - 1% | 0.216 | 0.2160 |
| Critical value - 2.5% | 0.176 | 0.1760 |
| Critical value - 5% | 0.146 | 0.1460 |
| Critical value - 10% | 0.119 | 0.1190 |
adf_test(data_df)
| NIA | Dam | |
|---|---|---|
| Test statistic | -6.6030 | -4.2004 |
| p-value | 0.0000 | 0.0007 |
| Critical value - 1% | -3.4313 | -3.4313 |
| Critical value - 5% | -2.8619 | -2.8619 |
| Critical value - 10% | -2.5670 | -2.5670 |
Result: All three conclusively show that both data are not stationary.
We apply differencing and recheck for stationarity.
data_df['NIA'] = data_df['NIA'] - data_df['NIA'].shift(1)
data_df['Dam'] = data_df['Dam'] - data_df['Dam'].shift(1)
data_df = data_df.dropna()
lag_plots(data_df)
kpss_test(data_df)
| NIA | Dam | |
|---|---|---|
| Test statistic | 0.0048 | 0.0226 |
| p-value | 0.1000 | 0.1000 |
| Critical value - 1% | 0.2160 | 0.2160 |
| Critical value - 2.5% | 0.1760 | 0.1760 |
| Critical value - 5% | 0.1460 | 0.1460 |
| Critical value - 10% | 0.1190 | 0.1190 |
adf_test(data_df)
| NIA | Dam | |
|---|---|---|
| Test statistic | -21.2837 | -26.5948 |
| p-value | 0.0000 | 0.0000 |
| Critical value - 1% | -3.4313 | -3.4313 |
| Critical value - 5% | -2.8619 | -2.8619 |
| Critical value - 10% | -2.5670 | -2.5670 |
Result: All three conclusively agree that both data are now stationary.
We next split the data and select the lag order \(p\).
train_df, test_df = splitter(data_df)
select_p(train_df)
AIC 14
BIC 2
HQIC 8
FPE 14
dtype: int64
We select \(p=14\). We finally fit our VAR model and test for Granger Causality.
p = 14
model = VAR(train_df)
var_model = model.fit(p)
granger_causation_matrix(train_df, train_df.columns, p)
| NIA_x | Dam_x | |
|---|---|---|
| NIA_y | 1.000 | 0.1632 |
| Dam_y | 0.636 | 1.0000 |
Recall: If a given p-value is < significance level (0.05), then, the corresponding X series (column) causes the Y (row).
Result: We see that, unlike for Ipo Dam, changes in NIA release flow and changes in the dam water level do NOT Granger cause one another for La Mesa Dam. This means that NIA release flow data does NOT improve changes in dam water level prediction performance, and dam water level data also does NOT improve changes in NIA release flow prediction performance.
Exercises¶
As exercises, the reader can test for Granger Causality between other pairs of variables from both the Ipo and La Mesa datasets, as well as from the Angat dataset.
Example 3: Jena Climate Data¶
We look back at the Jena climate dataset and explore which variables are Granger causal to another.
train_df = pd.read_csv('../data/train_series_datetime.csv',index_col=0).set_index('Date Time')
val_df = pd.read_csv('../data/val_series_datetime.csv',index_col=0).set_index('Date Time')
test_df = pd.read_csv('../data/test_series_datetime.csv',index_col=0).set_index('Date Time')
train_df.index = pd.to_datetime(train_df.index)
val_df.index = pd.to_datetime(val_df.index)
test_df.index = pd.to_datetime(test_df.index)
train_val_df = pd.concat([train_df, val_df])
jena_df = pd.concat([train_df, val_df, test_df])
jena_df.head()
| p (mbar) | T (degC) | Tpot (K) | Tdew (degC) | rh (%) | VPmax (mbar) | VPact (mbar) | VPdef (mbar) | sh (g/kg) | H2OC (mmol/mol) | rho (g/m**3) | wv (m/s) | max. wv (m/s) | wd (deg) | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Date Time | ||||||||||||||
| 2009-01-01 00:10:00 | 996.52 | -8.02 | 265.40 | -8.90 | 93.3 | 3.33 | 3.11 | 0.22 | 1.94 | 3.12 | 1307.75 | 1.03 | 1.75 | 152.3 |
| 2009-01-01 01:10:00 | 996.50 | -7.62 | 265.81 | -8.30 | 94.8 | 3.44 | 3.26 | 0.18 | 2.04 | 3.27 | 1305.68 | 0.18 | 0.63 | 166.5 |
| 2009-01-01 02:10:00 | 996.63 | -8.85 | 264.57 | -9.70 | 93.5 | 3.12 | 2.92 | 0.20 | 1.82 | 2.93 | 1312.11 | 0.16 | 0.50 | 158.3 |
| 2009-01-01 03:10:00 | 996.87 | -8.84 | 264.56 | -9.69 | 93.5 | 3.13 | 2.92 | 0.20 | 1.83 | 2.93 | 1312.37 | 0.07 | 0.25 | 129.3 |
| 2009-01-01 04:10:00 | 997.05 | -9.23 | 264.15 | -10.25 | 92.2 | 3.03 | 2.79 | 0.24 | 1.74 | 2.80 | 1314.62 | 0.10 | 0.38 | 203.9 |
Causality between Pressure and Temperature¶
In this next example, we first consider the p and T time series.
data_df = jena_df.iloc[:,:2]
data_df.head()
| p (mbar) | T (degC) | |
|---|---|---|
| Date Time | ||
| 2009-01-01 00:10:00 | 996.52 | -8.02 |
| 2009-01-01 01:10:00 | 996.50 | -7.62 |
| 2009-01-01 02:10:00 | 996.63 | -8.85 |
| 2009-01-01 03:10:00 | 996.87 | -8.84 |
| 2009-01-01 04:10:00 | 997.05 | -9.23 |
We first check for stationarity by looking at the lag plots and applying the KPSS and ADF tests.
lag_plots(data_df)
kpss_test(data_df)
| p (mbar) | T (degC) | |
|---|---|---|
| Test statistic | 0.2295 | 0.3649 |
| p-value | 0.0100 | 0.0100 |
| Critical value - 1% | 0.2160 | 0.2160 |
| Critical value - 2.5% | 0.1760 | 0.1760 |
| Critical value - 5% | 0.1460 | 0.1460 |
| Critical value - 10% | 0.1190 | 0.1190 |
adf_test(data_df)
| p (mbar) | T (degC) | |
|---|---|---|
| Test statistic | -18.3281 | -8.5824 |
| p-value | 0.0000 | 0.0000 |
| Critical value - 1% | -3.4304 | -3.4304 |
| Critical value - 5% | -2.8616 | -2.8616 |
| Critical value - 10% | -2.5668 | -2.5668 |
Result: All three conclusively show that both data are not stationary.
We apply differencing and recheck for stationarity.
data_df['p (mbar)'] = data_df['p (mbar)'] - data_df['p (mbar)'].shift(1)
data_df['T (degC)'] = data_df['T (degC)'] - data_df['T (degC)'].shift(1)
data_df = data_df.dropna()
lag_plots(data_df)
kpss_test(data_df)
| p (mbar) | T (degC) | |
|---|---|---|
| Test statistic | 0.0009 | 0.0024 |
| p-value | 0.1000 | 0.1000 |
| Critical value - 1% | 0.2160 | 0.2160 |
| Critical value - 2.5% | 0.1760 | 0.1760 |
| Critical value - 5% | 0.1460 | 0.1460 |
| Critical value - 10% | 0.1190 | 0.1190 |
adf_test(data_df)
| p (mbar) | T (degC) | |
|---|---|---|
| Test statistic | -38.6219 | -41.3374 |
| p-value | 0.0000 | 0.0000 |
| Critical value - 1% | -3.4304 | -3.4304 |
| Critical value - 5% | -2.8616 | -2.8616 |
| Critical value - 10% | -2.5668 | -2.5668 |
Result: All three conclusively agree that both data are now stationary.
We next split the data and select the lag order \(p\).
train_df, test_df = splitter(data_df)
select_p(train_df)
AIC 59
BIC 53
HQIC 54
FPE 59
dtype: int64
We select \(p=30\). We finally fit our VAR model and test for Granger Causality.
p = 30
model = VAR(train_df)
var_model = model.fit(p)
granger_causation_matrix(train_df, train_df.columns, p)
| p (mbar)_x | T (degC)_x | |
|---|---|---|
| p (mbar)_y | 1.0 | 0.0 |
| T (degC)_y | 0.0 | 1.0 |
Recall: If a given p-value is < significance level (0.05), then, the corresponding X series (column) causes the Y (row).
Result: For this particular example, we can say that changes in pressure Granger causes changes in temperature. Conversely, changes in temperature also Granger causes pressure. This is another example of feedback. This means that pressure data improves changes in temperature prediction performance, and temperature data also improves pressure prediction performance.
Summary¶
We have introduced the notion of causality in this chapter, and discussed its implications on time series analysis. We also applied the Granger Causality Test for linear VAR models for several datasets, seeing different examples of causality between the variables explored.
Causality will be revisited in a later chapter, in particular addressing the limitations of the method discussed in this chapter and discussing causality for nonlinear models.


Booth Scene Setter
Newport Gulls' Pregame Intro
Gulls Eye View with Stanford Cardinal Tim Tawa
Newport Gulls Broadcaster's Roundtable
Newport Gulls Manager’s Show with Mike Coombs
2018 NECBL All Star 60 Yard Dash
Front Office Report with Newport Gulls’ Director of Baseball Operations
Player of the Game Interview with Wake Forest’s Logan Harvey
Bowdoin vs. Colby Halftime Analysis


domestic | general | application | 2010
0.1.1 Introduction
The Building (Scotland) Act 2003 gives Scottish Ministers the power to make
building regulations to:
•
secure the health, safety, welfare and convenience of persons in or about
further the conservation of fuel and power; and
further the achievement of sustainable development.
This document gives guidance on how to comply with these regulations.
and the other non-domestic
buildings
. These Technical Handbooks have
been issued by Scottish Ministers for the purpose of providing practical
guidance with respect to the requirements of the provisions of the building
regulations under a notice given in accordance with Section 4(2) of the
Building (Scotland) Act 2003. Each Handbook has seven sections. Section 0,
this section, is identical in both Handbooks. It covers general issues and sets
Both Handbooks are published in three forms, as printed loose leaf sheets
with an A4 binder, on a single CD-rom, and on the Building Standards
Division website. The 2010 version of the Technical Handbooks will be the
last hard copy printed version. However you will be able to download and
print off individual parts or sections of the Handbooks and all future
amendments and updates will be included on the website.
Sections 1 to 6 give guidance on how to achieve the standards set by the
non-domestic
buildings
. The six sections each cover a number of related
standards. They are:
Each of the six sections consists of an introduction and then guidance on the
standards within the section. In the printed version the standard and some
introduction information is given on a yellow page, while the guidance on how
to comply with the standard is given in the succeeding white pages.
At the end of the Handbook, after section 6, there are the following:
Appendix A: Defined terms.
Appendix B: List of standards and other publications.
A full index (hard copy only as the electronic version has a search
facility).
The Technical Handbooks are supported by a Procedural Handbook,
published separately, which clarifies the intent of the Building (Scotland)
Procedures Regulations 2004. A separate procedural guidance document for
domestic | general | application | 2010
0.1.2 The Building (Scotland) Regulations 2004
This Technical Handbook gives guidance on achieving the standards set in
the Building (Scotland) Regulations. The standards themselves can be found
in schedule 5 to regulation 9, and are in the form of ‘expanded functional
standards’. That is, the standards describe the functions a
building
should
perform, such as ‘providing resistance to the spread of fire’.
The Building (Scotland) Regulations made by the Scottish Ministers are
subject to approval by the Scottish Parliament. The content of the
regulations, so far as it relates to technical specifications, is also scrutinised
by the European Commission (EC). The EC checks with all the other
ensure that no barriers to trade in
construction
products are created, either
directly or indirectly by the way products are described.
To meet the requirements of the CPD, materials and
construction
methods
must be described by use of suitable European Standards wherever these
exist. As there is a rolling programme of change to these National and
European Standards, which includes conversion to, and the further provision
of, ENs and harmonised ENs, the Handbooks have been designed to be
readily updated. An explanation of the relevance and status of specific
European and British standards referred to in the Handbooks is in the section
concerned. There is also a list of the publications referred to in the
Handbooks provided in Appendix B.
The arrangement of the sections within Handbooks relates directly to the
Essential Requirements of the CPD (as published by the EC), which
designed and
built
. The arrangement is as follows:
(EC - Mechanical resistance and stability)
(EC - Safety in case of fire)
(EC - Hygiene, health and the environment)
(EC - Protection against noise)
(EC - Energy, economy and heat retention)
0.1.3 The building standards system
The building regulations are enforced through the building standards system
also established by the Building (Scotland) Act 2003. This Act sets out the
enabling powers that allow the Scottish Ministers to make, not only the
building regulations, but also procedural regulations, fees regulations and the
other supporting legislation needed to operate the system. The system is
designed to ensure that new
buildings
and
works
achieve the objectives of
the Act
in terms of health, safety, welfare, convenience, conservation of fuel
and power, and sustainable development.
The roles of those operating the building standards system are explained in
detail in the guidance on the procedural regulations. Briefly, the duty to
comply with the building regulations lies with the owner, or in some cases the
client, for the
work
. Before
work
begins a building warrant must be obtained.
For some simpler
works
a warrant is not required (see regulation 5 and
schedule 3), but the regulations still apply. The owner or client again has the
duty to comply. The role of issuing warrants and accepting completion
domestic | general | application | 2010
certificates rests with verifiers, enforcement is by local authorities, and the
system is overseen and updated by the Building Standards Division advised
by the Building Standards Advisory Committee. The Building Standards
Division forms part of the Directorate for the Built Environment of the Scottish
Government and acts on behalf of, and is responsible to, Scottish Ministers.
These bodies are further explained in the guidance to the procedural
regulations.
The building standards system is pre-emptive, ensuring so far as possible
that the proposed
works
will comply with the regulations. It recognises that
proposals can change during
construction
, so there are requirements for
amendments to the proposals to be agreed and recorded. On completion, the
accordance with the building warrant and the building regulations. The
verifier will make reasonable inquiry to ensure the completion certificate is
accurate before accepting the certificate. Usually an inspection of the
works
will be made, and on most projects some inspection of
work
in progress will
also have been carried out. However verifiers cannot inspect all materials
contractual and practical arrangements needed to assure themselves that the
desired quality of
work
has been achieved.
0.1.4 Status of Technical Handbooks
The regulations are mandatory, but the choice of how to comply lies with the
building
owner. This Technical Handbook has been issued by Scottish
Ministers, through the Building Standards Division, for the purpose of
providing practical guidance with respect to the building regulations. If the
guidance is followed in full then this should by accepted by the verifier as
indicating that the building regulations have been complied with. However it
is quite acceptable to use alternative methods of compliance provided they
fully satisfy the regulations.
Failure to comply with the Technical Handbook does not render a person
liable to civil or criminal procedures, but proof of compliance with the
guidance may be relied on in any proceedings as tending to negative liability
for an alleged contravention of the building regulations.
Following the advice in the Technical Handbooks is therefore likely to be the
normal way of complying with the building regulations. However a designer
may put forward other ways of meeting the regulations, in the form of
alternative solutions.
There are a further two guidance documents that Scottish Ministers have
issued under Section 4(1) of the Building (Scotland) Act 2003. These are
"The guide for practitioners - Conversion of Traditional Buildings", published
by Historic Scotland and "The Scottish Building Standards - Technical
handbook - Conservatories" published by the Building Standards Division.
Both of these documents have the same standing as the Technical
Handbooks. The second editions of both of these documents have been
amended to take into account recent changes.
In due course other documents may be issued by Scottish Ministers to
provide further guidance. Such guidance might deal with specific
building
types, or provide alternative methods of showing compliance with those
provided in the Technical Handbooks.
domestic | general | application | 2010
0.1.5 Alternative solutions
The use of expanded functional standards, backed up by detailed guidance,
provides a flexible system of control. Consideration of alternative solutions is
assisted by the expansion of the functional standards previously used in the
building standards regulations to clarify the necessary properties of each
building
. The need for a formal relaxation of standards is reduced as meeting
the full details of given solutions is no longer mandatory. The professional
judgment of the verifier, assisted by guidance on questions referred to
Scottish Ministers, through the Building Standards Division, decides whether
a standard is met.
In considering alternative solutions, however it is necessary to have regard to
the details of this guidance. Where performance standards or policy
statements are given, every part of the solution is expected to meet them. As
a result, alternative solutions that appear suitable may not be acceptable in
detail. For example, some of the solutions offered in relation to the English
and Welsh building regulations, in the ‘Approved Documents’ (ADs), are not
suitable because the levels of thermal insulation recommended are not the
same. Similarly different approaches are taken to the control of fire size and
AD on fire safety may not be acceptable. This will vary in time as both ADs
and the Scottish Technical Handbooks are updated. Solutions based on
other documents, such as British or European Standards, will have to be
carefully evaluated to see if the Scottish standards are being met in an
appropriate manner.
0.1.6 Domestic and non-domestic buildings
Where any
building
contains both domestic uses and non-domestic uses, the
appropriate parts from each Technical Handbook will need to be used to
ensure the standards are complied with in full, for example a caretakers
flat
in
considered using the domestic guidance. Examples of this might be a
room
lounge communal to a block of
dwellings
. It is also a general principle that
one category it should be designed to meet the most stringent
recommendations.
0.1.7 Latest changes
The following is a summary of the changes which have been introduced
since 1 May 2009. Very minor changes to text have not been included here.
0.1.4 References to guidance documents added.
0.5.2 Schedule 3. Type 2A - description amended.
0.8.4 BS EN's updated.
0.1.8 Updating
It is intended that this Technical Handbook will be updated. At that time
replacement pages will be published for any guidance which has been
altered. It is not expected that the standards themselves will change regularly
as these are set in the building regulations and can only be changed with
Parliamentary approval. Therefore it is anticipated that it is only the white
pages in sections 1-6, rather than the yellow pages, which will be replaced
regularly. It is expected that many users will wish to download the
domestic | general | application | 2010
replacements from the Building Standards Division website
where they will be available free of charge. It is intended that this edition of
the Technical Handbooks will be the last printed version available.
To facilitate such updating, the pages in this Handbook are not numbered
and reference to particular parts is provided through the system of section
and clause numbers. The section and standard numbers are identical for
both the domestic and non-domestic Handbooks. The clause numbers differ
between the two Handbooks.
Every page is provided with a header/footer which records:
•
By providing this on each page it should be possible to copy particular pages
independently and still be certain of their place in the appropriate Handbook.
0.1.9 Arrangement of section 0
Section 0 is arranged to follow the actual regulations. This sub-section
provides an introduction to the building standards system. Sub-section 0.2
covers regulations 1 and 2 which are the citation, commencement and
interpretation. Sub-sections 0.3 to 0.15 cover the significant technical
regulations with each sub-section setting out and discussing the regulation
with the same number (sub-section 0.3 covering regulation 3 etc.).
Regulation 16 establishes which regulations cannot ever be relaxed by
Scottish Ministers. These are the regulations on citation and commencement,
interpretation, exempted
buildings
,
work
not requiring a warrant and the
methods of measurement. Regulation 17 was introduced in 2007 to help with
the implementation of the Energy Performance of Buildings Directive.
0.1.10 Certification
Scottish Ministers can, under Section 7 of the Building (Scotland) Act 2003,
approve schemes for the certification of design or
construction
for compliance
with the mandatory functional standards. Such schemes are approved on the
basis that the procedures adopted by the scheme will take account of the
need to co-ordinate the
work
of various designers and specialist contractors.
Individuals approved to provide certification services under the scheme are
assessed to ensure that they have the qualifications, skills and experience
required to certify compliance for the
work
covered by the scope of the
scheme. Checking procedures adopted by Approved Certifiers will deliver
design or installation reliability in accordance with legislation.


{% extends 'layout.html' %} {% block content %}
Find an IRIS code from a French address.
IRIS is a a code related to a district provided by INSEE, the French National Institute of Statistics and Economic Studies. Thus, it's possible to have some statistical indicators for more than 50,000 different IRIS (resp. districts). Note: Pyris does not take into account statistical data (for now). The longitude/latitude coordinates are retrieved thanks to the National Address French Base and its great API.
Find the raw data at the Open Data French gouvernment website.
You can find the source code of this project on the pyris Github page. It's powered by Python, Flask and PostgreSQL.
Examples: