Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph of temperature changes for the year in the burg #733

Merged
merged 4 commits into from
Feb 3, 2022

Conversation

Kerravitarr
Copy link
Contributor

I'm bad at writing in English. Please excuse me for this.
It seems illogical to me the parameter of the average temperature for the year in the burg.
Therefore, I found a database of meteorological measurements at https://ru.climate-data.org/
And I analyzed it. With the help of a neural network. I approximately established the dependence of Dy[X] and Dd[X], Md[X] = f(t,p,l).
Dy[X] - how much the temperature in winter differs from the temperature in summer
Md[X] - how much the temperature during the day differs from the temperature at night, on average per year
Dd[X] - how much the temperature difference between day and night is not constant in winter and summer
t - average temperature for the year
p - average rainfall for the year
l - latitude
Now, for each city, you can plot the temperature change. Based on t,p and l.

ATTENTION!!!
The characteristics of the planet and its orbit coincide with those of the earth!

Further, I will use the Russian language, if you want to know my reasoning, please use the Google Translate capabilities.

Я изменил свою первоначальную идею и доработал её. Что касается качества и используемых функций - жду критики. JavaScript - не знакомый мне язык и я не уверен, что выполнил всё верно.
Что касается самой идеи - её реализация пока далека от совершенства. Я понял, что если установить в настройках мира температуру на экваторе ниже, чем на Земле, то графики получаются слишком далекими от реальности. Эта ошибка связана с тем, что Dy[X] зависит от широты, а не среднегодовой температуры. К сожалению добиться хорошей сходимости удалось только расширением нейросети - ещё больше магических чисел.
Теперь, на основе прошлой выборки из 899 городов, попущенных через нейросеть миллион раз среднеквадратичная ошибка стала 3%.
Входными данными для сети являются широта и влажность, а средняя температура иcпользуется только как ориентир при построении графиков.

yldrefruz and others added 2 commits January 28, 2022 14:44
* Added Save Option for Api-like json export.
Will be updated and set to a scheme

* Save Option for Api-like added

* Moved UI of json export to export dialog.
Moved json export to another file named export-json.js

* Added Seperated json export selections
- all JSON : exports all json data.
- minimal JSON : exports json data without cells data.
- cells JSON : exports json data only with pack.cells data.

* More Stable Cell Export...

* Grid cells export option.
I'm bad at writing in English. Please excuse me for this.
It seems illogical to me the parameter of the average temperature for the year in the burg.
Therefore, I found a database of meteorological measurements at https://ru.climate-data.org/
And I analyzed it. With the help of a neural network. I approximately established the dependence of Dy[X] and Dd[X], Md[X] = f(t,p,l).
Dy[X] - how much the temperature in winter differs from the temperature in summer
Md[X] - how much the temperature during the day differs from the temperature at night, on average per year
Dd[X] - how much the temperature difference between day and night is not constant in winter and summer
t - average temperature for the year
p - average rainfall for the year
l - latitude
Now, for each city, you can plot the temperature change. Based on t,p and l.

ATTENTION!!!
The characteristics of the planet and its orbit coincide with those of the earth!

Further, I will use the Russian language, if you want to know my reasoning, please use the Google Translate capabilities.

Я изменил свою первоначальную идею и доработал её. Что касается качества и используемых функций - жду критики. JavaScript - не знакомый мне язык и я не уверен, что выполнил всё верно.
Что касается самой идеи - её реализация пока далека от совершенства. Я понял, что если установить в настройках мира температуру на экваторе ниже, чем на Земле, то графики получаются слишком далекими от реальности. Эта ошибка связана с тем, что Dy[X] зависит от широты, а не среднегодовой температуры. К сожалению добиться хорошей сходимости удалось только расширением нейросети - ещё больше магических чисел.
Теперь, на основе прошлой выборки из 899 городов, попущенных через нейросеть миллион раз среднеквадратичная ошибка стала 3%.
Входными данными для сети являются широта и влажность, а средняя температура иcпользуется только как ориентир при построении графиков.
@Azgaar
Copy link
Owner

