Download task_025/instruction.md from Lego-X/UXInteract: direct link, hf CLI and curl.
- Browser
- Download file 2.62 kB
-
https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_025/instruction.md
- Command line
-
hf download hf://datasets/Lego-X/UXInteract/task_025/instruction.md
-
curl -L -o instruction.md https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_025/instruction.md
Gapminder population and longevity report
Write an offline Python analysis of gapminderDataFiveYear.csv in the project root. Provide a runnable entry script (for example main.py or solve.py) and generate a JSON export and a directly openable report.html beside the input. If there is more than one root Python file and no unique main.py or solve.py, write the entry script’s filename on one line in entrypoint.txt. You can also use that file to select a different entry explicitly.
Calculations
Export one JSON record for each 2007 country. Keep every original CSV column under its original name and preserve its value, including country, year, pop, continent, lifeExp, gdpPercap, and gdpTotal. Equivalent number formats and numeric strings are accepted for numeric columns. Add a separate gdp_per_capita field computed as gdpTotal / pop; it should agree with gdpPercap. Compute the arithmetic mean 2007 population for each continent. Compare the same country's population in 1952 and 2007 and identify the country with the largest absolute increase in people, not the largest percentage growth.
Report interface
- Use an SVG with
id="gdp-life-scatter"for one mark per 2007 country. Marks carrydata-country,data-continent,data-gdp, anddata-life. Use per-capita GDP on the x-axis (linear or explicitly labeled log) and life expectancy on the linear y-axis, increasing rightward and upward. Show numeric ticks and visible labels with IDsgdp-axis-labelandlife-axis-label. In the visible legend withid="continent-legend", use one labeleddata-continententry per continent, with its text color or SVG fill matching the distinct color of its marks. - Display the means in
<table id="continent-population">and<svg id="continent-population-bars">. Each data row and bar carriesdata-continentanddata-mean-pop. Use one<rect>per continent with numericwidthandheight; reserve rectangles in this SVG for bars. Draw horizontal or vertical bars on a common zero-based scale. - Display the fastest-growing country's name and increase in an element with
id="fastest-growth",data-country, anddata-absolute-growth.
Acceptance Checklist
- The JSON export contains exactly the 2007 records with all original column names and values, plus the independently computed
gdp_per_capita. - Scatter marks are visible, correctly scaled and colored by continent, with matching labels and legend.
- Table means and bar lengths represent the actual continent populations. The report identifies the correct country and absolute increase.