Coding for Data Science and Data Management
A.Y. 2021/2022
Learning objectives
The course aims at providing technical skills about coding/scripting aspects for data analysis and to manage persistent data storage of sources and results involved in analysis. On the one side, the Python programming language and the R framework are illustrated. The goal is to deal with essential notions about data structures and control structures of both Python and R. On the other side, the goal is to present the core notions of relational databases, such as keys, integrity, and primary/foreign key constraints, as well as the SQL language for data definition, manipulation, and query. Recent and innovative NoSQL solutions are also discussed, with special focus on a document-oriented system called MongoDB.
Expected learning outcomes
Upon completion of the course, students will be able to:
- manage data using R and R Studio;
- solve coding challenges using R libraries and functions;
- make statistical inference and graphics using R;
- writing an apply family of functions in R;
- understand the Python data model and the flow control statements;
- use the built-in Python data structures;
- perform basic linear algebra operations using Numpy;
- perform basic data set manipulations using Pandas:
- perform simple machine learning experiments using Scikit-learn;
- understand and apply the core notions of data modeling in relational databases;
- use the SQL language for creating and querying relational database structures;
- understand and apply the principles of data organization in NoSQL systems;
- use MongoDB for data retrieval and aggregation in a document-oriented NoSQL system.
- manage data using R and R Studio;
- solve coding challenges using R libraries and functions;
- make statistical inference and graphics using R;
- writing an apply family of functions in R;
- understand the Python data model and the flow control statements;
- use the built-in Python data structures;
- perform basic linear algebra operations using Numpy;
- perform basic data set manipulations using Pandas:
- perform simple machine learning experiments using Scikit-learn;
- understand and apply the core notions of data modeling in relational databases;
- use the SQL language for creating and querying relational database structures;
- understand and apply the principles of data organization in NoSQL systems;
- use MongoDB for data retrieval and aggregation in a document-oriented NoSQL system.
Lesson period: Third trimester
Assessment methods: Esame
Assessment result: voto verbalizzato in trentesimi
Single course
This course cannot be attended as a single course. Please check our list of single courses to find the ones available for enrolment.
Course syllabus and organization
Single session
Responsible
Lesson period
Third trimester
The following recommendations are valid only if teaching restrictions are applied by the Public Authority and the University (lockdown) due to health security reasons.
Teaching methods:
Lectures will be given through the Microsoft Teams platform according to the official lecture scheduling (synchronous attendance). Moreover, lectures are recorded and made available via streaming on the Microsoft Teams platform (asynchronous attendance). The lecture scheduling and the latest news are published on the course website (Ariel platform).
Syllabus:
The syllabus as well as the bibliography are unchanged.
Assessment method and evaluation criteria:
A remote assessment modality is enforced according to the guidelines provided by the University and published on the course website (Ariel platform).
The exam structure and the evaluation criteria are unchanged.
Teaching methods:
Lectures will be given through the Microsoft Teams platform according to the official lecture scheduling (synchronous attendance). Moreover, lectures are recorded and made available via streaming on the Microsoft Teams platform (asynchronous attendance). The lecture scheduling and the latest news are published on the course website (Ariel platform).
Syllabus:
The syllabus as well as the bibliography are unchanged.
Assessment method and evaluation criteria:
A remote assessment modality is enforced according to the guidelines provided by the University and published on the course website (Ariel platform).
The exam structure and the evaluation criteria are unchanged.
Prerequisites for admission
No prerequisites.
Assessment methods and Criteria
The assessment method consists in a written exam on the syllabus of both coding for data science and data management units. The written exam is organized in:
- exercises on R scripts;
- quizzes on Python code fragments;
- open-ended questions on topics from data analysis;
- quizzes on i) relational data modeling and ii) NoSQL systems;
- exercises on the SQL language and find/aggregation queries in MongoDB.
The final result is expressed in thirtieths.
- exercises on R scripts;
- quizzes on Python code fragments;
- open-ended questions on topics from data analysis;
- quizzes on i) relational data modeling and ii) NoSQL systems;
- exercises on the SQL language and find/aggregation queries in MongoDB.
The final result is expressed in thirtieths.
Module Coding for Data Science
Course syllabus
The syllabus of the unit is about the following topics.
Python language:
- Introduction to the language;
- Data structures;
- Control flow;
- File I/O;
- Numpy;
- Pandas and Matplotlib;
- Scikit-learn.
Data management:
- Introduction to relational databases;
- Database and database systems (DBMS);
- The relational model;
- Data definition languages for databases;
- Data manipulation languages for databases;
- Queries with the SQL language;
- Simple queries and group queries with aggregate operators;
- Queries with set operators;
- Nested queries.
Python language:
- Introduction to the language;
- Data structures;
- Control flow;
- File I/O;
- Numpy;
- Pandas and Matplotlib;
- Scikit-learn.
Data management:
- Introduction to relational databases;
- Database and database systems (DBMS);
- The relational model;
- Data definition languages for databases;
- Data manipulation languages for databases;
- Queries with the SQL language;
- Simple queries and group queries with aggregate operators;
- Queries with set operators;
- Nested queries.
Teaching methods
Lectures are based on frontal teaching with the support of slides and handouts that are progressively published on the reference course website (Ariel platform). Throughout the lectures, classroom exercises are proposed and discussed to analyze pros and cons of different, possible solutions.
Lecture attendance is not mandatory, but it is strongly recommended.
Lecture attendance is not mandatory, but it is strongly recommended.
Teaching Resources
Python:
- Wes McKinney, Python for Data Analysis, 2nd Edition, O'Reilly Media, 2017.
Data management: choose the preferred book between the following alternatives:
- P. Atzeni, S. Ceri, S. Paraboschi, R. Torlone, Database Systems - Concepts, Languages and Architectures - Mc-Graw Hill, available on-line at http://dbbook.dia.uniroma3.it/.
- R. Elmasri, S.B. Navathe, Fundamentals of Database Systems, 7th edition, Pearson, 2015.
- Wes McKinney, Python for Data Analysis, 2nd Edition, O'Reilly Media, 2017.
Data management: choose the preferred book between the following alternatives:
- P. Atzeni, S. Ceri, S. Paraboschi, R. Torlone, Database Systems - Concepts, Languages and Architectures - Mc-Graw Hill, available on-line at http://dbbook.dia.uniroma3.it/.
- R. Elmasri, S.B. Navathe, Fundamentals of Database Systems, 7th edition, Pearson, 2015.
Module Data Management
Course syllabus
The syllabus of the unit is about the following topics.
R framework:
- Introduction to R framework and R Studio;
- Data structures: vectors, array, data.frames, lists, environments;
- Building functions;
- Generation of random numbers with R;
- Making plots and base Graphics with R and the package ggplot2;
- Data Manipulation with R;
- References to parallel computing with R;
- Introduction to Rcpp package;
- Building an interactive interface with shiny;
- Building R packages;
Data management:
- Introduction to NoSQL databases;
- Data models for NoSQL;
- Types of NoSQL;
- Comparison against the relational model;
- The "document-oriented" data model;
- The MongoDB system;
- Collection in MongoDB;
- Collection queries in MongoDB;
- Aggregation pipeline in MongoDB.
R framework:
- Introduction to R framework and R Studio;
- Data structures: vectors, array, data.frames, lists, environments;
- Building functions;
- Generation of random numbers with R;
- Making plots and base Graphics with R and the package ggplot2;
- Data Manipulation with R;
- References to parallel computing with R;
- Introduction to Rcpp package;
- Building an interactive interface with shiny;
- Building R packages;
Data management:
- Introduction to NoSQL databases;
- Data models for NoSQL;
- Types of NoSQL;
- Comparison against the relational model;
- The "document-oriented" data model;
- The MongoDB system;
- Collection in MongoDB;
- Collection queries in MongoDB;
- Aggregation pipeline in MongoDB.
Teaching methods
Lectures are based on frontal teaching with the support of slides and handouts that are progressively published on the reference course website (Ariel platform). Throughout the lectures, classroom exercises are proposed and discussed to analyze pros and cons of different, possible solutions.
Lecture attendance is not mandatory, but it is strongly recommended.
Lecture attendance is not mandatory, but it is strongly recommended.
Teaching Resources
Online resources and handouts provided by the teaching throughout the lectures.
Module Coding for Data Science
INF/01 - INFORMATICS - University credits: 6
Lessons: 40 hours
Professors:
Cesa Bianchi Nicolo' Antonio, Montanelli Stefano
Module Data Management
SECS-S/01 - STATISTICS - University credits: 6
Lessons: 40 hours
Professors:
Manzi Giancarlo, Montanelli Stefano
Educational website(s)
Professor(s)
Reception:
By appointment to be arranged by email
Room 7015, Dipartimento di Informatica "Giovanni degli Antoni", Via Celoria 18 - 20133 Milano