日本語のREADMEはこちらです: README.ja.md
A system that analyzes visitor survey data using GPT models to generate professional, actionable tourism consulting advice for businesses in Fukui Prefecture, Japan.
https://code4fukui.github.io/fukui-kanko-advice/
This project automates the process of tourism consulting by following a simple data pipeline:
- Fetch Data: It retrieves the latest visitor feedback from the FTAS (Fukui Tourism Area Survey) Open Data project.
- Analyze with AI: For each tourist area, recent survey responses are compiled and sent to a GPT model via the OpenAI API with a prompt asking it to act as a professional tourism consultant.
- Generate Advice: The AI analyzes the feedback and generates a report with prioritized, actionable improvement points.
- Archive & Publish: The generated advice is saved as a JSON file and published to a static HTML website, allowing anyone to browse the insights by area and time period.
- AI-Powered Analysis: Uses GPT models to analyze raw survey data and generate professional consulting reports.
- Data-Driven Recommendations: Bases all advice on actual visitor feedback, identifying recurring issues and opportunities.
- Automated Workflow: Scripts automate the entire process from data fetching to generating and publishing the final HTML pages.
- Interactive Web Interface: A clean, static web interface allows users to browse advice by prefecture region, city, and survey period.
- Data Archiving: Automatically creates and indexes downloadable JSON files for all generated advice, creating a historical record of insights.
- Deno (JavaScript/TypeScript runtime)
- An OpenAI API key
-
Clone the repository:
git clone https://github.com/code4fukui/fukui-kanko-advice.git cd fukui-kanko-advice -
Set up your environment: Create a
.envfile in the root directory and add your OpenAI API key:OPENAI_API_KEY=your_openai_api_key_here
The project includes several Deno scripts to manage the data and build the site.
# Run the full pipeline: generate new advice, update the index, and build HTML
deno run --allow-net --allow-read --allow-write --env make.js
# --- Individual Scripts ---
# Generate new advice for areas with recent survey responses
# (Saves output to data/advice-YYYY-MM-DD.json)
deno run --allow-net --allow-read --allow-write --env make.js
# Create or update the advice index from the /data directory
# (Generates advice-list.json)
deno run --allow-net --allow-read --allow-write makeList.js
# Generate all HTML pages from the current advice data
# (Generates index.html and area/*.html)
deno run --allow-net --allow-read --allow-write makeHTML.js
# Test the core AI advice generation logic with sample data
deno run --allow-net --env make.test.js- Survey Data: FTAS (Fukui Tourism Area Survey) Open Data
- Advice Generation: OpenAI API
- Data Source: CC BY Fukui Tourism Association
- Code: MIT License
- AI API: Subject to OpenAI terms of use
