Git Product home page Git Product logo

noaa-ghcn-weather-data's Issues

``Loading the data into PostgreSQL`` failed

exec pip install -r requirements.txt error

Invalid requirement: 'version https://git-lfs.github.com/spec/v1'
It looks like a path. Does it exist ?

I find https://git-lfs.github.com/spec/v1 does not exist.
The Jupyter code helped me ceate table weather_data in PostgreSQL weather db, but didn't ingest data in 2015.csv.

PandasError: DataFrame constructor not properly called

In the "Ingest_Data_Into_PostgreSQL.ipynb" jupyter notebook, the last command (26) does not work and gives a python error.

Command:

Finally, we want to label the 5 types of weather data noted above with human-readable names. We create a dictionary mapping each label to its description, create a Data Frame from that, and write it to the database

weather_type_dict = {'PRCP': 'Precipitation', 'SNOW': 'Snowfall', 'SNWD': 'Snow Depth', 
                     'TMAX': 'Maximum temperature', 'TMIN': 'Minimum temperature'}
weather_type_df = DataFrame(weather_type_dict.items(), columns=['weather_type', 'weather_description'])
description_table_name = 'weather_types'
weather_type_df.to_sql(description_table_name, conn, index_label='id')

Error when executed:

...
----> 3 weather_type_df = DataFrame(weather_type_dict.items(), columns=['weather_type', 'weather_description'])
...
PandasError: DataFrame constructor not properly called!

Value Error - Table weather_data already exist

Hi,

I am strugglling to ingest the weather data into database. When I run the command#6 starting with
db_name = 'weather'
I get the value error as mentioned in the title.

I double checked my database for the table and there is no relation presetnt at all , forget one with that name.

weather=# \dt
Did not find any relations.

I gave table a new name as well with hope that I may be able to create a table with new name but no success there either.

I noticed the author's comment that trying to write large data at a time can cause notebook to crash thus I tried reducing the chunk size too but still no success.

Any advice will be gracefully received.

Thanks

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.