Compare commits

...

5 Commits

Author SHA1 Message Date
Sam 10666a91ad Add indentation to list items on home-page 2024-08-06 12:06:13 +01:00
Sam 57864ee00d Change bitlab21 to baseddata 2024-08-06 12:05:55 +01:00
Sam 14cf9f8fce Rename data-analysis to data-lab 2024-08-06 12:05:26 +01:00
Sam 4a202ef136 Install echarts in charts partial 2024-08-06 12:04:37 +01:00
Sam 5b8d0e08bc Modify js charts to use standard js 2024-08-06 12:03:42 +01:00
18 changed files with 95 additions and 52 deletions

View File

@ -1,8 +1,10 @@
# Bitlab21
# basedData.io
Welcome to Bitlab21! My name is Sam Chance, and this is my personal site.
My name is Sam Chance, and this is my personal site.
I host various content here that interests me.
I am an professional Analytics Engineer with a passion for working with data.
I build data pipelines for analytical projects, some of which I host on this site.
Feel free to look around. If you have any questions, then you can email me on *contact@sjplab.com*.
@ -12,32 +14,30 @@ This site is still very much under construction.
### Shortcuts to some of my work:
[Bitcoin metrics](/bitcoin) A selection of charts and metrics obtained from public data
- [basedData Data Lab](/data-lab) A selection of charts and metrics obtained from public data
[Semita Maps](https://semitamaps.com) A free map printing service based on Openstreetmaps
- [Map Printing Service](https://semitamaps.com) A free map printing service based on Openstreetmaps
[Code base](https://git.bitlab21.com) My personal self-hosted git repo using Gitea
- [Code base](https://git.bitlab21.com) My personal self-hosted git repo using Gitea
[Nixos config](https://git.bitlab21.com/sam/nixos) My Nixos configuration
[Recipes](/recipes) My personal recipe book
- [Nixos config](https://git.bitlab21.com/sam/nixos) My Nixos configuration
### Software I use:
[**Neovim**](https://neovim.io/) for text editing (my neovim config is part of my [nixos](https://git.bitlab21.com/sam/nixos) configuration)
- [**Neovim**](https://neovim.io/) for text editing (my neovim config is part of my [nixos](https://git.bitlab21.com/sam/nixos) configuration)
I use **Linux** on all my machines
- I use **Linux** on all my machines
**Nixos** and **Arch Linux** are my Linux distros of choice
- **Nixos** and **Arch Linux** are my Linux distros of choice
[**dwm**](https://dwm.suckless.org) is my window manager (my dwm [config](https://git.bitlab21.com/sam/dwm))
- [**dwm**](https://dwm.suckless.org) is my window manager (my dwm [config](https://git.bitlab21.com/sam/dwm))
[**st**](https://st.suckless.org) is my terminal emulator (my st [config](https://git.bitlab21.com/sam/st))
- [**st**](https://st.suckless.org) is my terminal emulator (my st [config](https://git.bitlab21.com/sam/st))
I use [**QGIS**](https://www.qgis.org/) and [**Postgis**](https://postgis.net/) for geospatial work
- I use [**QGIS**](https://www.qgis.org/) and [**Postgis**](https://postgis.net/) for geospatial work
[**DBT**](https://github.com/dbt-labs/dbt-core) for data modelling
- [**DBT**](https://github.com/dbt-labs/dbt-core) for data modelling
[**Postgres**](https://www.postgresql.org/) is my relational database of choice to power my backends
- [**Postgres**](https://www.postgresql.org/) is my relational database of choice to power my backends
[**Hugo**](https://gohugo.io/) to build this [**website**](https://git.bitlab21.com/sam/bitlab21.com)
- [**Hugo**](https://gohugo.io/) to build this [**website**](https://git.bitlab21.com/sam/bitlab21.com)

View File

@ -1,5 +0,0 @@
---
title: "Data Lab"
---
Welcome to the __Data Lab__. Here I present a collection of different data-driven projects I've worked on.

View File

@ -0,0 +1,5 @@
---
title: "basedData Data Lab"
---
Welcome to the basedData __Data Lab__. Here I present a collection of different data-driven projects I've worked on.

View File

@ -1,5 +1,5 @@
baseURL = 'https://bitlab21.com/'
baseURL = 'https://baseddate.io/'
languageCode = 'en-gb'
title = 'Bitlab21'
title = 'baseddata.io'
markup.highlight.noClasses=false

View File

@ -1,3 +1,4 @@
<script src="https://cdn.jsdelivr.net/npm/echarts@5.5.1/dist/echarts.min.js"></script>
<div id="chart">
<canvas id="{{ .id }}"></canvas>
<script src="{{ .src }}"></script>

View File

@ -1,7 +1,7 @@
<header>
<nav class="navbar" role="navigation">
<div class="navbar__left">
<a href="/"><strong>Bitlab21.com</strong></a>
<a href="/"><strong>basedData.io</strong></a>
</div>
<div class="navbar__right">
<div class="navbar-links">{{ partial "navbarlinks.html" . }}</div>

View File

@ -3,7 +3,7 @@
<li class="navbar_link_dropdown">
<a href="#" class="dropbtn">Projects</a>
<div class="navbar-link-dropdown-content">
<a href="/data-analysis">Data Analysis</a>
<a href="/data-lab">Data Lab</a>
<a href="https://semitamaps.com">Map Printing</a>
</div>
</li>

View File

@ -112,6 +112,11 @@ a:hover {
align-items: flex-start;
}
.home-page li {
left: 25px;
position: relative;
}
.profile-img {
margin-right: 20px;
margin-left: 20px;

View File

@ -1,13 +1,21 @@
let dataArr = [];
const myChart = echarts.init(document.getElementById("chart"));
$.get("https://api.bitlab21.com/price", {}, (response) => {
dataArr = response;
console.log(dataArr);
initEchart();
});
async function fetchDataForChart() {
try {
const apiEndpoint = "https://api.bitlab21.com/price";
const response = await fetch(apiEndpoint);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const dataArr = await response.json();
initEchart(dataArr);
} catch (error) {
console.error("Fetching data failed:", error);
}
}
function initEchart() {
function initEchart(dataArr) {
const option = {
backgroundColor: backgroundColor,
tooltip: {
@ -56,3 +64,5 @@ function initEchart() {
myChart.setOption(option);
}
fetchDataForChart();

View File

@ -97,7 +97,7 @@ function nFormatter(value, digits) {
: "0";
}
$(window).on("resize", function () {
window.addEventListener("resize", function () {
if (myChart != null && myChart != undefined) {
myChart.resize();
}

View File

@ -1,13 +1,21 @@
let dataArr = [];
const myChart = echarts.init(document.getElementById("chart"));
$.get("https://api.bitlab21.com/feerates", {}, (response) => {
dataArr = response;
console.log(dataArr);
initEchart();
});
async function fetchDataForChart() {
try {
const apiEndpoint = "https://api.bitlab21.com/feerates";
const response = await fetch(apiEndpoint);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const dataArr = await response.json();
initEchart(dataArr);
} catch (error) {
console.error("Fetching data failed:", error);
}
}
function initEchart() {
function initEchart(dataArr) {
const option = {
backgroundColor: backgroundColor,
tooltip: {
@ -99,3 +107,4 @@ function initEchart() {
myChart.setOption(option);
}
fetchDataForChart();

View File

@ -1,13 +1,21 @@
let dataArr = [];
const myChart = echarts.init(document.getElementById("chart"));
$.get("https://api.bitlab21.com/hashrate", {}, (response) => {
dataArr = response;
console.log(dataArr);
initEchart();
});
async function fetchDataForChart() {
try {
const apiEndpoint = "https://api.bitlab21.com/hashrate";
const response = await fetch(apiEndpoint);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const dataArr = await response.json();
initEchart(dataArr);
} catch (error) {
console.error("Fetching data failed:", error);
}
}
function initEchart() {
function initEchart(dataArr) {
const option = {
backgroundColor: backgroundColor,
tooltip: {
@ -106,3 +114,4 @@ function initEchart() {
myChart.setOption(option);
}
fetchDataForChart();

View File

@ -1,13 +1,21 @@
let dataArr = [];
const myChart = echarts.init(document.getElementById("chart"));
$.get("https://api.bitlab21.com/miner_rewards", {}, (response) => {
dataArr = response;
console.log(dataArr);
initEchart();
});
async function fetchDataForChart() {
try {
const apiEndpoint = "https://api.bitlab21.com/miner_rewards";
const response = await fetch(apiEndpoint);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const dataArr = await response.json();
initEchart(dataArr);
} catch (error) {
console.error("Fetching data failed:", error);
}
}
function initEchart() {
function initEchart(dataArr) {
const option = {
backgroundColor: backgroundColor,
tooltip: {
@ -138,3 +146,4 @@ checkboxLog.addEventListener("change", (e) => {
dataZoom: dataZoom((start = isChecked ? 0 : 90)),
});
});
fetchDataForChart();