# Data Visualization Projects - Visualize Data with a Heat Map Project Feedback

**URL:** <https://forum.freecodecamp.org/t/data-visualization-projects-visualize-data-with-a-heat-map-project-feedback/373768>\
**Category:** I Built This\
**Created:** [April 15, 2020, 7:40pm UTC](https://forum.freecodecamp.org/t/data-visualization-projects-visualize-data-with-a-heat-map-project-feedback/373768 "2020-04-15T19:40:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![konstantin.krumin](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/konstantin.krumin/32/125390_2.png) [@konstantin.krumin](https://forum.freecodecamp.org/u/konstantin.krumin)\
**Post date:** [April 15, 2020, 7:40pm UTC](https://forum.freecodecamp.org/t/data-visualization-projects-visualize-data-with-a-heat-map-project-feedback/373768/1 "2020-04-15T19:40:38Z")

</div>

Hey,

I would appreciate any feedback on my [Heat Map project](https://codepen.io/konstantinkrumin/full/poJXjjy). 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![avidler](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/avidler/32/123729_2.png) [@avidler](https://forum.freecodecamp.org/u/avidler)\
**Post date:** [April 15, 2020, 9:55pm UTC](https://forum.freecodecamp.org/t/data-visualization-projects-visualize-data-with-a-heat-map-project-feedback/373768/2 "2020-04-15T21:55:57Z")

</div>

Great job.  
I just couldn’t seem to work out how to get the legend looking like that, especially in having the axis labels between colours rather than underneath each one. I lost patience in the end as my hacked together version was still passing the tests!  
I like the little gap between each month on the main map, it makes the whole presentation look a bit cleaner.  
When you assign tempColoring, the repetition in the if/else ifs makes me wonder whether this could have been done in fewer lines if colorPalette was an array rather than an object? But then I looked back and realised I did something similar and would probably have been asking myself the same thing, but I was keen to move on to the next challenge.

---

<div class="post-metadata">

**Author:** ![Roma](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/roma/32/112899_2.png) [@Roma](https://forum.freecodecamp.org/u/Roma)\
**Post date:** [April 15, 2020, 10:01pm UTC](https://forum.freecodecamp.org/t/data-visualization-projects-visualize-data-with-a-heat-map-project-feedback/373768/3 "2020-04-15T22:01:17Z")

</div>

Looks good @konstantin.krumin. One thing I noticed is that January is the only month that doesn’t repeat itself. On the axis two of March but when I hover over the graph, it correctly identifies as February. Same with the other months that are duplicated.

---

<div class="post-metadata">

**Author:** ![konstantin.krumin](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/konstantin.krumin/32/125390_2.png) [@konstantin.krumin](https://forum.freecodecamp.org/u/konstantin.krumin)\
**Post date:** [April 16, 2020, 4:28pm UTC](https://forum.freecodecamp.org/t/data-visualization-projects-visualize-data-with-a-heat-map-project-feedback/373768/4 "2020-04-16T16:28:06Z")

</div>

Thank you very much for your feedback @avidler!

It took me quite a while to figure out how to set up this axis with values on the legend, and, to be honest, when at first I completed this project last week and got all tests passing I couldn’t figure it out either and just left the legend without any ticks. However, yesterday I reviewed my work and was able to figure it out. I created the `createLegendArr ` helper function and used it to create an array with legend tick values to match the requirements. Then I passed it in here:

```auto
const legendXAxis = d3.axisBottom(tempScale)
        .tickValues(legendArr)
        .tickFormat(d3.format(".1f"))
        .tickSizeOuter(0);

```

`tickSizeOuter(0)` was used to remove those default ticks at the beginning and end of the scale, to make it more aesthetic.

Thank you for your recommendation in regards to tempColoring , I’m gonna look into it! 🙂

Cheers,  
Konstantin

---

<div class="post-metadata">

**Author:** ![konstantin.krumin](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/konstantin.krumin/32/125390_2.png) [@konstantin.krumin](https://forum.freecodecamp.org/u/konstantin.krumin)\
**Post date:** [April 16, 2020, 4:30pm UTC](https://forum.freecodecamp.org/t/data-visualization-projects-visualize-data-with-a-heat-map-project-feedback/373768/5 "2020-04-16T16:30:25Z")

</div>

Thank you for your feedback @Roma!

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 1:38pm UTC](https://forum.freecodecamp.org/t/data-visualization-projects-visualize-data-with-a-heat-map-project-feedback/373768/6 "2021-06-01T13:38:50Z")

</div>

Closed on June 1, 2021, 1:38pm UTC


