1 / 44

Statistics 2 go

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

kaida
Télécharger la présentation

Statistics 2 go

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Statistics 2 go (simplePXsql, PX2go and API) PC-Axis reference group, Tirana 2013 Lars Pedersen

  2. Question: How many persons areliving in Greenland ? Look to: http://bank.stat.gl/beest1

  3. Answer by a pc:

  4. Answer by an iPad :

  5. Answer by an iPhone:

  6. Think off: • Motorola Storno • Sony Ericsson • Nokia • and px-web 2008

  7. Question: How many persons areliving in Greenland ? http://bank.stat.gl/beest1 http://bank.stat.gl/m.asp?m=beest1

  8. Answer by a pc:

  9. Answer by an iPad:

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

  11. a little history :

  12. the family concept

  13. the family concept • We need to stay connected • Meet, party and quarrel • a road-map

  14. the family concept PX-web PC-Axis Create procedures PX-files ? Create procedures PC-Axis/sql Denmark Norway Ireland … DB Nordic Create procedures Create procedures

  15. from px-files to a database Database specificsettings: [System] sql_database=statbank2013 sql_baseowner=.. sql_datestamp=Y-D-M h:m:00 sql_endline= sql_bulksave=1

  16. from px-files to a database All can be done batch by a few lines in PX-JOB @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 -e1 PX-Job job=sql in=H:\database\test\ out=H:\database\test\ log=H:\database\test\pxjob1a.txt err=H:\database\test\ -s -o3 -e1

  17. input approximately 650 px files normal tree structure

  18. 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, LARP@stat.gl',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,'',''),

  19. output with switch -s –o3 -e1 Converts our 574 Mb px-files to tab-separated csv-files in less than 1 hour

  20. transfer script (load all) Empty database (drop ifexsist) Create 3 tables (tables, variables and values) Loop though the px-files set metafile=objf.opentextfile(f.name) uttext= metafile.readall metafile.close adoConn.executeuttext set metafile=nothing Createtable for data by use of newlyaddedmeta Createinsert statement for data BULK INSERT statbank2013..PXData_NRE13 FROM 'G:\web\database\Greenland\National accounts\NRE13_data.sql' WITH (CODEPAGE = 'ACP',FIELDTERMINATOR='\t',ROWTERMINATOR='\n')

  21. simplePXsql (data tables)

  22. simplePXsql (tables)

  23. simplePXsql (variables)

  24. simplePXsql (values)

  25. what is that good for : • a dirty px-file datacollection • Used for cleansing • queries across tables • translation services • bridge to the nordic model ?

  26. connections PX-web PC-Axis PX-Edit Create procedures PX-files simplePXsql Create procedures PC-Axis/sql Denmark Norway Ireland … Create procedures DB Nordic Create procedures

  27. nordic db model

  28. px2go • http://bank.stat.gl/m.asp • Find table • a link (http://bank.stat.gl/m.asp?m=beest1) • category • search • Tableselected • knownselection • unknownselection

  29. s… happens • Greenland Tourism ( www.tourismstat.gl ) • automatic updated from our statbank • api

  30. http://json-stat.org • Graph • Table • Pyramid • Bubles

  31. re-doing px2go for json-stat matrix generate Json-stat showcube Graph explore getmeta Table API getdefault Json-stat csv

  32. cliffhanger • groupings • production

  33. Screenshots from live - demo

More Related