Azgaar commented Jan 31, 2022

The idea is definitely great and benefit the project.

image

I would like to request to add a legend as the color-coding is not 100% clear. Other changes (clean up, language and js fixes) I can do on my own after the merge.

@Kerravitarr
Copy link
Contributor Author

I added a legend.
I hope to bring more to the project in the future.

@Kerravitarr
Copy link
Contributor Author

Kerravitarr commented Feb 1, 2022

I decided to test my theory on my map and noticed a big discrepancy.
Latitude greater than 0 and less than 0 does not equally affect Dy[X] and Dd[X], Md[X]. It seems to me that this is a mistake. It could appear due to lack of data.
Perhaps in the future, it will be possible to expand the number of input parameters of the neural network. Add the ratio between the temperature in the burg and the average temperature of the planet.

The coefficients have been changed so that the sign of the latitude does not affect the result
@Kerravitarr
Copy link
Contributor Author

I have updated the data again. Now the latitude sign does not affect the result.

There is still a problem that worries me. In my opinion, the graph should depend on the height too. But so far I don't have any data.
image

@Azgaar
Copy link
Owner

Azgaar commented Feb 2, 2022

Are you going to continue improving it?

@Kerravitarr
Copy link
Contributor Author

Maybe in the future.
I get too carried away sometimes, but now I'm happy with the result.

@Azgaar
Copy link
Owner

Azgaar commented Feb 2, 2022

Ok, I will merge when I have time

@Azgaar Azgaar changed the base branch from master to burg-temperature-graph February 2, 2022 19:07
@Azgaar
Copy link
Owner

Azgaar commented Feb 3, 2022

Merging to a separate branch. I will do required fixes and then merge to master.

@Azgaar Azgaar merged commit ccb7557 into Azgaar:burg-temperature-graph Feb 3, 2022
@Azgaar
Copy link
Owner

Azgaar commented Feb 5, 2022

Merged to master as a part of #734. I have refactored the code and UI a bit, but the idea stood intact.

Thanks @Kerravitarr for creating!

@Azgaar
Copy link
Owner

Azgaar commented Feb 5, 2022

Deployed, see also https://www.patreon.com/posts/62171949

@Kerravitarr
Copy link
Contributor Author

Thanks!
I found another small improvement. Line 51 in modules/ui/temperature-graph.js
Instead of
const yearDelTmpSig = (lstOut[1]*13.541688670361175+0.1414213562373084) > yearSig ? yearSig : (lstOut[1]*13.541688670361175+0.1414213562373084);
, you can write
const yearDelTmpSig = Math.min(lstOut[1]*13.541688670361175+0.1414213562373084, yearSig);

I don't know much about the climate. Therefore, I don’t know what rains in the city, clouds, etc. depend on. But if it becomes important for my story, maybe I'll figure it out.

@Azgaar
Copy link
Owner

Azgaar commented Feb 7, 2022

Hello. You can create a new PR. As for the weather conditions, we have only one value - precipitation. That can be used the same way as you have utilized the temperature.

