Coder Social home page Coder Social logo

geostatsguy / pythonnumericaldemos Goto Github PK

View Code? Open in Web Editor NEW
1.4K 1.4K 487.0 199.79 MB

Well-documented Python demonstrations for spatial data analytics, geostatistical and machine learning to support my courses.

License: MIT License

Jupyter Notebook 100.00% Python 0.01%
datanalytics geostatistics machine-learning python

pythonnumericaldemos's People

Contributors

geostatsguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pythonnumericaldemos's Issues

Library

@GeostatsGuy Do you have a list of libraries that can be called to install all the required libraries you are using in the notebooks?
It will be very helpful to have the list. Thanks a lot.

Inverse CDF

I think the inverse CDF graphics have switched axes, Values should be on the Y axis and probability on the x Axis.
On the Gaussian example I used:
plt.subplot(1,3,3)
plt.plot(p_values, x_values,'r-', lw=5, alpha=0.3, label='uniform pdf')

And the graph looked more like the inverse CDF graphs I searched on the Internet.
Please let me know if I am wrong.

And thanks for the wonderful studying material.

Unable to install library pymc3

Downloaded Anaconda 3 and did pip install geostatspy package. Opened ipykernel in Jupyter notebook and pasted code to install pymc3 in the box. The kernel then runs for a long time (30+ minutes), and then shows Unsatisfiable Error and No Module Found: pymc3. Appreciate your quick help as I need to use pymc3 for a Bayesian Linear Regression School Project.

can't find Ripley's K function

hi Michael, I was trying to follow the Ripley's K example here: Ripley_K_demo.ipynb but I cannot find, import or run a ripley_K function on the GeostatsPy package. Has it been removed?

thanks very much
Carolyn

Repeated text for OLS and MLE

In Interactive_Model_Fitting.ipynb , you seem to have repeated the same text before eqn (1) and eqn (2).
I suspect eqn (2) should be something else.

Error while running Variogram Calculation for Subsurface Data Analytics in Python in the examples module

Calculate Sample Data Isotropic Variograms

tmin = -9999.; tmax = 9999.;
lag_dist = 100.0; lag_tol = 100.0; nlag = 7; bandh = 9999.9; azi = 0; atol = 90.0; isill = 1

lag, por_sand_gamma, por_sand_npair = geostats.gamv(df_sand,"X","Y","NPor",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill)
lag, por_shale_gamma, por_shale_npair = geostats.gamv(df_shale,"X","Y","NPor",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill)
lag, por_gamma, por_npair = geostats.gamv(df,"X","Y","NPor",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill)

lag, perm_sand_gamma, perm_sand_npair = geostats.gamv(df_sand,"X","Y","NPerm",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill)
lag, perm_shale_gamma, perm_shale_npair = geostats.gamv(df_shale,"X","Y","NPerm",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill)
lag, perm_gamma, perm_npair = geostats.gamv(df,"X","Y","NPerm",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill)

plt.subplot(121)
plt.plot(lag,por_gamma,'x',color = 'black',label = 'All')
plt.plot(lag,por_sand_gamma,'x',color = 'orange',label = 'Sand')
plt.plot(lag,por_shale_gamma,'x',color = 'brown',label = 'Shale')
plt.plot([0,2000],[1.0,1.0],color = 'black')
plt.xlabel(r'Lag Distance $\bf(h)$, (m)')
plt.ylabel(r'$\gamma \bf(h)$')
plt.title('Isotropic NSCORE Porosity Variogram')
plt.xlim([0,700])
plt.ylim([0,1.8])
plt.legend(loc='upper left')
plt.grid(True)

plt.subplot(122)
plt.plot(lag,perm_gamma,'x',color = 'black',label = 'All')
plt.plot(lag,perm_sand_gamma,'x',color = 'orange',label = 'Sand')
plt.plot(lag,perm_shale_gamma,'x',color = 'brown',label = 'Shale')
plt.plot([0,2000],[1.0,1.0],color = 'black')
plt.xlabel(r'Lag Distance $\bf(h)$, (m)')
plt.ylabel(r'$\gamma \bf(h)$')
plt.title('Isotropic NSCORE Permeaiblity Variogram')
plt.xlim([0,700])
plt.ylim([0,1.8])
plt.legend(loc='upper left')
plt.grid(True)

plt.subplots_adjust(left=0.0, bottom=0.0, right=2.0, top=1.2, wspace=0.2, hspace=0.3)
plt.show()

Trying to run this block of code and getting the following error


TypeError Traceback (most recent call last)
TypeError: expected dtype object, got 'numpy.dtype[float64]'

The above exception was the direct cause of the following exception:

SystemError Traceback (most recent call last)
in
3 lag_dist = 100.0; lag_tol = 100.0; nlag = 7; bandh = 9999.9; azi = 0; atol = 90.0; isill = 1
4
----> 5 lag, por_sand_gamma, por_sand_npair = geostats.gamv(df_sand,"X","Y","NPor",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill)
6 lag, por_shale_gamma, por_shale_npair = geostats.gamv(df_shale,"X","Y","NPor",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill)
7 lag, por_gamma, por_npair = geostats.gamv(df,"X","Y","NPor",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill)

~/anaconda3/lib/python3.8/site-packages/geostatspy/geostats.py in gamv(df, xcol, ycol, vcol, tmin, tmax, xlag, xltol, nlag, azm, atol, bandwh, isill)
1795
1796 # Loop over combinatorial of data pairs to calculate the variogram
-> 1797 dis, vario, npp = variogram_loop(
1798 x, y, vr, xlag, xltol, nlag, azm, atol, bandwh
1799 )

SystemError: CPUDispatcher(<function variogram_loop at 0x7fc1b09b6160>) returned a result with an error set

Issue with Interactive_ParametricDistributions.ipynb

Hi, @GeostatsGuy ....I have detected an issue running this notebook (by the way, it's an excellent educational resource, as the rest of notebooks in your repositories). Matplotlib graphs do not clear correctly in events with clear_output(). If you run the notebook you can see that every time you click the widget controls, the frame is not cleared and the plot is replicated. In my case, I have fixed this issue replacing plt.plot() by plt.show()......

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.