import { useState } from 'react'
import Head from 'next/head'
import Navbar from '../components/Navbar'
import Footer from '../components/Footer'
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts'
const chinaBondData = [
{ month: '2024-01', oneYear: 1.85, fiveYear: 2.45, tenYear: 2.65 },
{ month: '2024-02', oneYear: 1.82, fiveYear: 2.42, tenYear: 2.62 },
{ month: '2024-03', oneYear: 1.78, fiveYear: 2.38, tenYear: 2.58 },
{ month: '2024-04', oneYear: 1.75, fiveYear: 2.35, tenYear: 2.55 },
{ month: '2024-05', oneYear: 1.72, fiveYear: 2.32, tenYear: 2.52 },
{ month: '2024-06', oneYear: 1.68, fiveYear: 2.28, tenYear: 2.48 },
{ month: '2024-07', oneYear: 1.65, fiveYear: 2.25, tenYear: 2.45 },
{ month: '2024-08', oneYear: 1.62, fiveYear: 2.22, tenYear: 2.42 },
{ month: '2024-09', oneYear: 1.58, fiveYear: 2.18, tenYear: 2.38 },
{ month: '2024-10', oneYear: 1.55, fiveYear: 2.15, tenYear: 2.35 },
{ month: '2024-11', oneYear: 1.52, fiveYear: 2.12, tenYear: 2.32 },
{ month: '2024-12', oneYear: 1.48, fiveYear: 2.08, tenYear: 2.28 }
]
const usBondData = [
{ month: '2024-01', oneYear: 4.85, fiveYear: 4.25, tenYear: 3.95 },
{ month: '2024-02', oneYear: 4.82, fiveYear: 4.22, tenYear: 3.92 },
{ month: '2024-03', oneYear: 4.78, fiveYear: 4.18, tenYear: 3.88 },
{ month: '2024-04', oneYear: 4.65, fiveYear: 4.05, tenYear: 3.75 },
{ month: '2024-05', oneYear: 4.55, fiveYear: 3.95, tenYear: 3.65 },
{ month: '2024-06', oneYear: 4.45, fiveYear: 3.85, tenYear: 3.55 },
{ month: '2024-07', oneYear: 4.35, fiveYear: 3.75, tenYear: 3.45 },
{ month: '2024-08', oneYear: 4.25, fiveYear: 3.65, tenYear: 3.35 },
{ month: '2024-09', oneYear: 4.15, fiveYear: 3.55, tenYear: 3.25 },
{ month: '2024-10', oneYear: 4.05, fiveYear: 3.45, tenYear: 3.15 },
{ month: '2024-11', oneYear: 3.95, fiveYear: 3.35, tenYear: 3.05 },
{ month: '2024-12', oneYear: 3.85, fiveYear: 3.25, tenYear: 2.95 }
]
const chinaLPRData = [
{ month: '2024-01', oneYear: 3.45, fiveYear: 3.95 },
{ month: '2024-02', oneYear: 3.45, fiveYear: 3.95 },
{ month: '2024-03', oneYear: 3.45, fiveYear: 3.95 },
{ month: '2024-04', oneYear: 3.40, fiveYear: 3.90 },
{ month: '2024-05', oneYear: 3.40, fiveYear: 3.90 },
{ month: '2024-06', oneYear: 3.40, fiveYear: 3.90 },
{ month: '2024-07', oneYear: 3.35, fiveYear: 3.85 },
{ month: '2024-08', oneYear: 3.35, fiveYear: 3.85 },
{ month: '2024-09', oneYear: 3.35, fiveYear: 3.85 },
{ month: '2024-10', oneYear: 3.30, fiveYear: 3.80 },
{ month: '2024-11', oneYear: 3.30, fiveYear: 3.80 },
{ month: '2024-12', oneYear: 3.30, fiveYear: 3.80 }
]
// 中国黄金储备月度数据(单位:吨)
const chinaGoldReserveMonthly = [
{ month: '2024-01', reserves: 2245.4 },
{ month: '2024-02', reserves: 2255.2 },
{ month: '2024-03', reserves: 2267.5 },
{ month: '2024-04', reserves: 2276.9 },
{ month: '2024-05', reserves: 2285.3 },
{ month: '2024-06', reserves: 2296.1 },
{ month: '2024-07', reserves: 2305.8 },
{ month: '2024-08', reserves: 2316.2 },
{ month: '2024-09', reserves: 2325.7 },
{ month: '2024-10', reserves: 2336.5 },
{ month: '2024-11', reserves: 2345.9 },
{ month: '2024-12', reserves: 2356.3 }
]
// 美国黄金储备月度数据(单位:吨)
const usGoldReserveMonthly = [
{ month: '2024-01', reserves: 8133.5 },
{ month: '2024-02', reserves: 8133.5 },
{ month: '2024-03', reserves: 8133.5 },
{ month: '2024-04', reserves: 8133.5 },
{ month: '2024-05', reserves: 8133.5 },
{ month: '2024-06', reserves: 8133.5 },
{ month: '2024-07', reserves: 8133.5 },
{ month: '2024-08', reserves: 8133.5 },
{ month: '2024-09', reserves: 8133.5 },
{ month: '2024-10', reserves: 8133.5 },
{ month: '2024-11', reserves: 8133.5 },
{ month: '2024-12', reserves: 8133.5 }
]
// 中国黄金储备年度数据(单位:吨)
const chinaGoldReserveYearly = [
{ year: '2019', reserves: 1948.3 },
{ year: '2020', reserves: 1948.3 },
{ year: '2021', reserves: 1948.3 },
{ year: '2022', reserves: 1948.3 },
{ year: '2023', reserves: 2190.2 },
{ year: '2024', reserves: 2356.3 }
]
// 美国黄金储备年度数据(单位:吨)
const usGoldReserveYearly = [
{ year: '2019', reserves: 8133.5 },
{ year: '2020', reserves: 8133.5 },
{ year: '2021', reserves: 8133.5 },
{ year: '2022', reserves: 8133.5 },
{ year: '2023', reserves: 8133.5 },
{ year: '2024', reserves: 8133.5 }
]
// 猪肉价格数据(单位:元/公斤)
const porkPriceData = [
{ month: '2023-01', price: 24.5 },
{ month: '2023-02', price: 25.2 },
{ month: '2023-03', price: 26.8 },
{ month: '2023-04', price: 27.5 },
{ month: '2023-05', price: 28.3 },
{ month: '2023-06', price: 29.1 },
{ month: '2023-07', price: 28.5 },
{ month: '2023-08', price: 27.8 },
{ month: '2023-09', price: 26.5 },
{ month: '2023-10', price: 25.8 },
{ month: '2023-11', price: 25.2 },
{ month: '2023-12', price: 24.8 },
{ month: '2024-01', price: 24.5 },
{ month: '2024-02', price: 25.1 },
{ month: '2024-03', price: 25.8 },
{ month: '2024-04', price: 26.5 },
{ month: '2024-05', price: 27.2 },
{ month: '2024-06', price: 27.8 },
{ month: '2024-07', price: 28.5 },
{ month: '2024-08', price: 29.2 },
{ month: '2024-09', price: 28.8 },
{ month: '2024-10', price: 28.2 },
{ month: '2024-11', price: 27.5 },
{ month: '2024-12', price: 26.8 }
]
// 能繁母猪数量数据(单位:万头)
const sowInventoryData = [
{ month: '2023-01', inventory: 4321 },
{ month: '2023-02', inventory: 4356 },
{ month: '2023-03', inventory: 4389 },
{ month: '2023-04', inventory: 4423 },
{ month: '2023-05', inventory: 4456 },
{ month: '2023-06', inventory: 4489 },
{ month: '2023-07', inventory: 4523 },
{ month: '2023-08', inventory: 4556 },
{ month: '2023-09', inventory: 4589 },
{ month: '2023-10', inventory: 4623 },
{ month: '2023-11', inventory: 4656 },
{ month: '2023-12', inventory: 4689 },
{ month: '2024-01', inventory: 4723 },
{ month: '2024-02', inventory: 4756 },
{ month: '2024-03', inventory: 4789 },
{ month: '2024-04', inventory: 4823 },
{ month: '2024-05', inventory: 4856 },
{ month: '2024-06', inventory: 4889 },
{ month: '2024-07', inventory: 4923 },
{ month: '2024-08', inventory: 4956 },
{ month: '2024-09', inventory: 4989 },
{ month: '2024-10', inventory: 5023 },
{ month: '2024-11', inventory: 5056 },
{ month: '2024-12', inventory: 5089 }
]
export default function Data() {
const [selectedIndicator, setSelectedIndicator] = useState('bond-china-treasury')
const indicators = [
{
group: '债券',
items: [
{ id: 'bond-china-treasury', name: '中国国债' },
{ id: 'bond-us-treasury', name: '美国国债' }
]
},
{
group: '贷款',
items: [
{ id: 'loan-china-lpr', name: '中国LPR' }
]
},
{
group: '央行数据',
items: [
{ id: 'central-bank-china-gold-monthly', name: '中国黄金储备(月)' },
{ id: 'central-bank-us-gold-monthly', name: '美国黄金储备(月)' },
{ id: 'central-bank-china-gold-yearly', name: '中国黄金储备(年)' },
{ id: 'central-bank-us-gold-yearly', name: '美国黄金储备(年)' }
]
},
{
group: '商品',
items: [
{ id: 'commodity-pork-price', name: '猪肉价格' },
{ id: 'commodity-sow-inventory', name: '能繁母猪数量' }
]
}
]
return (
数据 - iBoard
经济数据
各种经济数据和图表
{indicators.map((group, groupIndex) => (
{group.group}
{group.items.map((item) => (
- setSelectedIndicator(item.id)}
>
{item.name}
))}
))}
{selectedIndicator === 'bond-china-treasury' && (
中国国债收益率走势
展示一年期、五年期、十年期国债收益率的变化趋势
详细数据
| 月份 |
一年期(%) |
五年期(%) |
十年期(%) |
{chinaBondData.map((row, index) => (
| {row.month} |
{row.oneYear.toFixed(2)} |
{row.fiveYear.toFixed(2)} |
{row.tenYear.toFixed(2)} |
))}
)}
{selectedIndicator === 'bond-us-treasury' && (
美国国债收益率走势
展示一年期、五年期、十年期国债收益率的变化趋势
详细数据
| 月份 |
一年期(%) |
五年期(%) |
十年期(%) |
{usBondData.map((row, index) => (
| {row.month} |
{row.oneYear.toFixed(2)} |
{row.fiveYear.toFixed(2)} |
{row.tenYear.toFixed(2)} |
))}
)}
{selectedIndicator === 'loan-china-lpr' && (
中国LPR走势
展示一年期和五年期贷款市场报价利率(LPR)的变化趋势
详细数据
| 月份 |
一年期LPR(%) |
五年期LPR(%) |
{chinaLPRData.map((row, index) => (
| {row.month} |
{row.oneYear.toFixed(2)} |
{row.fiveYear.toFixed(2)} |
))}
)}
{selectedIndicator === 'central-bank-china-gold-monthly' && (
中国黄金储备(月度)
展示中国央行黄金储备的月度变化趋势
详细数据
| 月份 |
黄金储备(吨) |
{chinaGoldReserveMonthly.map((row, index) => (
| {row.month} |
{row.reserves.toFixed(1)} |
))}
)}
{selectedIndicator === 'central-bank-us-gold-monthly' && (
美国黄金储备(月度)
展示美国央行黄金储备的月度变化趋势
详细数据
| 月份 |
黄金储备(吨) |
{usGoldReserveMonthly.map((row, index) => (
| {row.month} |
{row.reserves.toFixed(1)} |
))}
)}
{selectedIndicator === 'central-bank-china-gold-yearly' && (
中国黄金储备(年度)
展示中国央行黄金储备的年度变化趋势
详细数据
| 年份 |
黄金储备(吨) |
{chinaGoldReserveYearly.map((row, index) => (
| {row.year} |
{row.reserves.toFixed(1)} |
))}
)}
{selectedIndicator === 'central-bank-us-gold-yearly' && (
美国黄金储备(年度)
展示美国央行黄金储备的年度变化趋势
详细数据
| 年份 |
黄金储备(吨) |
{usGoldReserveYearly.map((row, index) => (
| {row.year} |
{row.reserves.toFixed(1)} |
))}
)}
{selectedIndicator === 'commodity-pork-price' && (
猪肉价格
展示中国猪肉价格的月度变化趋势
详细数据
| 月份 |
猪肉价格(元/公斤) |
{porkPriceData.map((row, index) => (
| {row.month} |
{row.price.toFixed(1)} |
))}
)}
{selectedIndicator === 'commodity-sow-inventory' && (
能繁母猪数量
展示中国能繁母猪数量的月度变化趋势
详细数据
| 月份 |
能繁母猪数量(万头) |
{sowInventoryData.map((row, index) => (
| {row.month} |
{row.inventory} |
))}
)}
)
}