DS Portfolio

Chris Brierley

Week 1 - Getting Started

This is the first of 3 charts embedded into my website. The first two were given to us in class, while the third chart was taken from the RapidCharts GitHub repository.

Chart 1 looks at how many Covid-19 cases were reported across different UK regions.

Files used:

chart1_covidUKRegions.json

Chart 2 shows how UK productivity has changed between 1971 and 2021.

Files used:

chart2_ukProductivity.json

The third chart shows how the price of ETH has changed since 2016. Use the start/end year sliders to change the time period shown for the chart.

Files used:

chart3_ether.json

Week 2 - Hosting Data

I learned this week two key routes of accessing data: using an API and saving CSV files to my GitHub repository.

This chart uses the UK Government's Coronavirus API to show how the number of new cases has changed in my home county, my nearest city as well as my university city.

Files used:

chart4_API.json

Using the same regions as before, this chart now uses CSV data saved to my GitHub repository that shows how each region has issued second doses of Covid-19 vaccinations.

Files used:

chart5_raw.json

cum_second_jab.csv

Week 3 - Editing data and writing JSON by hand

This week involved using "in-line" JSON data that I wrote, as well as manipulating CSV data stored locally in my GitHub repository.

This chart displays my manually inputted data on UK labour productivity between 2000 and 2010.

Files used:

chart6_productivity.json

In this next chart, I manipulated two World Bank data sets - one for population and one for GDP in constant 2010 US$, and combined them to find the GDP per capita for Brazil between 1960 and 2020.

Files used:

chart7_brazilGDP.json

Brazil_GDP.csv

Week 4 - API driven charts

I have signed up and gained access to new, separate APIs that have not been used so far in my portfolio.

Using the Alpha Vantage API, I gathered data on the share price at close of Coca-Cola since 2000.

Files used:

chart8_CocaColaAPI.json

I have also used the UK Police API to gather data on the amount and type of crimes committed in Haywards Heath.

Files used:

chart9_Crime.json

Week 5 - Using Python loops to make multiple downloads from APIs

I built my first mini-dashboard this week, whereby I used loops on Python to download data from four datasets within the FRED API.

The first of these four charts looks at Brazil's Consumer Price Index over time.

Files used:

chart10_BrazilCPI.json

FREDweek5.ipynb

BrazilCPI.json

The second chart now shows the exchange rate between Brazilian Reals to One U.S. Dollar.

Files used:

chart11_BrazilEX.json

FREDweek5.ipynb

BrazilEX.json

This chart now looks at Japan's Consumer Price Index over time.

Files used:

chart12_JapanCPI.json

FREDweek5.ipynb

JapanCPI.json

The final chart shows Japan's unemployment rate.

Files used:

chart13_JapanUnemployment.json

FREDweek5.ipynb

JapanUnemployment.json

Week 6&7 - Using Scrapers

This week, I scraped an Olympic medal table from Wikipedia using Pandas in Python to find relevant data to then chart, as I have done below

Files used:

chart14_medals.json

Wiki_Scraper.ipynb

medal_table.csv

Week 8 - Talking Economics Conference

Anna Valero from LSE's Centre for Economic Performance stated that "We have seen a decrease in the volume of on-the-job training and workers". After finding data on the number of workers who received job-related training from the ONS, we can see that this was true from the start of the pandemic (Q2 2020), but numbers have now returned to even beyond pre-pandemic levels.

chart15_training.json

Training_Data.csv

Week 9 - Advanced Analytics

This week, I used python to combine multiple datasets for the stock prices of firms on the "Olympic Partner Programme" for the last year. I then ran a linear regression in Vega-Lite to see whether the stock price of Coca-Cola affects that for P&G. This yielded an R-squared coefficient of 0.63, implying that 63% of variation in the stock price of P&G is explained by the stock price of Coca-Cola.

Files used:

chart16_regression.json

Stock_Regression.ipynb

sponsor_stocks.csv

Week 10 - Interactive Charts

This week, I made two fully interactive charts using the Vega-Lite gallery. The first one highlights the series you hover over or select, while greying out all other series in the chart. Hovering over a line also reveals what stock you are looking at via the tooltip.

Files used:

chart17_stocks.json

Stock_Regression.ipynb

project_sponsorship.csv

This chart uses sliders that can change the minimum and maximum medals won at the Tokyo Olympics. The size of the bubble changes depending on how many athletes competed for that country at the Olympics, and the colour displays how many gold medals the country won.

Files used:

chart18_TokyoMedals.json

London.ipynb

Rio.ipynb

TokyoMedals.ipynb

Tokyo2020Data.csv