-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
172 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+193 KB
efforts/rubgonama/Toggl_Track_detailed_report_2024-01-01_2024-05-31.pdf
Binary file not shown.
Binary file added
BIN
+131 KB
efforts/rubgonama/Toggl_Track_summary_report_2024-01-01_2024-05-31.pdf
Binary file not shown.
10 changes: 10 additions & 0 deletions
10
front/src/routes/Integraciones-benvelben/crypto/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
front/src/routes/Integraciones-benvelben/music/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
front/src/routes/Integraciones-benvelben/preciosABNB/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<svelte:head> | ||
<script src="https://code.highcharts.com/highcharts.js"></script> | ||
<script src="https://code.highcharts.com/highcharts-more.js"></script> | ||
<script src="https://code.highcharts.com/modules/exporting.js"></script> | ||
<script src="https://code.highcharts.com/modules/export-data.js"></script> | ||
<script src="https://code.highcharts.com/modules/accessibility.js"></script> | ||
<script src="https://code.highcharts.com/modules/treemap.js"></script> | ||
<script src="https://code.highcharts.com/modules/area.js"></script> | ||
</svelte:head> | ||
|
||
<script> | ||
import { onMount } from 'svelte'; | ||
onMount(() => { | ||
}); | ||
let selectedMonth = new Date().getMonth() + 1; | ||
let chartData = []; | ||
async function fetchData() { | ||
const options = { | ||
method: 'GET', | ||
headers: { | ||
'X-RapidAPI-Key': '744984621cmsha5593e77613e5d0p103591jsn5d3532ea0b8f', | ||
'X-RapidAPI-Host': 'airbnb-listings.p.rapidapi.com' | ||
} | ||
}; | ||
try { | ||
const response = await fetch(`https://airbnb-listings.p.rapidapi.com/v2/listingPrices?id=619966061834034729&year=2024&month=${selectedMonth}`, options); | ||
const data = await response.json(); | ||
chartData = processData(data); | ||
renderChart(); | ||
} catch (error) { | ||
console.error('Error fetching data:', error); | ||
} | ||
} | ||
function processData(data) { | ||
return data.results.map(dayData => { | ||
return [Date.parse(dayData.date), dayData.price]; | ||
}); | ||
} | ||
function renderChart() { | ||
Highcharts.chart('chart-container', { | ||
chart: { | ||
type: 'area' | ||
}, | ||
title: { | ||
text: `Precios de Airbnb por día en ${getMonthName(selectedMonth)} de 2024 en Atlantic Panorama Ocean front. Garden & salt pool` | ||
}, | ||
xAxis: { | ||
type: 'datetime', | ||
labels: { | ||
formatter: function () { | ||
return Highcharts.dateFormat('%e', this.value); | ||
} | ||
} | ||
}, | ||
yAxis: { | ||
title: { | ||
text: 'Precio' | ||
} | ||
}, | ||
series: [{ | ||
name: 'Precio', | ||
data: chartData | ||
}], | ||
plotOptions: { | ||
area: { | ||
marker: { | ||
enabled: false | ||
} | ||
} | ||
}, | ||
credits: { | ||
enabled: false | ||
} | ||
}); | ||
} | ||
function getMonthName(month) { | ||
const months = ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre']; | ||
return months[month - 1]; | ||
} | ||
</script> | ||
|
||
<main> | ||
<h1>Selecciona un mes:</h1> | ||
<select bind:value={selectedMonth} on:change={fetchData}> | ||
{#each Array.from({ length: 12 }, (_, i) => i + 1) as month} | ||
<option value={month}>{getMonthName(month)}</option> | ||
{/each} | ||
</select> | ||
<div id="chart-container" style="height: 400px;"></div> | ||
</main> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters