Project description

‘L’Italia delle slot’ is a multifaceted inquiry into the increasing problem of slot machine addiction. In equal parts it is a piece of collaborative data-journalism and an interactive database.In 2014, "Il Tirreno" a Tuscan newspaper, together with the Dataninja launched a multi part "Toscana No Slot” inquiry. The intent was to analyze the concentration of slot machines in Tuscany. Then in 2015 thirteen local newspapers in collaboration with Dataninja, published a collective data survey on businesses authorized to install slot machines. It was a first photograph of the increasing number of business involved in the housing of Awards with Prize (AWP) machines and Video Lottery Terminals. (VLT). This is an issue dear to local newspapers and also to Dataninja because slot machines have become an unstoppable phenomenon in Italy, as has the rise in slot machine dependancy. To substantiate the claim that the rise in gaming venues also saw a rise in gambling dependancy it was necessary to have access to data and this is why in 2017, under the FOIA, Dataninja gained access to information pertaining to all slot machines in Italy.The data was obtained, verified and then transformed into a machine readable dataset, then it was used in two distinctive ways. Firstly extrapolation of specific areas were given to the local newspapers in order to allow them to draw conclusions specific to their territory. Secondly the dataset was imported into a db that could be interrogated on the web, this became ‘L’Italia delle Slot’.’L’Italia delle slot’ let’s the the user interrogate the database and consult an analysis on a national level.The main page is a simple form where the user can interrogate the db inputing the name of a town. The search returns data concerning the type and number of slot machines, the amount played per capita, the “virtuousness” and the national ranking of the municipality in terms of pro-capita plays. Further data includes the full number of slot machines installed in the municipality and total amount spent on the terminals. The data spans a two-year time frame (2015-2016).A second method for interacting with the db is to compare two towns. In this case data in terms of per capita expenditure, virtuousness of the towns, total plays and national ranking is displayed for each municipality.The analysis is divided into sections dedicated to national rankings and, in increasing complexity, the comparison of plays pro-capita and income and the number of machines on a pro-capita basis. This data is represented on a maps, scatterplots (searchable), lollipop graphs and bar charts.The user interface was designed (by Giacomo De Panfilis) so as to recall what would typically be associated with slot machines: black, fucsia, roller numbers and bright icons. Many iconographic references are used, for example: cherries instead of stars as an indicator of the virtuousness of a town.

What makes this project innovative?

For the first time in Italy, thanks to the Freedom of Information Act (FOIA) Dataninja were able to gain access to information regarding slot machines on the Italian territory. The data given to Dataninja consisted in a 10k page pdf. This huge pdf file was then transformed into a machine readable dataset, and then rendered on web in such a way that the end user, on the front-end, could interrogate the dataset. The search engine returns data for a single town and was also developed to interact with Plotly, positioning dynamically points on a scatterplot.

What was the impact of your project? How did you measure it?

Data on the spread of slot machines in Italy and the money spent on these machines had never been published before the release of “L’Italia delle slot". The attention, therefore, was immediately high. On the first day of launch about twenty other local newspapers had taken up the work with micro-local investigations. Public administrations and associations have used the data in their municipalities to raise awareness for gambling and game addiction. Some examples of the impact of this investigation: the municipality of Pavia has used the form to interrogate the db and obtain useful data for the municipal regulation on the limitation of the number of machines that can be installed in the city limits. An association in the province of Modena has organized a conference using the data to highlight the massive dissemination of slots. And finally many citizens wrote to the editors with pride because their municipality was not in the database and therefore they could be sure of being part of a "no slot” municipality. On social media, especially on Twitter using the hashtag #italiadelleslot, a parallel story was born with the voices of many people who discovered how rooted the problem was. Numerous requests for data for use by universities and researchers arrived.The day following the launch, the working group was invited to the House of Representatives to discuss the work, such was the interest in this topic (rif. https://video.gelocal.it/gelocal/cronaca/datajournalism-litalia-delle-slot-al-via-il-nuovo-lavoro-del-visual-lab-e-gruppo-gedi/82929/83331)

Source and methodology

Dataninja - have kept two letters written to the Agenzia dei Monopoli. The subject is the same: it is a request for access to data pertaining to slot machines in Italy. The Agency's response to the first letter was negative, while the second letter received a yes. This is mainly due to the fact that Dataninja made the second request for civic access based on the Freedom of Information Act (the Foia) that since December 23, 2016 allows all Italian citizens to request public administration documents, data and public documents. The documents were delivered in pdf format. Ten thousand pages of static, unusable tables.The data was extracted from the pdf in steps, using different softwares available on the market, while others were developed specifically for this particular task.1) The pdf file was divided into into single files of 1,000 pages each.2) The tables from each file were extracted using the command-line version (without graphical interface) of Tabula, a software developed specifically for extracting tables from pdf files. In this way we obtained, for each pdf document, two csv files (one in "stream" mode, the other in "lattice" mode). 3) The resulting csv files were concatenated to recompose the complete table (always in stream and lattice mode). 4) A script using Python was written to integrate the data in the two csv files (stream and lattice) and produced the final dataset. The dataset was cleaned using OpenRefine, an open source data cleaning software adding also the ISTAT (The National Institute for Statistics (Istat) ) codes to the geographical information (municipality, province, metropolitan city, region) through the official ISTAT datasets. Internal consistency of the data was verified (eg: rows of a column moved, fields broken on several lines, empty cells) and the last errors corrected using LibreOffice Calc. We verified the correctness of the data extracted with sample checks (comparison between table and original pdf) and comparing the counts at the level of municipality, province and region obtained from the table with the official Aams.

Technologies Used

Backend Technology We stored data from a csv file on a mysql DB. Then thanks to this data we calculated: - trend lines, using a linear regression function - median of the values represented in the ordinates - median of the values represented in the abscissasUsing the calculated values we generated the Plotly configuration sending the income and play values of each municipality aswell as the configuration for the graphics, fonts and colors.We used a mysql database, php as a server side language, and the Plotly framework for drawing the scatterplot. Further interactivity was added allowing the end user to interrogate the scatterplot. When the user inputs a municipality, a call is made to a webservice which, according to the ISTAT code, returns the value (in x and y) of the selected municipality, at which point a plotted call is made to update the position of the selected point Frontend The layout is responsive with 3 main breakpoints: - up to 767px, - from 768 to 1024px, - over 1024px. We used Less as a CSS pre-processor.Management of the interaction with the UI and the front-end is based on jQuery, in particular, with the help of jQuery we managed the UI for the autosuggest of the names of the municipalities. The data transfer from server to front-end is through the use of xhr method calls to a webservice written in php that returns a json with the related data. To make the numbers more comprehensible to Italian readers, we used the Numeral.js library. On the homepage the regional maps relating to the single municipality were realized using QGis. The other maps are custom designed and exported to SVG. The charts, lollipop and bar charts were designed in Illustrator and exported using the AI2HTML tool. On the comparison page, similarly to what has been done on the mainpage, a webservice is queried which returns the data of the two municipalities, which are then compared to calculate the ratio in percentage. The data is then shown in the form of a horizontal bar chart.

Project members

Gedi Lab (UX, F.E. and B.E. engineering) Giacomo De Panfilis (Graphic Design) DataNinja - Effecinque (DataScientists) GNN - Giornali Locali (Investigative Reporting) AGL - (Local Coordination)

Video

Link

Additional links

Project owner administration

Contributor username

Followers

Click Follow to keep up with the evolution of this project:
you will receive a notification anytime the project leader updates the project page.