+ All Categories
Home > Documents > Statistics 2 go

Statistics 2 go

Date post: 07-Feb-2016
Category:
Upload: kaida
View: 23 times
Download: 0 times
Share this document with a friend
Description:
Statistics 2 go. ( simplePXsql , PX2go and API). PC-Axis reference group, Tirana 2013. Lars Pedersen. Question:. How many persons are living in Greenland ? Look to: http://bank.stat.gl/beest1. Answer by a pc:. Answer by an iPad :. Answer by an iPhone:. Think off:. Motorola Storno - PowerPoint PPT Presentation
44
Statistics 2 go (simplePXsql, PX2go and API) PC-Axis reference group, Tirana 2013 Lars Pedersen
Transcript
Page 1: Statistics  2 go

Statistics 2 go

(simplePXsql, PX2go and API)

PC-Axis reference group, Tirana 2013 Lars Pedersen

Page 2: Statistics  2 go

How many persons are living in Greenland ?

Look to:

http://bank.stat.gl/beest1

Question:

Page 3: Statistics  2 go

Answer by a pc:

Page 4: Statistics  2 go

Answer by an iPad :

Page 5: Statistics  2 go

Answer by an iPhone:

Page 6: Statistics  2 go

• Motorola Storno• Sony Ericsson• Nokia

• and px-web 2008

Think off:

Page 7: Statistics  2 go

How many persons are living in Greenland ?

http://bank.stat.gl/beest1

http://bank.stat.gl/m.asp?m=beest1

Question:

Page 8: Statistics  2 go

Answer by a pc:

Page 9: Statistics  2 go

Answer by an iPad:

Page 10: Statistics  2 go

Overview

• a little history• from px-files to a database• what is that good for?• px2go• api’s

• cliffhanger

Page 11: Statistics  2 go

a little history :

Page 12: Statistics  2 go

the family concept

Page 13: Statistics  2 go

• We need to stay connected• Meet, party and quarrel

• a road-map

the family concept

Page 14: Statistics  2 go

the family concept

PX-files

DBNordic

PX-webPC-Axis

PC-Axis/sqlDenmarkNorwayIreland…

Createprocedures

Createprocedures

Createprocedures

Createprocedures

?

Page 15: Statistics  2 go

Database specific settings:

[System]sql_database=statbank2013sql_baseowner=..sql_datestamp=Y-D-M h:m:00sql_endline=sql_bulksave=1

from px-files to a database

Page 16: Statistics  2 go

All can be done batch by a few lines in

PX-JOB

from px-files to a database

@echo off: Batch command line:: PX-Job.exe {job} [in] {out} {err} {def} {log} {-options}:PX-Job job=sql in=H:\database\test\ out=H:\database\test\ log=H:\database\test\pxjob1.txt err=H:\database\test\ -s -o1 -e1PX-Job job=sql in=H:\database\test\ out=H:\database\test\ log=H:\database\test\pxjob1a.txt err=H:\database\test\ -s -o3 -e1

Page 17: Statistics  2 go

input

approximately 650 px filesnormal tree structure

Page 18: Statistics  2 go

output with switch -s -o1 -e1

INSERT INTO statbank2013..PXTables VALUES('en','BEEST1','ANSI','2000','',null,'2010-22-03 09:00:00','2013-22-02 09:00:00','','','Annually','',null,null,0,null,null,'','','BE','Population','','',null,'Population January 1st by residence, gender, age and place of birth 1977-2013','','Population','Persons','','2013-22-02 09:00:00','','','','','Lars Pedersen, [email protected]',null,null,null,'Statistics Greenland','','',null,null,null,null,'','','','','','','','','',null,'','','',null,null,null)INSERT INTO statbank2013..PXVariables VALUES('en','BEEST1','time','1','R','','',null,'','',null,null,null,'','',null,'',null,null,'','')INSERT INTO statbank2013..PXValues VALUES('en','BEEST1','time','1','1977','1','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1978','2','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1979','3','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1980','4','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1981','5','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1982','6','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1983','7','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1984','8','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1985','9','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1986','10','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1987','11','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1988','12','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1989','13','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1990','14','',null,null,'','','','','',null,null,null,null,null,'',''),('en','BEEST1','time','1','1991','15','',null,null,'','','','','',null,null,null,null,null,'',''),

Page 19: Statistics  2 go

output with switch -s –o3 -e1

Converts our 574 Mb px-files to tab-separated csv-files

in less than

1 hour

Page 20: Statistics  2 go

Empty database (drop if exsist)Create 3 tables (tables, variables and values)

Loop though the px-files

set metafile=objf.opentextfile(f.name)uttext = metafile.readallmetafile.closeadoConn.execute uttextset metafile=nothing

Create table for data by use of newly added meta

Create insert statement for dataBULK INSERT statbank2013..PXData_NRE13 FROM 'G:\web\database\Greenland\National accounts\NRE13_data.sql' WITH (CODEPAGE = 'ACP',FIELDTERMINATOR='\t',ROWTERMINATOR='\n')

transfer script (load all)

Page 21: Statistics  2 go

simplePXsql (data tables)

Page 22: Statistics  2 go

simplePXsql (tables)

Page 23: Statistics  2 go

simplePXsql (variables)

Page 24: Statistics  2 go

simplePXsql (values)

Page 25: Statistics  2 go

what is that good for :

• a dirty px-file datacollection

• Used for cleansing• queries across tables• translation services• bridge to the nordic model ?

Page 26: Statistics  2 go

connections

PX-files

DBNordic

PX-webPC-Axis

PC-Axis/sqlDenmarkNorwayIreland…

Createprocedures

Createprocedures

Createprocedures

Createprocedures

simplePXsql

PX-Edit

Page 27: Statistics  2 go

nordic db model

Page 28: Statistics  2 go

• http://bank.stat.gl/m.asp

• Find table– a link (http://bank.stat.gl/m.asp?m=beest1) – category– search

• Table selected– known selection– unknown selection

px2go

Page 29: Statistics  2 go
Page 30: Statistics  2 go

• Greenland Tourism ( www.tourismstat.gl )

• automatic updated from our statbank

• api

s… happens

Page 31: Statistics  2 go

• Graph• Table• Pyramid• Bubles

http://json-stat.org

Page 32: Statistics  2 go

matrix Json-stat

getmeta

getdefault

showcube Graph

Table

explore

generate

API

Json-stat

csv

re-doing px2go for json-stat

Page 33: Statistics  2 go

• groupings

• production

cliffhanger

Page 34: Statistics  2 go

Screenshots from live - demo

Page 35: Statistics  2 go
Page 36: Statistics  2 go
Page 37: Statistics  2 go
Page 38: Statistics  2 go
Page 39: Statistics  2 go
Page 40: Statistics  2 go
Page 41: Statistics  2 go
Page 42: Statistics  2 go
Page 43: Statistics  2 go
Page 44: Statistics  2 go

Recommended