هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.
$ مستخدم عادي# بصلاحية root (أو مع sudo)
What the course covers
How to ask an API for data and how to scrape a web page.
- How to clean the data and explore it with SQL and charts.
- How to build an interactive map and a dashboard.
- How to train a classifier that predicts a landing.
- How to present the results in a report and a presentation.
| Module | Main focus |
|---|---|
| Module 1 · about 4 hours | Introduction: project scenario, data collection with an API, web scraping, wrangling |
| Module 2 · about 2 hours | Exploratory Data Analysis (EDA): SQL queries and charts |
| Module 3 · about 3 hours | Interactive Visual Analytics and Dashboard: Folium map, Plotly Dash app |
| Module 4 · about 1 hour | Predictive Analysis (Classification): SVM, decision tree, logistic regression |
| Module 5 · about 4 hours | Present Your Data-Driven Insights: report, slides, final project |
Module 1: Introduction
Introduction: project scenario, data collection with an API, web scraping, wrangling.
- The capstone asks one question: will the Falcon 9 first stage land?
- A landed first stage can fly again. The course gives 62 million dollars for a SpaceX launch, against 165 million or more for other providers.
- A REST API sends data over HTTP. In Python:
requests.get(url), thenresponse.json(). - Web scraping reads a page and pulls out a table:
BeautifulSoup(html, "html.parser"), thenfind_all("td"). - Put the rows into a pandas DataFrame, with one row per launch.
Module 2: Exploratory Data Analysis (EDA)
Exploratory Data Analysis (EDA): SQL queries and charts.
- EDA means looking at the data before modelling: shape, missing values, ranges and groups.
- SQL:
SELECTpicks columns,WHEREfilters rows,GROUP BYgroups rows, andCOUNTorAVGsummarises. - Run SQL inside a notebook with a magic command, then read the result as a DataFrame.
- Charts help: bar charts compare groups, and scatter plots show two numbers together.
- Fix missing values and wrong data types before you train a model.
Module 3: Interactive Visual Analytics and Dashboard
Interactive Visual Analytics and Dashboard: Folium map, Plotly Dash app.
- Folium draws a map. Add a
folium.Markerfor each launch site. - MarkerCluster groups nearby markers, so the map stays clean.
- Distance to the coast, a road or a railway can matter for a landing.
- A Dash app has a layout and callbacks; a dropdown can filter the charts.
- A choropleth or a pie chart can show the success rate by site or by orbit.
Module 4: Predictive Analysis (Classification)
Predictive Analysis (Classification): SVM, decision tree, logistic regression.
- The label is 1 if the first stage landed, and 0 if it did not.
- Good features: payload mass, orbit, launch site, booster version and past successes.
- Split the data, then scale the features, for example with
StandardScaler. - Try logistic regression, SVM and a decision tree; compare the test accuracy.
- GridSearchCV searches the hyperparameters and returns the best model.
Module 5: Present Your Data-Driven Insights
Present Your Data-Driven Insights: report, slides, final project.
- A good report has a title, an introduction, the method, the results, a discussion and a conclusion.
- One message per slide. Use a chart instead of a wall of numbers.
- Say clearly what the data can and cannot prove.
- Deliverables: a GitHub repository with the notebooks and a presentation file.
- Check the rubric before you submit, and test that every link opens.
Check yourself
Answer each question first, then open it to check the answer.
1What is the main goal of the capstone project? a) Predict if the Falcon 9 first stage will land · b) Build a website · c) Write a SQL server · d) Study rocket fuel chemistry
a) Predict if the Falcon 9 first stage will land. The whole project predicts the landing of the Falcon 9 first stage.
2Why does a landed first stage matter? a) It makes the rocket heavier · b) It can be used again, which lowers the launch cost · c) It changes the fuel type · d) It slows the next launch
b) It can be used again, which lowers the launch cost. A reused first stage cuts the cost of the next launch.
3Which library sends an HTTP GET request in Python? a) folium · b) matplotlib · c) requests · d) sqlite3
c) requests. requests sends HTTP requests; response.json() parses the reply.
4Which library parses HTML when you scrape a web page? a) BeautifulSoup · b) NumPy · c) Dash · d) Seaborn
a) BeautifulSoup. BeautifulSoup finds and reads the HTML tags.
5What does response.json() return? a) An image · b) A CSV file · c) A database · d) The JSON body as Python data
d) The JSON body as Python data. It turns the JSON text into Python lists and dicts.
6Which pandas method counts the missing values in each column? a) df.head() · b) df.isnull().sum() · c) df.plot() · d) df.shape
b) df.isnull().sum(). isnull() marks missing cells and sum() counts them per column.
7Which SQL clause filters rows? a) GROUP BY · b) ORDER BY · c) JOIN · d) WHERE
d) WHERE. WHERE keeps only the rows that match a condition.
8Which SQL clause is used with COUNT to count rows in each group? a) GROUP BY · b) LIMIT · c) UPDATE · d) DELETE
a) GROUP BY. GROUP BY makes one group per value, then COUNT counts each group.
9Which library makes interactive maps with markers? a) PyTest · b) Folium · c) Flask · d) Requests
b) Folium. Folium builds interactive maps, and markers show places.
10What does train_test_split do? a) Splits the data into a training set and a test set · b) Trains the model · c) Plots the data · d) Cleans the column names
a) Splits the data into a training set and a test set. It returns four parts: X train, X test, y train, y test.
11What is GridSearchCV used for? a) Drawing a grid on a chart · b) Joining two tables · c) Trying many hyperparameters and keeping the best · d) Scraping a page
c) Trying many hyperparameters and keeping the best. It tries each combination in the grid and keeps the best score.
12In the classification model, what does the label 1 mean? a) The launch failed · b) The payload was heavy · c) The weather was bad · d) The first stage landed
d) The first stage landed. 1 means the first stage landed; 0 means it did not.
Study and exam tips
Learn the tool for each job: requests for APIs, BeautifulSoup for scraping, Folium for maps, Dash for dashboards.
- Know the SQL order:
SELECT...WHERE...GROUP BY. - Remember that the label is 1 for a landed first stage.
- Read the question twice before you answer.