QuantumCitizen is an educational software developed in Ruby that explores the integration of quantum random number generation and data extraction from a Human Development Index (HDI) dataset. This project combines the power of modern APIs with CSV data manipulation, enabling the analysis of specific indicators for various countries selected based on a quantum-generated value.
- ⚛️ Quantum Number Generation: Integrates the quantum random number generator API by the Australian National University (ANU).
- 📊 Dataset Analysis: Works with an HDI CSV dataset containing data from 1990 to 2021.
- 🧠 Quantum-Based Selection:
- The software uses quantum-generated values to select a country from the dataset.
- It calculates the "best available year" based on data completeness for the selected country.
- 🧩 Clear Interface: Provides a logical flow for querying, selection, and displaying relevant results.
- Ruby: Version 3.2.0
- CSV: Standard library for handling CSV files.
- ANU Quantum API: Used to generate truly random quantum values based on vacuum quantum fluctuations.
- Quantum Generation:
- The program queries the ANU API to obtain a random quantum number.
- Country Selection:
- The quantum number is used as an index to select a country from the dataset (modulo the total number of countries).
- Best Year Determination:
- The software evaluates available HDI data for the selected country and picks the most complete year.
- Data Extraction and Visualization:
- Displays the HDI and other key indicators for the selected country and year.
- Ruby (Version 3.2.0 or later): Install Ruby
- Git: To clone the repository.
- HDI CSV dataset (already included in the repository).
-
Clone the Repository
git clone https://github.com/tuusuario/QuantumCitizen.git cd QuantumCitizen
-
Obtain API key and SSL certificate
You need to create an account on the official site of ANU and generate your key https://quantumnumbers.anu.edu.au
Download a fresh SSL certificate from https://curl.se/ca/cacert.pem -
Set Up Environment Variables Create an .env file in the root directoy with the following content:
ANU_API_KEY=your_private_key
SSL_CERT_FILE_PATH=C:/your/local/route/cacert.pem
- Run the software
ruby main.rb
QuantumCitizen/
│
├── dataset/
│ └── HDI.csv # HDI dataset (1990-2021)
│
├── lib/
│ ├── country_data.rb # Module for dataset manipulation
│ ├── quantum_generator.rb # Module for quantum API integration
│ └── visualizer.rb # Optional module for future visualizations
│
├── spec/ # Tests (in development)
├── .env # Environment variables
├── main.rb # Main program entry point
├── Gemfile # Dependencies (no external gems in this project)
├── LICENSE # BSD-3 License
└── README.md # Project documentation
The HDI.csv file contains human development data from 1990 to 2021, including:
- ISO3: Country code.
- Country: Country name.
- HDI Rank (2021): Human Development Index rank for 2021.
- Human Development Index (by year): Human Development Index values.
- Life Expectancy at Birth (by year): Life expectancy at birth.
- Run the program with rub main.rb
- The software will generate a quantum number
- Using the number, it will select a country from the dataset
- It will identify the best available year and display the HDI and other key indicators
This project is licensed under the tems of the BSD-3 Clause License
See the LICENSE file for more details
Contibutions are welcome! Follow these steps:
-
Fork the Project
-
Create a feature branch:
git checkout -b feature/new-feature
-
Make your changes and commit them
-
Open a Pull Request!
-
Data visualization: Add graphs using Plotly or similar libraries
-
New Dataset Integrations: Expand the analysis to other HDI metrics