sofronaspe pushed a commit to sofronaspe/Fantasy-Map-Generator that referenced this pull request Nov 22, 2022
* Option for exporting grid cell (Azgaar#731)

* Added Save Option for Api-like json export.
Will be updated and set to a scheme

* Save Option for Api-like added

* Moved UI of json export to export dialog.
Moved json export to another file named export-json.js

* Added Seperated json export selections
- all JSON : exports all json data.
- minimal JSON : exports json data without cells data.
- cells JSON : exports json data only with pack.cells data.

* More Stable Cell Export...

* Grid cells export option.

* Graph of temperature changes for the year in the burg

I'm bad at writing in English. Please excuse me for this.
It seems illogical to me the parameter of the average temperature for the year in the burg.
Therefore, I found a database of meteorological measurements at https://ru.climate-data.org/
And I analyzed it. With the help of a neural network. I approximately established the dependence of Dy[X] and Dd[X], Md[X] = f(t,p,l).
Dy[X] - how much the temperature in winter differs from the temperature in summer
Md[X] - how much the temperature during the day differs from the temperature at night, on average per year
Dd[X] - how much the temperature difference between day and night is not constant in winter and summer
t - average temperature for the year
p - average rainfall for the year
l - latitude
Now, for each city, you can plot the temperature change. Based on t,p and l.

ATTENTION!!!
The characteristics of the planet and its orbit coincide with those of the earth!

Further, I will use the Russian language, if you want to know my reasoning, please use the Google Translate capabilities.

Я изменил свою первоначальную идею и доработал её. Что касается качества и используемых функций - жду критики. JavaScript - не знакомый мне язык и я не уверен, что выполнил всё верно.
Что касается самой идеи - её реализация пока далека от совершенства. Я понял, что если установить в настройках мира температуру на экваторе ниже, чем на Земле, то графики получаются слишком далекими от реальности. Эта ошибка связана с тем, что Dy[X] зависит от широты, а не среднегодовой температуры. К сожалению добиться хорошей сходимости удалось только расширением нейросети - ещё больше магических чисел.
Теперь, на основе прошлой выборки из 899 городов, попущенных через нейросеть миллион раз среднеквадратичная ошибка стала 3%.
Входными данными для сети являются широта и влажность, а средняя температура иcпользуется только как ориентир при построении графиков.

* Add legnd in graph

* Editing Coefficients

The coefficients have been changed so that the sign of the latitude does not affect the result

Co-authored-by: Efruz Yıldırır <30903352+yldrefruz@users.noreply.github.com>
sofronaspe pushed a commit to sofronaspe/Fantasy-Map-Generator that referenced this pull request Nov 27, 2022
* Option for exporting grid cell (Azgaar#731)

* Added Save Option for Api-like json export.
Will be updated and set to a scheme

* Save Option for Api-like added

* Moved UI of json export to export dialog.
Moved json export to another file named export-json.js

* Added Seperated json export selections
- all JSON : exports all json data.
- minimal JSON : exports json data without cells data.
- cells JSON : exports json data only with pack.cells data.

* More Stable Cell Export...

* Grid cells export option.

* Graph of temperature changes for the year in the burg

I'm bad at writing in English. Please excuse me for this.
It seems illogical to me the parameter of the average temperature for the year in the burg.
Therefore, I found a database of meteorological measurements at https://ru.climate-data.org/
And I analyzed it. With the help of a neural network. I approximately established the dependence of Dy[X] and Dd[X], Md[X] = f(t,p,l).
Dy[X] - how much the temperature in winter differs from the temperature in summer
Md[X] - how much the temperature during the day differs from the temperature at night, on average per year
Dd[X] - how much the temperature difference between day and night is not constant in winter and summer
t - average temperature for the year
p - average rainfall for the year
l - latitude
Now, for each city, you can plot the temperature change. Based on t,p and l.

ATTENTION!!!
The characteristics of the planet and its orbit coincide with those of the earth!

Further, I will use the Russian language, if you want to know my reasoning, please use the Google Translate capabilities.

Я изменил свою первоначальную идею и доработал её. Что касается качества и используемых функций - жду критики. JavaScript - не знакомый мне язык и я не уверен, что выполнил всё верно.
Что касается самой идеи - её реализация пока далека от совершенства. Я понял, что если установить в настройках мира температуру на экваторе ниже, чем на Земле, то графики получаются слишком далекими от реальности. Эта ошибка связана с тем, что Dy[X] зависит от широты, а не среднегодовой температуры. К сожалению добиться хорошей сходимости удалось только расширением нейросети - ещё больше магических чисел.
Теперь, на основе прошлой выборки из 899 городов, попущенных через нейросеть миллион раз среднеквадратичная ошибка стала 3%.
Входными данными для сети являются широта и влажность, а средняя температура иcпользуется только как ориентир при построении графиков.

* Add legnd in graph

* Editing Coefficients

The coefficients have been changed so that the sign of the latitude does not affect the result

Co-authored-by: Efruz Yıldırır <30903352+yldrefruz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants