user_guide
Not logged in

Back to dataSeltzer documentation index



Selecting and querying a dataset

filter-1
dataSeltzer could usually publish more that a single a dataset/datasource: so the first step always is choosing a specific dataset of your interest.

filter-2
In this first example we'll directly query the whole dataset without applying any filter. Just click the go button, and the resultset will be immediately printed on the screen.
For efficiency reasons only a limited number of rows from the resultset will be printed at each time. Anyway you can easily explore all resultset pages; you simply have to click the navigation links first page, last page, previous page and next page.
Please note: anyway querying an huge dataset containing many rows without applying any filter could be a very lengthy and time consuming operation; and the WebAdmin could had eventually applied some automatic truncation criteria imposing an upper limit to the number of rows returned by a single query.
If this this is your actual case, you'll be warned by an explicit message that truncation actually happened. Repeating yet another time your query by applying a more selective filter is the most obvious solution.


Applying filters to your queries

filter-3
A filter effectively allows to selectively restrict the returned rows by applying some comparison criteria; only the rows positively matching that criteria will be inserted into the resultset. e.g. in this query we've imposed a filter selecting only the Local Councils belonging to the Province of Prato.

filter-03
You can freely choose between several different comparison operators.

filter-4
And you can eventually apply more filters at the same time: only the rows satisfying all filters will be inserted into the resultset.
Please note: you can add an arbitrary number of filters; just click the add button to add one more filter.
Selecting the any value comparison operator, or missing to specify a corresponding value to be compared disables the filters, which in this case will simply be ignored.
You can eventually click the help button in order to get a list of meaningful values to be used in some comparison.

filter-5
When you press the help button a floating window will appear showing the list of unique values corresponding to the currently selected column.
You simply have to click one of the items and the corresponding value will be automatically copied into the appropriate field of the main WEB page.
Caveat: even the help list of unique values could be eventually subject to truncation, if some upper limit was imposed by the WebAdmin.

filter-order-by
Finally you could wish to explicitly request to order the extracted rows accordingly to some criteria; in this case you simply have to select the appropriate column(s).


Downloading a dataset

filter-6
Once you've applied a satisfying set of filters and after verifying that the resultset exactly corresponds to your requirements, you can eventually download the resultset in one of the following standard formats: filter-7
Just select the export format of your choice, then press the go button; and the download will immediately start.
Every downloaded dataset will consist in a compressed ZipFile presenting a name of the following form:

dataset_20140427120853_9ab9dda606518d15996a89f6b20bdc64.zip


Aggregate queries

aggregate-1
dataSeltzer supports a second kind of queries; using an aggregate query you'll not get every single row from the input dataset (as in a plain query).
You'll get instead a single row for every packet of similar rows aggregated by some criteria, and you can eventually perform some useful computation on behalf of each aggregate/packet.
In this first example we'll use a Local Councils sample dataset: Please note: you can obviously download an aggregate resultset exactly as you can download any other ordinary resultset; but in this case Shapefile will never be a supported option.

An aggregate query supports a further interesting feature: you could eventually use one of the DrillDown hyperlinks in order to explore / explode all individual rows being grouped within the same aggregate packet.

aggregate-01
e.g. in this case dataSelzer will open a new HTML tab showing all Local Councils being grouped so to build the Province of Bari aggregate packet.


the GetUrl feature

geturl
By clicking the GetUrl button the full request URL (method GET) exactly corresponding to the current query will be shown.
This one is an useful option, because this way you can easily include a download service based on dataSeltzer on a different WEB page, thus further extending the usability of dataSeltzer-based services.

the hidden select argument

An extra argument exists: it's never directly accessible from the User Interface, but you could eventually manually add it to your request URLs of the filtered type (it's fully supported by the CGI component).
Just a quick explanation:
http://www.gaia-gis.it/cgi-bin/dataSeltzer?in=istat.it&vw=com2001_wgs_84&q=filter&cnt=1&c0=regione&x0=eq&v0=Toscana&fmt=html&go=go&select=regione,provincia,nome,popolaz
this first request URL will just return the regione, provincia, nome and popolaz columns exactly in this order.

http://www.gaia-gis.it/cgi-bin/dataSeltzer?in=istat.it&vw=com2001_wgs_84&q=filter&cnt=1&c0=regione&x0=eq&v0=Toscana&fmt=html&go=go&select=nome%20as%20comune,%20popolaz%20as%20%22pop_2011%22,%20femmine%20-%20maschi%20AS%20diff_m_f,%20provincia,%20regione
this second examples shows how you could eventually alter the relative column order, change the column names and eventually computing some expression.

http://www.gaia-gis.it/cgi-bin/dataSeltzer?in=istat.it&vw=com2001_wgs_84&q=filter&cnt=1&c0=regione&x0=eq&v0=Toscana&fmt=html&go=go&select=invalid-sql-syntax
If for any reason the &select=string do actually correspond to some invalid SQL syntax then an empty dataset will be returned.




Back to dataSeltzer documentation index

Credits
Development of dataSeltzer has been funded by Tuscany Region - Territorial and Environmental Information System
Regione Toscana - Settore Sistema Informativo Territoriale ed Ambientale.